diff --git a/hai-bweb/src/main/java/com/bweb/controller/HighDiscountPackageAgentController.java b/hai-bweb/src/main/java/com/bweb/controller/HighDiscountPackageAgentController.java new file mode 100644 index 00000000..8d37dcb9 --- /dev/null +++ b/hai-bweb/src/main/java/com/bweb/controller/HighDiscountPackageAgentController.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 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 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 map = new HashMap<>(); + + map.put("agentId",agentId); + + List 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 map = new HashMap<>(); + + map.put("agentId",agentId); + map.put("discountPackageId",discountPackageId); + + List list = discountPackageAgentService.getListRecord(map); + + return ResponseMsgUtil.success(list); + + } catch (Exception e) { + log.error("HighOrderController --> getUserOrderList() error!", e); + return ResponseMsgUtil.exception(e); + } + } + + +} diff --git a/hai-bweb/src/main/java/com/bweb/controller/HighDiscountPackageController.java b/hai-bweb/src/main/java/com/bweb/controller/HighDiscountPackageController.java index 28a8ffff..8b18d2c7 100644 --- a/hai-bweb/src/main/java/com/bweb/controller/HighDiscountPackageController.java +++ b/hai-bweb/src/main/java/com/bweb/controller/HighDiscountPackageController.java @@ -80,6 +80,9 @@ public class HighDiscountPackageController { @Resource private HighDiscountPackageActualService discountPackageActualService; + @Resource + private HighDiscountPackageAgentService discountPackageAgentService; + @RequestMapping(value = "/getDiscountPackageList", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "获取优惠券包列表") @@ -711,7 +714,7 @@ public class HighDiscountPackageController { try { //发布人员 UserInfoModel userInfoModel = userCenter.getSessionModel(UserInfoModel.class); - if (userInfoModel == null || userInfoModel.getBsCompany() == null) { + if (userInfoModel == null) { log.error("HighDiscountPackageController -> giveAway() 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 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 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); + } + } + } diff --git a/hai-cweb/src/main/java/com/cweb/controller/Blx/BlxCarController.java b/hai-cweb/src/main/java/com/cweb/controller/Blx/BlxCarController.java index f28b8fe1..628f3bde 100644 --- a/hai-cweb/src/main/java/com/cweb/controller/Blx/BlxCarController.java +++ b/hai-cweb/src/main/java/com/cweb/controller/Blx/BlxCarController.java @@ -11,11 +11,13 @@ 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.ApiBlxOrder; import com.hai.entity.BlxCarInfo; import com.hai.model.HighUserModel; import com.hai.model.ResponseData; import com.hai.openApi.config.BlxConfig; +import com.hai.openApi.service.ApiBlxCouponService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.apache.commons.lang3.StringUtils; @@ -49,6 +51,9 @@ public class BlxCarController { @Resource private BlxCarService blxCarService; + @Resource + private ApiBlxCouponService apiBlxCouponService; + @RequestMapping(value = "/queryJsParking", method = RequestMethod.GET) @ResponseBody @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 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); + } + } + } diff --git a/hai-service/src/main/java/com/hai/dao/ApiBlxOrderMapper.java b/hai-service/src/main/java/com/hai/dao/ApiBlxOrderMapper.java index e3ce7292..a1eb9bef 100644 --- a/hai-service/src/main/java/com/hai/dao/ApiBlxOrderMapper.java +++ b/hai-service/src/main/java/com/hai/dao/ApiBlxOrderMapper.java @@ -40,27 +40,31 @@ public interface ApiBlxOrderMapper extends ApiBlxOrderMapperExt { @Insert({ "insert into api_blx_order (mer_id, order_no, ", + "user_id, user_phone, ", "mer_order_id, park_order_id, ", "in_time, out_time, ", "over_time, car_no, ", "park_time, park_name, ", "park_id, car_seat_id, ", - "park_price, coupon_price, ", - "order_type, order_status, ", - "create_time, update_time, ", - "ext_1, ext_2, ext_3, ", - "ext_4, ext_5, ext_6)", + "park_price, pay_price, ", + "coupon_price, order_type, ", + "order_status, create_time, ", + "update_time, ext_1, ", + "ext_2, ext_3, ext_4, ", + "ext_5, ext_6)", "values (#{merId,jdbcType=VARCHAR}, #{orderNo,jdbcType=VARCHAR}, ", + "#{userId,jdbcType=BIGINT}, #{userPhone,jdbcType=VARCHAR}, ", "#{merOrderId,jdbcType=VARCHAR}, #{parkOrderId,jdbcType=VARCHAR}, ", "#{inTime,jdbcType=TIMESTAMP}, #{outTime,jdbcType=TIMESTAMP}, ", "#{overTime,jdbcType=INTEGER}, #{carNo,jdbcType=VARCHAR}, ", "#{parkTime,jdbcType=INTEGER}, #{parkName,jdbcType=VARCHAR}, ", "#{parkId,jdbcType=BIGINT}, #{carSeatId,jdbcType=VARCHAR}, ", - "#{parkPrice,jdbcType=DECIMAL}, #{couponPrice,jdbcType=DECIMAL}, ", - "#{orderType,jdbcType=INTEGER}, #{orderStatus,jdbcType=INTEGER}, ", - "#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, ", - "#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR}, ", - "#{ext4,jdbcType=VARCHAR}, #{ext5,jdbcType=VARCHAR}, #{ext6,jdbcType=VARCHAR})" + "#{parkPrice,jdbcType=DECIMAL}, #{payPrice,jdbcType=DECIMAL}, ", + "#{couponPrice,jdbcType=DECIMAL}, #{orderType,jdbcType=INTEGER}, ", + "#{orderStatus,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, ", + "#{updateTime,jdbcType=TIMESTAMP}, #{ext1,jdbcType=VARCHAR}, ", + "#{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR}, #{ext4,jdbcType=VARCHAR}, ", + "#{ext5,jdbcType=VARCHAR}, #{ext6,jdbcType=VARCHAR})" }) @Options(useGeneratedKeys=true,keyProperty="id") 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="mer_id", property="merId", 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="park_order_id", property="parkOrderId", jdbcType=JdbcType.VARCHAR), @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="car_seat_id", property="carSeatId", jdbcType=JdbcType.VARCHAR), @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="order_type", property="orderType", jdbcType=JdbcType.INTEGER), @Result(column="order_status", property="orderStatus", jdbcType=JdbcType.INTEGER), @@ -101,10 +108,10 @@ public interface ApiBlxOrderMapper extends ApiBlxOrderMapperExt { @Select({ "select", - "id, mer_id, order_no, mer_order_id, park_order_id, in_time, out_time, over_time, ", - "car_no, park_time, park_name, park_id, car_seat_id, park_price, coupon_price, ", - "order_type, order_status, create_time, update_time, ext_1, ext_2, ext_3, ext_4, ", - "ext_5, ext_6", + "id, mer_id, order_no, user_id, user_phone, mer_order_id, park_order_id, in_time, ", + "out_time, over_time, car_no, park_time, park_name, park_id, car_seat_id, park_price, ", + "pay_price, coupon_price, order_type, order_status, create_time, update_time, ", + "ext_1, ext_2, ext_3, ext_4, ext_5, ext_6", "from api_blx_order", "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="mer_id", property="merId", 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="park_order_id", property="parkOrderId", jdbcType=JdbcType.VARCHAR), @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="car_seat_id", property="carSeatId", jdbcType=JdbcType.VARCHAR), @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="order_type", property="orderType", 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", "set mer_id = #{merId,jdbcType=VARCHAR},", "order_no = #{orderNo,jdbcType=VARCHAR},", + "user_id = #{userId,jdbcType=BIGINT},", + "user_phone = #{userPhone,jdbcType=VARCHAR},", "mer_order_id = #{merOrderId,jdbcType=VARCHAR},", "park_order_id = #{parkOrderId,jdbcType=VARCHAR},", "in_time = #{inTime,jdbcType=TIMESTAMP},", @@ -161,6 +173,7 @@ public interface ApiBlxOrderMapper extends ApiBlxOrderMapperExt { "park_id = #{parkId,jdbcType=BIGINT},", "car_seat_id = #{carSeatId,jdbcType=VARCHAR},", "park_price = #{parkPrice,jdbcType=DECIMAL},", + "pay_price = #{payPrice,jdbcType=DECIMAL},", "coupon_price = #{couponPrice,jdbcType=DECIMAL},", "order_type = #{orderType,jdbcType=INTEGER},", "order_status = #{orderStatus,jdbcType=INTEGER},", diff --git a/hai-service/src/main/java/com/hai/dao/ApiBlxOrderSqlProvider.java b/hai-service/src/main/java/com/hai/dao/ApiBlxOrderSqlProvider.java index 49e39918..2179308d 100644 --- a/hai-service/src/main/java/com/hai/dao/ApiBlxOrderSqlProvider.java +++ b/hai-service/src/main/java/com/hai/dao/ApiBlxOrderSqlProvider.java @@ -36,6 +36,14 @@ public class ApiBlxOrderSqlProvider { 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) { sql.VALUES("mer_order_id", "#{merOrderId,jdbcType=VARCHAR}"); } @@ -80,6 +88,10 @@ public class ApiBlxOrderSqlProvider { sql.VALUES("park_price", "#{parkPrice,jdbcType=DECIMAL}"); } + if (record.getPayPrice() != null) { + sql.VALUES("pay_price", "#{payPrice,jdbcType=DECIMAL}"); + } + if (record.getCouponPrice() != null) { sql.VALUES("coupon_price", "#{couponPrice,jdbcType=DECIMAL}"); } @@ -136,6 +148,8 @@ public class ApiBlxOrderSqlProvider { } sql.SELECT("mer_id"); sql.SELECT("order_no"); + sql.SELECT("user_id"); + sql.SELECT("user_phone"); sql.SELECT("mer_order_id"); sql.SELECT("park_order_id"); sql.SELECT("in_time"); @@ -147,6 +161,7 @@ public class ApiBlxOrderSqlProvider { sql.SELECT("park_id"); sql.SELECT("car_seat_id"); sql.SELECT("park_price"); + sql.SELECT("pay_price"); sql.SELECT("coupon_price"); sql.SELECT("order_type"); sql.SELECT("order_status"); @@ -187,6 +202,14 @@ public class ApiBlxOrderSqlProvider { 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) { sql.SET("mer_order_id = #{record.merOrderId,jdbcType=VARCHAR}"); } @@ -231,6 +254,10 @@ public class ApiBlxOrderSqlProvider { sql.SET("park_price = #{record.parkPrice,jdbcType=DECIMAL}"); } + if (record.getPayPrice() != null) { + sql.SET("pay_price = #{record.payPrice,jdbcType=DECIMAL}"); + } + if (record.getCouponPrice() != null) { sql.SET("coupon_price = #{record.couponPrice,jdbcType=DECIMAL}"); } @@ -286,6 +313,8 @@ public class ApiBlxOrderSqlProvider { sql.SET("id = #{record.id,jdbcType=BIGINT}"); sql.SET("mer_id = #{record.merId,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("park_order_id = #{record.parkOrderId,jdbcType=VARCHAR}"); 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("car_seat_id = #{record.carSeatId,jdbcType=VARCHAR}"); 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("order_type = #{record.orderType,jdbcType=INTEGER}"); sql.SET("order_status = #{record.orderStatus,jdbcType=INTEGER}"); @@ -326,6 +356,14 @@ public class ApiBlxOrderSqlProvider { 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) { sql.SET("mer_order_id = #{merOrderId,jdbcType=VARCHAR}"); } @@ -370,6 +408,10 @@ public class ApiBlxOrderSqlProvider { sql.SET("park_price = #{parkPrice,jdbcType=DECIMAL}"); } + if (record.getPayPrice() != null) { + sql.SET("pay_price = #{payPrice,jdbcType=DECIMAL}"); + } + if (record.getCouponPrice() != null) { sql.SET("coupon_price = #{couponPrice,jdbcType=DECIMAL}"); } diff --git a/hai-service/src/main/java/com/hai/dao/HighDiscountPackageAgentRecordMapper.java b/hai-service/src/main/java/com/hai/dao/HighDiscountPackageAgentRecordMapper.java new file mode 100644 index 00000000..85fb9365 --- /dev/null +++ b/hai-service/src/main/java/com/hai/dao/HighDiscountPackageAgentRecordMapper.java @@ -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 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); +} \ No newline at end of file diff --git a/hai-service/src/main/java/com/hai/dao/HighDiscountPackageAgentRecordMapperExt.java b/hai-service/src/main/java/com/hai/dao/HighDiscountPackageAgentRecordMapperExt.java new file mode 100644 index 00000000..c285bbf5 --- /dev/null +++ b/hai-service/src/main/java/com/hai/dao/HighDiscountPackageAgentRecordMapperExt.java @@ -0,0 +1,7 @@ +package com.hai.dao; + +/** + * mapper扩展类 + */ +public interface HighDiscountPackageAgentRecordMapperExt { +} \ No newline at end of file diff --git a/hai-service/src/main/java/com/hai/dao/HighDiscountPackageAgentRecordSqlProvider.java b/hai-service/src/main/java/com/hai/dao/HighDiscountPackageAgentRecordSqlProvider.java new file mode 100644 index 00000000..6be56880 --- /dev/null +++ b/hai-service/src/main/java/com/hai/dao/HighDiscountPackageAgentRecordSqlProvider.java @@ -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 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 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 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 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()); + } + } +} \ No newline at end of file diff --git a/hai-service/src/main/java/com/hai/dao/HighDiscountPackageAgentRelMapper.java b/hai-service/src/main/java/com/hai/dao/HighDiscountPackageAgentRelMapper.java new file mode 100644 index 00000000..485205a1 --- /dev/null +++ b/hai-service/src/main/java/com/hai/dao/HighDiscountPackageAgentRelMapper.java @@ -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 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); +} \ No newline at end of file diff --git a/hai-service/src/main/java/com/hai/dao/HighDiscountPackageAgentRelMapperExt.java b/hai-service/src/main/java/com/hai/dao/HighDiscountPackageAgentRelMapperExt.java new file mode 100644 index 00000000..0c8216fb --- /dev/null +++ b/hai-service/src/main/java/com/hai/dao/HighDiscountPackageAgentRelMapperExt.java @@ -0,0 +1,7 @@ +package com.hai.dao; + +/** + * mapper扩展类 + */ +public interface HighDiscountPackageAgentRelMapperExt { +} \ No newline at end of file diff --git a/hai-service/src/main/java/com/hai/dao/HighDiscountPackageAgentRelSqlProvider.java b/hai-service/src/main/java/com/hai/dao/HighDiscountPackageAgentRelSqlProvider.java new file mode 100644 index 00000000..9e4bab30 --- /dev/null +++ b/hai-service/src/main/java/com/hai/dao/HighDiscountPackageAgentRelSqlProvider.java @@ -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 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 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 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 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()); + } + } +} \ No newline at end of file diff --git a/hai-service/src/main/java/com/hai/entity/ApiBlxOrder.java b/hai-service/src/main/java/com/hai/entity/ApiBlxOrder.java index 9813cea2..4033e08d 100644 --- a/hai-service/src/main/java/com/hai/entity/ApiBlxOrder.java +++ b/hai-service/src/main/java/com/hai/entity/ApiBlxOrder.java @@ -29,6 +29,16 @@ public class ApiBlxOrder implements Serializable { */ private String orderNo; + /** + * 用户id + */ + private Long userId; + + /** + * 用户手机号 + */ + private String userPhone; + /** * 商户订单ID */ @@ -84,6 +94,11 @@ public class ApiBlxOrder implements Serializable { */ private BigDecimal parkPrice; + /** + * 支付金额 + */ + private BigDecimal payPrice; + /** * 停车券金额 */ @@ -165,6 +180,22 @@ public class ApiBlxOrder implements Serializable { 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() { return merOrderId; } @@ -253,6 +284,14 @@ public class ApiBlxOrder implements Serializable { this.parkPrice = parkPrice; } + public BigDecimal getPayPrice() { + return payPrice; + } + + public void setPayPrice(BigDecimal payPrice) { + this.payPrice = payPrice; + } + public BigDecimal getCouponPrice() { return couponPrice; } @@ -356,6 +395,8 @@ public class ApiBlxOrder implements Serializable { return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) && (this.getMerId() == null ? other.getMerId() == null : this.getMerId().equals(other.getMerId())) && (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.getParkOrderId() == null ? other.getParkOrderId() == null : this.getParkOrderId().equals(other.getParkOrderId())) && (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.getCarSeatId() == null ? other.getCarSeatId() == null : this.getCarSeatId().equals(other.getCarSeatId())) && (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.getOrderType() == null ? other.getOrderType() == null : this.getOrderType().equals(other.getOrderType())) && (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 + ((getMerId() == null) ? 0 : getMerId().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 + ((getParkOrderId() == null) ? 0 : getParkOrderId().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 + ((getCarSeatId() == null) ? 0 : getCarSeatId().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 + ((getOrderType() == null) ? 0 : getOrderType().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(", merId=").append(merId); sb.append(", orderNo=").append(orderNo); + sb.append(", userId=").append(userId); + sb.append(", userPhone=").append(userPhone); sb.append(", merOrderId=").append(merOrderId); sb.append(", parkOrderId=").append(parkOrderId); sb.append(", inTime=").append(inTime); @@ -432,6 +479,7 @@ public class ApiBlxOrder implements Serializable { sb.append(", parkId=").append(parkId); sb.append(", carSeatId=").append(carSeatId); sb.append(", parkPrice=").append(parkPrice); + sb.append(", payPrice=").append(payPrice); sb.append(", couponPrice=").append(couponPrice); sb.append(", orderType=").append(orderType); sb.append(", orderStatus=").append(orderStatus); diff --git a/hai-service/src/main/java/com/hai/entity/ApiBlxOrderExample.java b/hai-service/src/main/java/com/hai/entity/ApiBlxOrderExample.java index 3d362a68..c10dba2f 100644 --- a/hai-service/src/main/java/com/hai/entity/ApiBlxOrderExample.java +++ b/hai-service/src/main/java/com/hai/entity/ApiBlxOrderExample.java @@ -326,6 +326,136 @@ public class ApiBlxOrderExample { 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 values) { + addCriterion("user_id in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotIn(List 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 values) { + addCriterion("user_phone in", values, "userPhone"); + return (Criteria) this; + } + + public Criteria andUserPhoneNotIn(List 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() { addCriterion("mer_order_id is null"); return (Criteria) this; @@ -1036,6 +1166,66 @@ public class ApiBlxOrderExample { 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 values) { + addCriterion("pay_price in", values, "payPrice"); + return (Criteria) this; + } + + public Criteria andPayPriceNotIn(List 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() { addCriterion("coupon_price is null"); return (Criteria) this; diff --git a/hai-service/src/main/java/com/hai/entity/HighDiscountPackageAgentRecord.java b/hai-service/src/main/java/com/hai/entity/HighDiscountPackageAgentRecord.java new file mode 100644 index 00000000..2253010a --- /dev/null +++ b/hai-service/src/main/java/com/hai/entity/HighDiscountPackageAgentRecord.java @@ -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(); + } +} \ No newline at end of file diff --git a/hai-service/src/main/java/com/hai/entity/HighDiscountPackageAgentRecordExample.java b/hai-service/src/main/java/com/hai/entity/HighDiscountPackageAgentRecordExample.java new file mode 100644 index 00000000..6ed9897e --- /dev/null +++ b/hai-service/src/main/java/com/hai/entity/HighDiscountPackageAgentRecordExample.java @@ -0,0 +1,1243 @@ +package com.hai.entity; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class HighDiscountPackageAgentRecordExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public HighDiscountPackageAgentRecordExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andDiscountPackageTitleIsNull() { + addCriterion("discount_package_title is null"); + return (Criteria) this; + } + + public Criteria andDiscountPackageTitleIsNotNull() { + addCriterion("discount_package_title is not null"); + return (Criteria) this; + } + + public Criteria andDiscountPackageTitleEqualTo(String value) { + addCriterion("discount_package_title =", value, "discountPackageTitle"); + return (Criteria) this; + } + + public Criteria andDiscountPackageTitleNotEqualTo(String value) { + addCriterion("discount_package_title <>", value, "discountPackageTitle"); + return (Criteria) this; + } + + public Criteria andDiscountPackageTitleGreaterThan(String value) { + addCriterion("discount_package_title >", value, "discountPackageTitle"); + return (Criteria) this; + } + + public Criteria andDiscountPackageTitleGreaterThanOrEqualTo(String value) { + addCriterion("discount_package_title >=", value, "discountPackageTitle"); + return (Criteria) this; + } + + public Criteria andDiscountPackageTitleLessThan(String value) { + addCriterion("discount_package_title <", value, "discountPackageTitle"); + return (Criteria) this; + } + + public Criteria andDiscountPackageTitleLessThanOrEqualTo(String value) { + addCriterion("discount_package_title <=", value, "discountPackageTitle"); + return (Criteria) this; + } + + public Criteria andDiscountPackageTitleLike(String value) { + addCriterion("discount_package_title like", value, "discountPackageTitle"); + return (Criteria) this; + } + + public Criteria andDiscountPackageTitleNotLike(String value) { + addCriterion("discount_package_title not like", value, "discountPackageTitle"); + return (Criteria) this; + } + + public Criteria andDiscountPackageTitleIn(List values) { + addCriterion("discount_package_title in", values, "discountPackageTitle"); + return (Criteria) this; + } + + public Criteria andDiscountPackageTitleNotIn(List values) { + addCriterion("discount_package_title not in", values, "discountPackageTitle"); + return (Criteria) this; + } + + public Criteria andDiscountPackageTitleBetween(String value1, String value2) { + addCriterion("discount_package_title between", value1, value2, "discountPackageTitle"); + return (Criteria) this; + } + + public Criteria andDiscountPackageTitleNotBetween(String value1, String value2) { + addCriterion("discount_package_title not between", value1, value2, "discountPackageTitle"); + return (Criteria) this; + } + + public Criteria andDiscountPackageIdIsNull() { + addCriterion("discount_package_id is null"); + return (Criteria) this; + } + + public Criteria andDiscountPackageIdIsNotNull() { + addCriterion("discount_package_id is not null"); + return (Criteria) this; + } + + public Criteria andDiscountPackageIdEqualTo(Long value) { + addCriterion("discount_package_id =", value, "discountPackageId"); + return (Criteria) this; + } + + public Criteria andDiscountPackageIdNotEqualTo(Long value) { + addCriterion("discount_package_id <>", value, "discountPackageId"); + return (Criteria) this; + } + + public Criteria andDiscountPackageIdGreaterThan(Long value) { + addCriterion("discount_package_id >", value, "discountPackageId"); + return (Criteria) this; + } + + public Criteria andDiscountPackageIdGreaterThanOrEqualTo(Long value) { + addCriterion("discount_package_id >=", value, "discountPackageId"); + return (Criteria) this; + } + + public Criteria andDiscountPackageIdLessThan(Long value) { + addCriterion("discount_package_id <", value, "discountPackageId"); + return (Criteria) this; + } + + public Criteria andDiscountPackageIdLessThanOrEqualTo(Long value) { + addCriterion("discount_package_id <=", value, "discountPackageId"); + return (Criteria) this; + } + + public Criteria andDiscountPackageIdIn(List values) { + addCriterion("discount_package_id in", values, "discountPackageId"); + return (Criteria) this; + } + + public Criteria andDiscountPackageIdNotIn(List values) { + addCriterion("discount_package_id not in", values, "discountPackageId"); + return (Criteria) this; + } + + public Criteria andDiscountPackageIdBetween(Long value1, Long value2) { + addCriterion("discount_package_id between", value1, value2, "discountPackageId"); + return (Criteria) this; + } + + public Criteria andDiscountPackageIdNotBetween(Long value1, Long value2) { + addCriterion("discount_package_id not between", value1, value2, "discountPackageId"); + return (Criteria) this; + } + + public Criteria andAgentNameIsNull() { + addCriterion("agent_name is null"); + return (Criteria) this; + } + + public Criteria andAgentNameIsNotNull() { + addCriterion("agent_name is not null"); + return (Criteria) this; + } + + public Criteria andAgentNameEqualTo(String value) { + addCriterion("agent_name =", value, "agentName"); + return (Criteria) this; + } + + public Criteria andAgentNameNotEqualTo(String value) { + addCriterion("agent_name <>", value, "agentName"); + return (Criteria) this; + } + + public Criteria andAgentNameGreaterThan(String value) { + addCriterion("agent_name >", value, "agentName"); + return (Criteria) this; + } + + public Criteria andAgentNameGreaterThanOrEqualTo(String value) { + addCriterion("agent_name >=", value, "agentName"); + return (Criteria) this; + } + + public Criteria andAgentNameLessThan(String value) { + addCriterion("agent_name <", value, "agentName"); + return (Criteria) this; + } + + public Criteria andAgentNameLessThanOrEqualTo(String value) { + addCriterion("agent_name <=", value, "agentName"); + return (Criteria) this; + } + + public Criteria andAgentNameLike(String value) { + addCriterion("agent_name like", value, "agentName"); + return (Criteria) this; + } + + public Criteria andAgentNameNotLike(String value) { + addCriterion("agent_name not like", value, "agentName"); + return (Criteria) this; + } + + public Criteria andAgentNameIn(List values) { + addCriterion("agent_name in", values, "agentName"); + return (Criteria) this; + } + + public Criteria andAgentNameNotIn(List values) { + addCriterion("agent_name not in", values, "agentName"); + return (Criteria) this; + } + + public Criteria andAgentNameBetween(String value1, String value2) { + addCriterion("agent_name between", value1, value2, "agentName"); + return (Criteria) this; + } + + public Criteria andAgentNameNotBetween(String value1, String value2) { + addCriterion("agent_name not between", value1, value2, "agentName"); + return (Criteria) this; + } + + public Criteria andAgentIdIsNull() { + addCriterion("agent_id is null"); + return (Criteria) this; + } + + public Criteria andAgentIdIsNotNull() { + addCriterion("agent_id is not null"); + return (Criteria) this; + } + + public Criteria andAgentIdEqualTo(Long value) { + addCriterion("agent_id =", value, "agentId"); + return (Criteria) this; + } + + public Criteria andAgentIdNotEqualTo(Long value) { + addCriterion("agent_id <>", value, "agentId"); + return (Criteria) this; + } + + public Criteria andAgentIdGreaterThan(Long value) { + addCriterion("agent_id >", value, "agentId"); + return (Criteria) this; + } + + public Criteria andAgentIdGreaterThanOrEqualTo(Long value) { + addCriterion("agent_id >=", value, "agentId"); + return (Criteria) this; + } + + public Criteria andAgentIdLessThan(Long value) { + addCriterion("agent_id <", value, "agentId"); + return (Criteria) this; + } + + public Criteria andAgentIdLessThanOrEqualTo(Long value) { + addCriterion("agent_id <=", value, "agentId"); + return (Criteria) this; + } + + public Criteria andAgentIdIn(List values) { + addCriterion("agent_id in", values, "agentId"); + return (Criteria) this; + } + + public Criteria andAgentIdNotIn(List values) { + addCriterion("agent_id not in", values, "agentId"); + return (Criteria) this; + } + + public Criteria andAgentIdBetween(Long value1, Long value2) { + addCriterion("agent_id between", value1, value2, "agentId"); + return (Criteria) this; + } + + public Criteria andAgentIdNotBetween(Long value1, Long value2) { + addCriterion("agent_id not between", value1, value2, "agentId"); + return (Criteria) this; + } + + public Criteria andCountIsNull() { + addCriterion("`count` is null"); + return (Criteria) this; + } + + public Criteria andCountIsNotNull() { + addCriterion("`count` is not null"); + return (Criteria) this; + } + + public Criteria andCountEqualTo(Integer value) { + addCriterion("`count` =", value, "count"); + return (Criteria) this; + } + + public Criteria andCountNotEqualTo(Integer value) { + addCriterion("`count` <>", value, "count"); + return (Criteria) this; + } + + public Criteria andCountGreaterThan(Integer value) { + addCriterion("`count` >", value, "count"); + return (Criteria) this; + } + + public Criteria andCountGreaterThanOrEqualTo(Integer value) { + addCriterion("`count` >=", value, "count"); + return (Criteria) this; + } + + public Criteria andCountLessThan(Integer value) { + addCriterion("`count` <", value, "count"); + return (Criteria) this; + } + + public Criteria andCountLessThanOrEqualTo(Integer value) { + addCriterion("`count` <=", value, "count"); + return (Criteria) this; + } + + public Criteria andCountIn(List values) { + addCriterion("`count` in", values, "count"); + return (Criteria) this; + } + + public Criteria andCountNotIn(List values) { + addCriterion("`count` not in", values, "count"); + return (Criteria) this; + } + + public Criteria andCountBetween(Integer value1, Integer value2) { + addCriterion("`count` between", value1, value2, "count"); + return (Criteria) this; + } + + public Criteria andCountNotBetween(Integer value1, Integer value2) { + addCriterion("`count` not between", value1, value2, "count"); + return (Criteria) this; + } + + public Criteria andFrontCountIsNull() { + addCriterion("front_count is null"); + return (Criteria) this; + } + + public Criteria andFrontCountIsNotNull() { + addCriterion("front_count is not null"); + return (Criteria) this; + } + + public Criteria andFrontCountEqualTo(Integer value) { + addCriterion("front_count =", value, "frontCount"); + return (Criteria) this; + } + + public Criteria andFrontCountNotEqualTo(Integer value) { + addCriterion("front_count <>", value, "frontCount"); + return (Criteria) this; + } + + public Criteria andFrontCountGreaterThan(Integer value) { + addCriterion("front_count >", value, "frontCount"); + return (Criteria) this; + } + + public Criteria andFrontCountGreaterThanOrEqualTo(Integer value) { + addCriterion("front_count >=", value, "frontCount"); + return (Criteria) this; + } + + public Criteria andFrontCountLessThan(Integer value) { + addCriterion("front_count <", value, "frontCount"); + return (Criteria) this; + } + + public Criteria andFrontCountLessThanOrEqualTo(Integer value) { + addCriterion("front_count <=", value, "frontCount"); + return (Criteria) this; + } + + public Criteria andFrontCountIn(List values) { + addCriterion("front_count in", values, "frontCount"); + return (Criteria) this; + } + + public Criteria andFrontCountNotIn(List values) { + addCriterion("front_count not in", values, "frontCount"); + return (Criteria) this; + } + + public Criteria andFrontCountBetween(Integer value1, Integer value2) { + addCriterion("front_count between", value1, value2, "frontCount"); + return (Criteria) this; + } + + public Criteria andFrontCountNotBetween(Integer value1, Integer value2) { + addCriterion("front_count not between", value1, value2, "frontCount"); + return (Criteria) this; + } + + public Criteria andAfterCountIsNull() { + addCriterion("after_count is null"); + return (Criteria) this; + } + + public Criteria andAfterCountIsNotNull() { + addCriterion("after_count is not null"); + return (Criteria) this; + } + + public Criteria andAfterCountEqualTo(Integer value) { + addCriterion("after_count =", value, "afterCount"); + return (Criteria) this; + } + + public Criteria andAfterCountNotEqualTo(Integer value) { + addCriterion("after_count <>", value, "afterCount"); + return (Criteria) this; + } + + public Criteria andAfterCountGreaterThan(Integer value) { + addCriterion("after_count >", value, "afterCount"); + return (Criteria) this; + } + + public Criteria andAfterCountGreaterThanOrEqualTo(Integer value) { + addCriterion("after_count >=", value, "afterCount"); + return (Criteria) this; + } + + public Criteria andAfterCountLessThan(Integer value) { + addCriterion("after_count <", value, "afterCount"); + return (Criteria) this; + } + + public Criteria andAfterCountLessThanOrEqualTo(Integer value) { + addCriterion("after_count <=", value, "afterCount"); + return (Criteria) this; + } + + public Criteria andAfterCountIn(List values) { + addCriterion("after_count in", values, "afterCount"); + return (Criteria) this; + } + + public Criteria andAfterCountNotIn(List values) { + addCriterion("after_count not in", values, "afterCount"); + return (Criteria) this; + } + + public Criteria andAfterCountBetween(Integer value1, Integer value2) { + addCriterion("after_count between", value1, value2, "afterCount"); + return (Criteria) this; + } + + public Criteria andAfterCountNotBetween(Integer value1, Integer value2) { + addCriterion("after_count not between", value1, value2, "afterCount"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(Date value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(Date value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(Date value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(Date value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(Date value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(Date value1, Date value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(Date value1, Date value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNull() { + addCriterion("update_time is null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNotNull() { + addCriterion("update_time is not null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeEqualTo(Date value) { + addCriterion("update_time =", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotEqualTo(Date value) { + addCriterion("update_time <>", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThan(Date value) { + addCriterion("update_time >", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) { + addCriterion("update_time >=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThan(Date value) { + addCriterion("update_time <", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThanOrEqualTo(Date value) { + addCriterion("update_time <=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIn(List values) { + addCriterion("update_time in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotIn(List values) { + addCriterion("update_time not in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeBetween(Date value1, Date value2) { + addCriterion("update_time between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotBetween(Date value1, Date value2) { + addCriterion("update_time not between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andStatusIsNull() { + addCriterion("`status` is null"); + return (Criteria) this; + } + + public Criteria andStatusIsNotNull() { + addCriterion("`status` is not null"); + return (Criteria) this; + } + + public Criteria andStatusEqualTo(Integer value) { + addCriterion("`status` =", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotEqualTo(Integer value) { + addCriterion("`status` <>", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThan(Integer value) { + addCriterion("`status` >", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThanOrEqualTo(Integer value) { + addCriterion("`status` >=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThan(Integer value) { + addCriterion("`status` <", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThanOrEqualTo(Integer value) { + addCriterion("`status` <=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusIn(List values) { + addCriterion("`status` in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotIn(List values) { + addCriterion("`status` not in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusBetween(Integer value1, Integer value2) { + addCriterion("`status` between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotBetween(Integer value1, Integer value2) { + addCriterion("`status` not between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andOpIdIsNull() { + addCriterion("op_id is null"); + return (Criteria) this; + } + + public Criteria andOpIdIsNotNull() { + addCriterion("op_id is not null"); + return (Criteria) this; + } + + public Criteria andOpIdEqualTo(Long value) { + addCriterion("op_id =", value, "opId"); + return (Criteria) this; + } + + public Criteria andOpIdNotEqualTo(Long value) { + addCriterion("op_id <>", value, "opId"); + return (Criteria) this; + } + + public Criteria andOpIdGreaterThan(Long value) { + addCriterion("op_id >", value, "opId"); + return (Criteria) this; + } + + public Criteria andOpIdGreaterThanOrEqualTo(Long value) { + addCriterion("op_id >=", value, "opId"); + return (Criteria) this; + } + + public Criteria andOpIdLessThan(Long value) { + addCriterion("op_id <", value, "opId"); + return (Criteria) this; + } + + public Criteria andOpIdLessThanOrEqualTo(Long value) { + addCriterion("op_id <=", value, "opId"); + return (Criteria) this; + } + + public Criteria andOpIdIn(List values) { + addCriterion("op_id in", values, "opId"); + return (Criteria) this; + } + + public Criteria andOpIdNotIn(List values) { + addCriterion("op_id not in", values, "opId"); + return (Criteria) this; + } + + public Criteria andOpIdBetween(Long value1, Long value2) { + addCriterion("op_id between", value1, value2, "opId"); + return (Criteria) this; + } + + public Criteria andOpIdNotBetween(Long value1, Long value2) { + addCriterion("op_id not between", value1, value2, "opId"); + return (Criteria) this; + } + + public Criteria andOpNameIsNull() { + addCriterion("op_name is null"); + return (Criteria) this; + } + + public Criteria andOpNameIsNotNull() { + addCriterion("op_name is not null"); + return (Criteria) this; + } + + public Criteria andOpNameEqualTo(String value) { + addCriterion("op_name =", value, "opName"); + return (Criteria) this; + } + + public Criteria andOpNameNotEqualTo(String value) { + addCriterion("op_name <>", value, "opName"); + return (Criteria) this; + } + + public Criteria andOpNameGreaterThan(String value) { + addCriterion("op_name >", value, "opName"); + return (Criteria) this; + } + + public Criteria andOpNameGreaterThanOrEqualTo(String value) { + addCriterion("op_name >=", value, "opName"); + return (Criteria) this; + } + + public Criteria andOpNameLessThan(String value) { + addCriterion("op_name <", value, "opName"); + return (Criteria) this; + } + + public Criteria andOpNameLessThanOrEqualTo(String value) { + addCriterion("op_name <=", value, "opName"); + return (Criteria) this; + } + + public Criteria andOpNameLike(String value) { + addCriterion("op_name like", value, "opName"); + return (Criteria) this; + } + + public Criteria andOpNameNotLike(String value) { + addCriterion("op_name not like", value, "opName"); + return (Criteria) this; + } + + public Criteria andOpNameIn(List values) { + addCriterion("op_name in", values, "opName"); + return (Criteria) this; + } + + public Criteria andOpNameNotIn(List values) { + addCriterion("op_name not in", values, "opName"); + return (Criteria) this; + } + + public Criteria andOpNameBetween(String value1, String value2) { + addCriterion("op_name between", value1, value2, "opName"); + return (Criteria) this; + } + + public Criteria andOpNameNotBetween(String value1, String value2) { + addCriterion("op_name not between", value1, value2, "opName"); + return (Criteria) this; + } + + public Criteria andExt1IsNull() { + addCriterion("ext_1 is null"); + return (Criteria) this; + } + + public Criteria andExt1IsNotNull() { + addCriterion("ext_1 is not null"); + return (Criteria) this; + } + + public Criteria andExt1EqualTo(String value) { + addCriterion("ext_1 =", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1NotEqualTo(String value) { + addCriterion("ext_1 <>", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1GreaterThan(String value) { + addCriterion("ext_1 >", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1GreaterThanOrEqualTo(String value) { + addCriterion("ext_1 >=", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1LessThan(String value) { + addCriterion("ext_1 <", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1LessThanOrEqualTo(String value) { + addCriterion("ext_1 <=", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1Like(String value) { + addCriterion("ext_1 like", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1NotLike(String value) { + addCriterion("ext_1 not like", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1In(List values) { + addCriterion("ext_1 in", values, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1NotIn(List values) { + addCriterion("ext_1 not in", values, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1Between(String value1, String value2) { + addCriterion("ext_1 between", value1, value2, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1NotBetween(String value1, String value2) { + addCriterion("ext_1 not between", value1, value2, "ext1"); + return (Criteria) this; + } + + public Criteria andExt2IsNull() { + addCriterion("ext_2 is null"); + return (Criteria) this; + } + + public Criteria andExt2IsNotNull() { + addCriterion("ext_2 is not null"); + return (Criteria) this; + } + + public Criteria andExt2EqualTo(String value) { + addCriterion("ext_2 =", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2NotEqualTo(String value) { + addCriterion("ext_2 <>", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2GreaterThan(String value) { + addCriterion("ext_2 >", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2GreaterThanOrEqualTo(String value) { + addCriterion("ext_2 >=", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2LessThan(String value) { + addCriterion("ext_2 <", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2LessThanOrEqualTo(String value) { + addCriterion("ext_2 <=", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2Like(String value) { + addCriterion("ext_2 like", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2NotLike(String value) { + addCriterion("ext_2 not like", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2In(List values) { + addCriterion("ext_2 in", values, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2NotIn(List values) { + addCriterion("ext_2 not in", values, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2Between(String value1, String value2) { + addCriterion("ext_2 between", value1, value2, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2NotBetween(String value1, String value2) { + addCriterion("ext_2 not between", value1, value2, "ext2"); + return (Criteria) this; + } + + public Criteria andExt3IsNull() { + addCriterion("ext_3 is null"); + return (Criteria) this; + } + + public Criteria andExt3IsNotNull() { + addCriterion("ext_3 is not null"); + return (Criteria) this; + } + + public Criteria andExt3EqualTo(String value) { + addCriterion("ext_3 =", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3NotEqualTo(String value) { + addCriterion("ext_3 <>", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3GreaterThan(String value) { + addCriterion("ext_3 >", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3GreaterThanOrEqualTo(String value) { + addCriterion("ext_3 >=", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3LessThan(String value) { + addCriterion("ext_3 <", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3LessThanOrEqualTo(String value) { + addCriterion("ext_3 <=", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3Like(String value) { + addCriterion("ext_3 like", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3NotLike(String value) { + addCriterion("ext_3 not like", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3In(List values) { + addCriterion("ext_3 in", values, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3NotIn(List values) { + addCriterion("ext_3 not in", values, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3Between(String value1, String value2) { + addCriterion("ext_3 between", value1, value2, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3NotBetween(String value1, String value2) { + addCriterion("ext_3 not between", value1, value2, "ext3"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/hai-service/src/main/java/com/hai/entity/HighDiscountPackageAgentRel.java b/hai-service/src/main/java/com/hai/entity/HighDiscountPackageAgentRel.java new file mode 100644 index 00000000..a56abe45 --- /dev/null +++ b/hai-service/src/main/java/com/hai/entity/HighDiscountPackageAgentRel.java @@ -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(); + } +} \ No newline at end of file diff --git a/hai-service/src/main/java/com/hai/entity/HighDiscountPackageAgentRelExample.java b/hai-service/src/main/java/com/hai/entity/HighDiscountPackageAgentRelExample.java new file mode 100644 index 00000000..6f5e1b2d --- /dev/null +++ b/hai-service/src/main/java/com/hai/entity/HighDiscountPackageAgentRelExample.java @@ -0,0 +1,1183 @@ +package com.hai.entity; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class HighDiscountPackageAgentRelExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public HighDiscountPackageAgentRelExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andDiscountPackageTitleIsNull() { + addCriterion("discount_package_title is null"); + return (Criteria) this; + } + + public Criteria andDiscountPackageTitleIsNotNull() { + addCriterion("discount_package_title is not null"); + return (Criteria) this; + } + + public Criteria andDiscountPackageTitleEqualTo(String value) { + addCriterion("discount_package_title =", value, "discountPackageTitle"); + return (Criteria) this; + } + + public Criteria andDiscountPackageTitleNotEqualTo(String value) { + addCriterion("discount_package_title <>", value, "discountPackageTitle"); + return (Criteria) this; + } + + public Criteria andDiscountPackageTitleGreaterThan(String value) { + addCriterion("discount_package_title >", value, "discountPackageTitle"); + return (Criteria) this; + } + + public Criteria andDiscountPackageTitleGreaterThanOrEqualTo(String value) { + addCriterion("discount_package_title >=", value, "discountPackageTitle"); + return (Criteria) this; + } + + public Criteria andDiscountPackageTitleLessThan(String value) { + addCriterion("discount_package_title <", value, "discountPackageTitle"); + return (Criteria) this; + } + + public Criteria andDiscountPackageTitleLessThanOrEqualTo(String value) { + addCriterion("discount_package_title <=", value, "discountPackageTitle"); + return (Criteria) this; + } + + public Criteria andDiscountPackageTitleLike(String value) { + addCriterion("discount_package_title like", value, "discountPackageTitle"); + return (Criteria) this; + } + + public Criteria andDiscountPackageTitleNotLike(String value) { + addCriterion("discount_package_title not like", value, "discountPackageTitle"); + return (Criteria) this; + } + + public Criteria andDiscountPackageTitleIn(List values) { + addCriterion("discount_package_title in", values, "discountPackageTitle"); + return (Criteria) this; + } + + public Criteria andDiscountPackageTitleNotIn(List values) { + addCriterion("discount_package_title not in", values, "discountPackageTitle"); + return (Criteria) this; + } + + public Criteria andDiscountPackageTitleBetween(String value1, String value2) { + addCriterion("discount_package_title between", value1, value2, "discountPackageTitle"); + return (Criteria) this; + } + + public Criteria andDiscountPackageTitleNotBetween(String value1, String value2) { + addCriterion("discount_package_title not between", value1, value2, "discountPackageTitle"); + return (Criteria) this; + } + + public Criteria andDiscountPackageIdIsNull() { + addCriterion("discount_package_id is null"); + return (Criteria) this; + } + + public Criteria andDiscountPackageIdIsNotNull() { + addCriterion("discount_package_id is not null"); + return (Criteria) this; + } + + public Criteria andDiscountPackageIdEqualTo(Long value) { + addCriterion("discount_package_id =", value, "discountPackageId"); + return (Criteria) this; + } + + public Criteria andDiscountPackageIdNotEqualTo(Long value) { + addCriterion("discount_package_id <>", value, "discountPackageId"); + return (Criteria) this; + } + + public Criteria andDiscountPackageIdGreaterThan(Long value) { + addCriterion("discount_package_id >", value, "discountPackageId"); + return (Criteria) this; + } + + public Criteria andDiscountPackageIdGreaterThanOrEqualTo(Long value) { + addCriterion("discount_package_id >=", value, "discountPackageId"); + return (Criteria) this; + } + + public Criteria andDiscountPackageIdLessThan(Long value) { + addCriterion("discount_package_id <", value, "discountPackageId"); + return (Criteria) this; + } + + public Criteria andDiscountPackageIdLessThanOrEqualTo(Long value) { + addCriterion("discount_package_id <=", value, "discountPackageId"); + return (Criteria) this; + } + + public Criteria andDiscountPackageIdIn(List values) { + addCriterion("discount_package_id in", values, "discountPackageId"); + return (Criteria) this; + } + + public Criteria andDiscountPackageIdNotIn(List values) { + addCriterion("discount_package_id not in", values, "discountPackageId"); + return (Criteria) this; + } + + public Criteria andDiscountPackageIdBetween(Long value1, Long value2) { + addCriterion("discount_package_id between", value1, value2, "discountPackageId"); + return (Criteria) this; + } + + public Criteria andDiscountPackageIdNotBetween(Long value1, Long value2) { + addCriterion("discount_package_id not between", value1, value2, "discountPackageId"); + return (Criteria) this; + } + + public Criteria andAgentNameIsNull() { + addCriterion("agent_name is null"); + return (Criteria) this; + } + + public Criteria andAgentNameIsNotNull() { + addCriterion("agent_name is not null"); + return (Criteria) this; + } + + public Criteria andAgentNameEqualTo(String value) { + addCriterion("agent_name =", value, "agentName"); + return (Criteria) this; + } + + public Criteria andAgentNameNotEqualTo(String value) { + addCriterion("agent_name <>", value, "agentName"); + return (Criteria) this; + } + + public Criteria andAgentNameGreaterThan(String value) { + addCriterion("agent_name >", value, "agentName"); + return (Criteria) this; + } + + public Criteria andAgentNameGreaterThanOrEqualTo(String value) { + addCriterion("agent_name >=", value, "agentName"); + return (Criteria) this; + } + + public Criteria andAgentNameLessThan(String value) { + addCriterion("agent_name <", value, "agentName"); + return (Criteria) this; + } + + public Criteria andAgentNameLessThanOrEqualTo(String value) { + addCriterion("agent_name <=", value, "agentName"); + return (Criteria) this; + } + + public Criteria andAgentNameLike(String value) { + addCriterion("agent_name like", value, "agentName"); + return (Criteria) this; + } + + public Criteria andAgentNameNotLike(String value) { + addCriterion("agent_name not like", value, "agentName"); + return (Criteria) this; + } + + public Criteria andAgentNameIn(List values) { + addCriterion("agent_name in", values, "agentName"); + return (Criteria) this; + } + + public Criteria andAgentNameNotIn(List values) { + addCriterion("agent_name not in", values, "agentName"); + return (Criteria) this; + } + + public Criteria andAgentNameBetween(String value1, String value2) { + addCriterion("agent_name between", value1, value2, "agentName"); + return (Criteria) this; + } + + public Criteria andAgentNameNotBetween(String value1, String value2) { + addCriterion("agent_name not between", value1, value2, "agentName"); + return (Criteria) this; + } + + public Criteria andAgentIdIsNull() { + addCriterion("agent_id is null"); + return (Criteria) this; + } + + public Criteria andAgentIdIsNotNull() { + addCriterion("agent_id is not null"); + return (Criteria) this; + } + + public Criteria andAgentIdEqualTo(Long value) { + addCriterion("agent_id =", value, "agentId"); + return (Criteria) this; + } + + public Criteria andAgentIdNotEqualTo(Long value) { + addCriterion("agent_id <>", value, "agentId"); + return (Criteria) this; + } + + public Criteria andAgentIdGreaterThan(Long value) { + addCriterion("agent_id >", value, "agentId"); + return (Criteria) this; + } + + public Criteria andAgentIdGreaterThanOrEqualTo(Long value) { + addCriterion("agent_id >=", value, "agentId"); + return (Criteria) this; + } + + public Criteria andAgentIdLessThan(Long value) { + addCriterion("agent_id <", value, "agentId"); + return (Criteria) this; + } + + public Criteria andAgentIdLessThanOrEqualTo(Long value) { + addCriterion("agent_id <=", value, "agentId"); + return (Criteria) this; + } + + public Criteria andAgentIdIn(List values) { + addCriterion("agent_id in", values, "agentId"); + return (Criteria) this; + } + + public Criteria andAgentIdNotIn(List values) { + addCriterion("agent_id not in", values, "agentId"); + return (Criteria) this; + } + + public Criteria andAgentIdBetween(Long value1, Long value2) { + addCriterion("agent_id between", value1, value2, "agentId"); + return (Criteria) this; + } + + public Criteria andAgentIdNotBetween(Long value1, Long value2) { + addCriterion("agent_id not between", value1, value2, "agentId"); + return (Criteria) this; + } + + public Criteria andStockCountIsNull() { + addCriterion("stock_count is null"); + return (Criteria) this; + } + + public Criteria andStockCountIsNotNull() { + addCriterion("stock_count is not null"); + return (Criteria) this; + } + + public Criteria andStockCountEqualTo(Integer value) { + addCriterion("stock_count =", value, "stockCount"); + return (Criteria) this; + } + + public Criteria andStockCountNotEqualTo(Integer value) { + addCriterion("stock_count <>", value, "stockCount"); + return (Criteria) this; + } + + public Criteria andStockCountGreaterThan(Integer value) { + addCriterion("stock_count >", value, "stockCount"); + return (Criteria) this; + } + + public Criteria andStockCountGreaterThanOrEqualTo(Integer value) { + addCriterion("stock_count >=", value, "stockCount"); + return (Criteria) this; + } + + public Criteria andStockCountLessThan(Integer value) { + addCriterion("stock_count <", value, "stockCount"); + return (Criteria) this; + } + + public Criteria andStockCountLessThanOrEqualTo(Integer value) { + addCriterion("stock_count <=", value, "stockCount"); + return (Criteria) this; + } + + public Criteria andStockCountIn(List values) { + addCriterion("stock_count in", values, "stockCount"); + return (Criteria) this; + } + + public Criteria andStockCountNotIn(List values) { + addCriterion("stock_count not in", values, "stockCount"); + return (Criteria) this; + } + + public Criteria andStockCountBetween(Integer value1, Integer value2) { + addCriterion("stock_count between", value1, value2, "stockCount"); + return (Criteria) this; + } + + public Criteria andStockCountNotBetween(Integer value1, Integer value2) { + addCriterion("stock_count not between", value1, value2, "stockCount"); + return (Criteria) this; + } + + public Criteria andSalesCountIsNull() { + addCriterion("sales_count is null"); + return (Criteria) this; + } + + public Criteria andSalesCountIsNotNull() { + addCriterion("sales_count is not null"); + return (Criteria) this; + } + + public Criteria andSalesCountEqualTo(Integer value) { + addCriterion("sales_count =", value, "salesCount"); + return (Criteria) this; + } + + public Criteria andSalesCountNotEqualTo(Integer value) { + addCriterion("sales_count <>", value, "salesCount"); + return (Criteria) this; + } + + public Criteria andSalesCountGreaterThan(Integer value) { + addCriterion("sales_count >", value, "salesCount"); + return (Criteria) this; + } + + public Criteria andSalesCountGreaterThanOrEqualTo(Integer value) { + addCriterion("sales_count >=", value, "salesCount"); + return (Criteria) this; + } + + public Criteria andSalesCountLessThan(Integer value) { + addCriterion("sales_count <", value, "salesCount"); + return (Criteria) this; + } + + public Criteria andSalesCountLessThanOrEqualTo(Integer value) { + addCriterion("sales_count <=", value, "salesCount"); + return (Criteria) this; + } + + public Criteria andSalesCountIn(List values) { + addCriterion("sales_count in", values, "salesCount"); + return (Criteria) this; + } + + public Criteria andSalesCountNotIn(List values) { + addCriterion("sales_count not in", values, "salesCount"); + return (Criteria) this; + } + + public Criteria andSalesCountBetween(Integer value1, Integer value2) { + addCriterion("sales_count between", value1, value2, "salesCount"); + return (Criteria) this; + } + + public Criteria andSalesCountNotBetween(Integer value1, Integer value2) { + addCriterion("sales_count not between", value1, value2, "salesCount"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(Date value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(Date value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(Date value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(Date value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(Date value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(Date value1, Date value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(Date value1, Date value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNull() { + addCriterion("update_time is null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNotNull() { + addCriterion("update_time is not null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeEqualTo(Date value) { + addCriterion("update_time =", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotEqualTo(Date value) { + addCriterion("update_time <>", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThan(Date value) { + addCriterion("update_time >", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) { + addCriterion("update_time >=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThan(Date value) { + addCriterion("update_time <", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThanOrEqualTo(Date value) { + addCriterion("update_time <=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIn(List values) { + addCriterion("update_time in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotIn(List values) { + addCriterion("update_time not in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeBetween(Date value1, Date value2) { + addCriterion("update_time between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotBetween(Date value1, Date value2) { + addCriterion("update_time not between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andStatusIsNull() { + addCriterion("`status` is null"); + return (Criteria) this; + } + + public Criteria andStatusIsNotNull() { + addCriterion("`status` is not null"); + return (Criteria) this; + } + + public Criteria andStatusEqualTo(Integer value) { + addCriterion("`status` =", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotEqualTo(Integer value) { + addCriterion("`status` <>", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThan(Integer value) { + addCriterion("`status` >", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThanOrEqualTo(Integer value) { + addCriterion("`status` >=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThan(Integer value) { + addCriterion("`status` <", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThanOrEqualTo(Integer value) { + addCriterion("`status` <=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusIn(List values) { + addCriterion("`status` in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotIn(List values) { + addCriterion("`status` not in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusBetween(Integer value1, Integer value2) { + addCriterion("`status` between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotBetween(Integer value1, Integer value2) { + addCriterion("`status` not between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andOpIdIsNull() { + addCriterion("op_id is null"); + return (Criteria) this; + } + + public Criteria andOpIdIsNotNull() { + addCriterion("op_id is not null"); + return (Criteria) this; + } + + public Criteria andOpIdEqualTo(Long value) { + addCriterion("op_id =", value, "opId"); + return (Criteria) this; + } + + public Criteria andOpIdNotEqualTo(Long value) { + addCriterion("op_id <>", value, "opId"); + return (Criteria) this; + } + + public Criteria andOpIdGreaterThan(Long value) { + addCriterion("op_id >", value, "opId"); + return (Criteria) this; + } + + public Criteria andOpIdGreaterThanOrEqualTo(Long value) { + addCriterion("op_id >=", value, "opId"); + return (Criteria) this; + } + + public Criteria andOpIdLessThan(Long value) { + addCriterion("op_id <", value, "opId"); + return (Criteria) this; + } + + public Criteria andOpIdLessThanOrEqualTo(Long value) { + addCriterion("op_id <=", value, "opId"); + return (Criteria) this; + } + + public Criteria andOpIdIn(List values) { + addCriterion("op_id in", values, "opId"); + return (Criteria) this; + } + + public Criteria andOpIdNotIn(List values) { + addCriterion("op_id not in", values, "opId"); + return (Criteria) this; + } + + public Criteria andOpIdBetween(Long value1, Long value2) { + addCriterion("op_id between", value1, value2, "opId"); + return (Criteria) this; + } + + public Criteria andOpIdNotBetween(Long value1, Long value2) { + addCriterion("op_id not between", value1, value2, "opId"); + return (Criteria) this; + } + + public Criteria andOpNameIsNull() { + addCriterion("op_name is null"); + return (Criteria) this; + } + + public Criteria andOpNameIsNotNull() { + addCriterion("op_name is not null"); + return (Criteria) this; + } + + public Criteria andOpNameEqualTo(String value) { + addCriterion("op_name =", value, "opName"); + return (Criteria) this; + } + + public Criteria andOpNameNotEqualTo(String value) { + addCriterion("op_name <>", value, "opName"); + return (Criteria) this; + } + + public Criteria andOpNameGreaterThan(String value) { + addCriterion("op_name >", value, "opName"); + return (Criteria) this; + } + + public Criteria andOpNameGreaterThanOrEqualTo(String value) { + addCriterion("op_name >=", value, "opName"); + return (Criteria) this; + } + + public Criteria andOpNameLessThan(String value) { + addCriterion("op_name <", value, "opName"); + return (Criteria) this; + } + + public Criteria andOpNameLessThanOrEqualTo(String value) { + addCriterion("op_name <=", value, "opName"); + return (Criteria) this; + } + + public Criteria andOpNameLike(String value) { + addCriterion("op_name like", value, "opName"); + return (Criteria) this; + } + + public Criteria andOpNameNotLike(String value) { + addCriterion("op_name not like", value, "opName"); + return (Criteria) this; + } + + public Criteria andOpNameIn(List values) { + addCriterion("op_name in", values, "opName"); + return (Criteria) this; + } + + public Criteria andOpNameNotIn(List values) { + addCriterion("op_name not in", values, "opName"); + return (Criteria) this; + } + + public Criteria andOpNameBetween(String value1, String value2) { + addCriterion("op_name between", value1, value2, "opName"); + return (Criteria) this; + } + + public Criteria andOpNameNotBetween(String value1, String value2) { + addCriterion("op_name not between", value1, value2, "opName"); + return (Criteria) this; + } + + public Criteria andExt1IsNull() { + addCriterion("ext_1 is null"); + return (Criteria) this; + } + + public Criteria andExt1IsNotNull() { + addCriterion("ext_1 is not null"); + return (Criteria) this; + } + + public Criteria andExt1EqualTo(String value) { + addCriterion("ext_1 =", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1NotEqualTo(String value) { + addCriterion("ext_1 <>", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1GreaterThan(String value) { + addCriterion("ext_1 >", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1GreaterThanOrEqualTo(String value) { + addCriterion("ext_1 >=", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1LessThan(String value) { + addCriterion("ext_1 <", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1LessThanOrEqualTo(String value) { + addCriterion("ext_1 <=", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1Like(String value) { + addCriterion("ext_1 like", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1NotLike(String value) { + addCriterion("ext_1 not like", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1In(List values) { + addCriterion("ext_1 in", values, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1NotIn(List values) { + addCriterion("ext_1 not in", values, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1Between(String value1, String value2) { + addCriterion("ext_1 between", value1, value2, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1NotBetween(String value1, String value2) { + addCriterion("ext_1 not between", value1, value2, "ext1"); + return (Criteria) this; + } + + public Criteria andExt2IsNull() { + addCriterion("ext_2 is null"); + return (Criteria) this; + } + + public Criteria andExt2IsNotNull() { + addCriterion("ext_2 is not null"); + return (Criteria) this; + } + + public Criteria andExt2EqualTo(String value) { + addCriterion("ext_2 =", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2NotEqualTo(String value) { + addCriterion("ext_2 <>", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2GreaterThan(String value) { + addCriterion("ext_2 >", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2GreaterThanOrEqualTo(String value) { + addCriterion("ext_2 >=", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2LessThan(String value) { + addCriterion("ext_2 <", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2LessThanOrEqualTo(String value) { + addCriterion("ext_2 <=", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2Like(String value) { + addCriterion("ext_2 like", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2NotLike(String value) { + addCriterion("ext_2 not like", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2In(List values) { + addCriterion("ext_2 in", values, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2NotIn(List values) { + addCriterion("ext_2 not in", values, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2Between(String value1, String value2) { + addCriterion("ext_2 between", value1, value2, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2NotBetween(String value1, String value2) { + addCriterion("ext_2 not between", value1, value2, "ext2"); + return (Criteria) this; + } + + public Criteria andExt3IsNull() { + addCriterion("ext_3 is null"); + return (Criteria) this; + } + + public Criteria andExt3IsNotNull() { + addCriterion("ext_3 is not null"); + return (Criteria) this; + } + + public Criteria andExt3EqualTo(String value) { + addCriterion("ext_3 =", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3NotEqualTo(String value) { + addCriterion("ext_3 <>", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3GreaterThan(String value) { + addCriterion("ext_3 >", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3GreaterThanOrEqualTo(String value) { + addCriterion("ext_3 >=", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3LessThan(String value) { + addCriterion("ext_3 <", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3LessThanOrEqualTo(String value) { + addCriterion("ext_3 <=", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3Like(String value) { + addCriterion("ext_3 like", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3NotLike(String value) { + addCriterion("ext_3 not like", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3In(List values) { + addCriterion("ext_3 in", values, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3NotIn(List values) { + addCriterion("ext_3 not in", values, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3Between(String value1, String value2) { + addCriterion("ext_3 between", value1, value2, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3NotBetween(String value1, String value2) { + addCriterion("ext_3 not between", value1, value2, "ext3"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/hai-service/src/main/java/com/hai/openApi/service/ApiBlxCouponService.java b/hai-service/src/main/java/com/hai/openApi/service/ApiBlxCouponService.java index ad014e4f..ca09d2ff 100644 --- a/hai-service/src/main/java/com/hai/openApi/service/ApiBlxCouponService.java +++ b/hai-service/src/main/java/com/hai/openApi/service/ApiBlxCouponService.java @@ -77,4 +77,14 @@ public interface ApiBlxCouponService { * @return com.hai.entity.ApiBlxOrder */ ApiBlxOrder findOrderByMap(Map map); + + /** + * @Author Sum1Dream + * @Name findOrderByMap + * @Description // 根据条件查询停车订单 + * @Date 15:10 2023/9/1 + * @Param map + * @return com.hai.entity.ApiBlxOrder + */ + List getOrderByList(Map map); } diff --git a/hai-service/src/main/java/com/hai/openApi/service/impl/ApiBlxCouponServiceImpl.java b/hai-service/src/main/java/com/hai/openApi/service/impl/ApiBlxCouponServiceImpl.java index 995facb7..cd567ca3 100644 --- a/hai-service/src/main/java/com/hai/openApi/service/impl/ApiBlxCouponServiceImpl.java +++ b/hai-service/src/main/java/com/hai/openApi/service/impl/ApiBlxCouponServiceImpl.java @@ -89,6 +89,9 @@ public class ApiBlxCouponServiceImpl implements ApiBlxCouponService { if (MapUtils.getString(map , "parkOrderId") != null) { criteria.andParkOrderIdEqualTo(MapUtils.getString(map , "parkOrderId")); } + if (MapUtils.getInteger(map , "status") != null) { + criteria.andOrderStatusEqualTo(MapUtils.getInteger(map , "status")); + } List list = apiBlxOrderMapper.selectByExample(example); @@ -99,5 +102,30 @@ public class ApiBlxCouponServiceImpl implements ApiBlxCouponService { return null; } + @Override + public List getOrderByList(Map 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); + } } diff --git a/hai-service/src/main/java/com/hai/order/service/impl/OrderCreateHandleServiceImpl.java b/hai-service/src/main/java/com/hai/order/service/impl/OrderCreateHandleServiceImpl.java index b6671aef..211992b7 100644 --- a/hai-service/src/main/java/com/hai/order/service/impl/OrderCreateHandleServiceImpl.java +++ b/hai-service/src/main/java/com/hai/order/service/impl/OrderCreateHandleServiceImpl.java @@ -1058,6 +1058,8 @@ public class OrderCreateHandleServiceImpl implements OrderCreateHandleService { apiBlxOrder.setCarNo(createOrderChildModel.getCarNo()); apiBlxOrder.setCarSeatId(createOrderChildModel.getCarSeatId()); apiBlxOrder.setOrderNo(order.getOrderNo()); + apiBlxOrder.setUserId(order.getMemId()); + apiBlxOrder.setUserPhone(order.getMemPhone()); apiBlxOrder.setOrderStatus(4); apiBlxCouponService.insertBlxOrder(apiBlxOrder); diff --git a/hai-service/src/main/java/com/hai/order/service/impl/OrderPaySuccessServiceImpl.java b/hai-service/src/main/java/com/hai/order/service/impl/OrderPaySuccessServiceImpl.java index abf4b634..2edc8d81 100644 --- a/hai-service/src/main/java/com/hai/order/service/impl/OrderPaySuccessServiceImpl.java +++ b/hai-service/src/main/java/com/hai/order/service/impl/OrderPaySuccessServiceImpl.java @@ -573,6 +573,12 @@ public class OrderPaySuccessServiceImpl implements OrderPaySuccessService { for (HighChildOrder childOrder : order.getHighChildOrderList()) { childOrder.setChildOrderStatus(OrderChildStatus.STATUS3.getNumber()); } + + apiBlxOrder.setOrderStatus(5); + apiBlxOrder.setPayPrice(order.getPayPrice()); + apiBlxOrder.setUpdateTime(new Date()); + apiBlxCouponService.editBlxOrder(apiBlxOrder); + orderService.updateOrderData(order); } } diff --git a/hai-service/src/main/java/com/hai/service/HighDiscountPackageAgentService.java b/hai-service/src/main/java/com/hai/service/HighDiscountPackageAgentService.java new file mode 100644 index 00000000..625a931d --- /dev/null +++ b/hai-service/src/main/java/com/hai/service/HighDiscountPackageAgentService.java @@ -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 map); + + /** + * @Author Sum1Dream + * @Name getListRel + * @Description // 查询列表 + * @Date 11:27 2023/9/20 + * @Param param + * @return java.util.List + */ + List getListRel(Map 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 map); + + /** + * @Author Sum1Dream + * @Name getListRecord + * @Description // 查询列表 + * @Date 13:59 2023/9/20 + * @Param param + * @return java.util.List + */ + List getListRecord(Map param); + +} diff --git a/hai-service/src/main/java/com/hai/service/impl/HighDiscountPackageAgentServiceImpl.java b/hai-service/src/main/java/com/hai/service/impl/HighDiscountPackageAgentServiceImpl.java new file mode 100644 index 00000000..42c9f39f --- /dev/null +++ b/hai-service/src/main/java/com/hai/service/impl/HighDiscountPackageAgentServiceImpl.java @@ -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 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 list = discountPackageAgentRelMapper.selectByExample(example); + + if (list.size() > 0) { + return list.get(0); + } + + return null; + } + + @Override + public List getListRel(Map 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 map) { + return null; + } + + @Override + public List getListRecord(Map 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); + } +}