parent
592d4521b3
commit
6c1848e645
@ -0,0 +1,200 @@ |
||||
package com.cweb.controller.goods; |
||||
|
||||
import com.hfkj.common.exception.ErrorCode; |
||||
import com.hfkj.common.exception.ErrorHelp; |
||||
import com.hfkj.common.exception.SysCode; |
||||
import com.hfkj.common.security.UserCenter; |
||||
import com.hfkj.common.utils.ResponseMsgUtil; |
||||
import com.hfkj.entity.GoodsUserAddress; |
||||
import com.hfkj.model.ResponseData; |
||||
import com.hfkj.model.UserSessionObject; |
||||
import com.hfkj.service.goods.GoodsUserAddressService; |
||||
import io.swagger.annotations.Api; |
||||
import io.swagger.annotations.ApiOperation; |
||||
import org.slf4j.Logger; |
||||
import org.slf4j.LoggerFactory; |
||||
import org.springframework.stereotype.Controller; |
||||
import org.springframework.web.bind.annotation.*; |
||||
|
||||
import javax.annotation.Resource; |
||||
import java.util.*; |
||||
|
||||
@Controller |
||||
@RequestMapping(value = "/deliveryAddress") |
||||
@Api(value = "收货地址") |
||||
public class DeliveryAddressController { |
||||
Logger log = LoggerFactory.getLogger(DeliveryAddressController.class); |
||||
@Resource |
||||
private GoodsUserAddressService deliveryAddressService; |
||||
|
||||
@Resource |
||||
private UserCenter userCenter; |
||||
|
||||
|
||||
@RequestMapping(value = "/getDeliveryAddressList", method = RequestMethod.GET) |
||||
@ResponseBody |
||||
@ApiOperation(value = "查询收货地址列表") |
||||
public ResponseData getDeliveryAddressList() { |
||||
try { |
||||
|
||||
// 用户session
|
||||
UserSessionObject userSession = userCenter.getSessionModel(UserSessionObject.class); |
||||
|
||||
Map<String, Object> map = new HashMap<>(); |
||||
|
||||
map.put("userId", userSession.getUser().getId()); |
||||
|
||||
return ResponseMsgUtil.success(deliveryAddressService.getList(map)); |
||||
|
||||
} catch (Exception e) { |
||||
log.error("GoodsDetailController --> getListUser() error!", e); |
||||
return ResponseMsgUtil.exception(e); |
||||
} |
||||
} |
||||
|
||||
|
||||
@RequestMapping(value = "/insertDeliveryAddress", method = RequestMethod.POST) |
||||
@ResponseBody |
||||
@ApiOperation(value = "新增收货地址") |
||||
public ResponseData insertDeliveryAddress(@RequestBody GoodsUserAddress deliveryAddress) { |
||||
try { |
||||
|
||||
// 用户session
|
||||
UserSessionObject userSession = userCenter.getSessionModel(UserSessionObject.class); |
||||
|
||||
Map<String, Object> map = new HashMap<>(); |
||||
|
||||
map.put("userId", userSession.getUser().getId()); |
||||
List<GoodsUserAddress> list = deliveryAddressService.getList(map); |
||||
|
||||
if (list.size() == 0) { |
||||
deliveryAddress.setWhetherDefault(true); |
||||
} |
||||
|
||||
if (deliveryAddress == null || |
||||
deliveryAddress.getAddress() == null || |
||||
deliveryAddress.getWhetherDefault() == null || |
||||
deliveryAddress.getConsignee() == null || |
||||
deliveryAddress.getPhone() == null || |
||||
deliveryAddress.getRegionName() == null || |
||||
deliveryAddress.getRegionId() == null |
||||
) { |
||||
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); |
||||
} |
||||
|
||||
deliveryAddress.setUserId(userSession.getUser().getId()); |
||||
deliveryAddress.setCreateTime(new Date()); |
||||
deliveryAddress.setUpdateTime(new Date()); |
||||
deliveryAddressService.create(deliveryAddress); |
||||
|
||||
|
||||
|
||||
return ResponseMsgUtil.success("新增成功"); |
||||
|
||||
} catch (Exception e) { |
||||
log.error("GoodsDetailController --> insertPrice() error!", e); |
||||
return ResponseMsgUtil.exception(e); |
||||
} |
||||
} |
||||
|
||||
@RequestMapping(value = "/updateDeliveryAddress", method = RequestMethod.POST) |
||||
@ResponseBody |
||||
@ApiOperation(value = "修改收货地址") |
||||
public ResponseData updateDeliveryAddress(@RequestBody GoodsUserAddress deliveryAddress) { |
||||
try { |
||||
|
||||
// 用户session
|
||||
UserSessionObject userSession = userCenter.getSessionModel(UserSessionObject.class); |
||||
|
||||
if (deliveryAddress == null || |
||||
deliveryAddress.getId() == null || |
||||
deliveryAddress.getAddress() == null || |
||||
deliveryAddress.getWhetherDefault() == null || |
||||
deliveryAddress.getConsignee() == null || |
||||
deliveryAddress.getPhone() == null || |
||||
deliveryAddress.getRegionName() == null || |
||||
deliveryAddress.getRegionId() == null |
||||
) { |
||||
log.error("GoodsDetailController -> insertProduct() error!"); |
||||
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); |
||||
} |
||||
|
||||
if (deliveryAddress.getWhetherDefault()) { |
||||
deliveryAddressService.cleanDeliveryAddressDefault(userSession.getUser().getId()); |
||||
} |
||||
|
||||
GoodsUserAddress goodsDeliveryAddress = deliveryAddressService.queryDetail(deliveryAddress.getId()); |
||||
|
||||
if (goodsDeliveryAddress == null) { |
||||
log.error("GoodsDetailController -> insertProduct() error!"); |
||||
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "当前收货地址异常!"); |
||||
} |
||||
|
||||
deliveryAddress.setUserId(userSession.getUser().getId()); |
||||
deliveryAddress.setCreateTime(goodsDeliveryAddress.getCreateTime()); |
||||
deliveryAddress.setUpdateTime(new Date()); |
||||
deliveryAddressService.update(deliveryAddress); |
||||
|
||||
return ResponseMsgUtil.success("修改成功"); |
||||
|
||||
} catch (Exception e) { |
||||
log.error("GoodsDetailController --> insertPrice() error!", e); |
||||
return ResponseMsgUtil.exception(e); |
||||
} |
||||
} |
||||
|
||||
@RequestMapping(value = "/findDeliveryAddressById", method = RequestMethod.GET) |
||||
@ResponseBody |
||||
@ApiOperation(value = "查询收货地址详情") |
||||
public ResponseData findDeliveryAddressById( |
||||
@RequestParam(value = "id", required = true) Long id |
||||
) { |
||||
try { |
||||
|
||||
GoodsUserAddress deliveryAddress = deliveryAddressService.queryDetail(id); |
||||
|
||||
if (deliveryAddress == null) { |
||||
log.error("GoodsDetailController -> findGoodsDetailById() error!"); |
||||
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到相信息"); |
||||
} |
||||
|
||||
return ResponseMsgUtil.success(deliveryAddress); |
||||
|
||||
} catch (Exception e) { |
||||
log.error("GoodsDetailController --> findGoodsDetailById() error!", e); |
||||
return ResponseMsgUtil.exception(e); |
||||
} |
||||
} |
||||
|
||||
@RequestMapping(value = "/deleteDeliveryAddress", method = RequestMethod.GET) |
||||
@ResponseBody |
||||
@ApiOperation(value = "删除删除收货地址") |
||||
public ResponseData deleteDeliveryAddress( |
||||
@RequestParam(value = "id", required = true) Long id) { |
||||
try { |
||||
// 用户session
|
||||
UserSessionObject userSession = userCenter.getSessionModel(UserSessionObject.class); |
||||
|
||||
GoodsUserAddress deliveryAddress = deliveryAddressService.queryDetail(id); |
||||
|
||||
if (deliveryAddress == null) { |
||||
log.error("GoodsDetailController -> findGoodsDetailById() error!"); |
||||
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到相关信息"); |
||||
} |
||||
|
||||
if (!Objects.equals(userSession.getUser().getId(), deliveryAddress.getUserId())) { |
||||
log.error("GoodsDetailController -> findGoodsDetailById() error!"); |
||||
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "用户信息错误"); |
||||
} |
||||
|
||||
deliveryAddressService.delete(id); |
||||
|
||||
return ResponseMsgUtil.success("删除成功"); |
||||
|
||||
} catch (Exception e) { |
||||
log.error("GoodsDetailController --> findGoodsDetailById() error!", e); |
||||
return ResponseMsgUtil.exception(e); |
||||
} |
||||
} |
||||
|
||||
} |
@ -0,0 +1,91 @@ |
||||
package com.hfkj.dao; |
||||
|
||||
import com.hfkj.entity.BsCity; |
||||
import com.hfkj.entity.BsCityExample; |
||||
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.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 BsCityMapper extends BsCityMapperExt { |
||||
@SelectProvider(type=BsCitySqlProvider.class, method="countByExample") |
||||
long countByExample(BsCityExample example); |
||||
|
||||
@DeleteProvider(type=BsCitySqlProvider.class, method="deleteByExample") |
||||
int deleteByExample(BsCityExample example); |
||||
|
||||
@Delete({ |
||||
"delete from bs_city", |
||||
"where region_id = #{regionId,jdbcType=BIGINT}" |
||||
}) |
||||
int deleteByPrimaryKey(Long regionId); |
||||
|
||||
@Insert({ |
||||
"insert into bs_city (region_id, region_name, ", |
||||
"parent_id, `status`)", |
||||
"values (#{regionId,jdbcType=BIGINT}, #{regionName,jdbcType=VARCHAR}, ", |
||||
"#{parentId,jdbcType=BIGINT}, #{status,jdbcType=INTEGER})" |
||||
}) |
||||
int insert(BsCity record); |
||||
|
||||
@InsertProvider(type=BsCitySqlProvider.class, method="insertSelective") |
||||
int insertSelective(BsCity record); |
||||
|
||||
@SelectProvider(type=BsCitySqlProvider.class, method="selectByExample") |
||||
@Results({ |
||||
@Result(column="region_id", property="regionId", jdbcType=JdbcType.BIGINT, id=true), |
||||
@Result(column="region_name", property="regionName", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="parent_id", property="parentId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER) |
||||
}) |
||||
List<BsCity> selectByExample(BsCityExample example); |
||||
|
||||
@Select({ |
||||
"select", |
||||
"region_id, region_name, parent_id, `status`", |
||||
"from bs_city", |
||||
"where region_id = #{regionId,jdbcType=BIGINT}" |
||||
}) |
||||
@Results({ |
||||
@Result(column="region_id", property="regionId", jdbcType=JdbcType.BIGINT, id=true), |
||||
@Result(column="region_name", property="regionName", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="parent_id", property="parentId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER) |
||||
}) |
||||
BsCity selectByPrimaryKey(Long regionId); |
||||
|
||||
@UpdateProvider(type=BsCitySqlProvider.class, method="updateByExampleSelective") |
||||
int updateByExampleSelective(@Param("record") BsCity record, @Param("example") BsCityExample example); |
||||
|
||||
@UpdateProvider(type=BsCitySqlProvider.class, method="updateByExample") |
||||
int updateByExample(@Param("record") BsCity record, @Param("example") BsCityExample example); |
||||
|
||||
@UpdateProvider(type=BsCitySqlProvider.class, method="updateByPrimaryKeySelective") |
||||
int updateByPrimaryKeySelective(BsCity record); |
||||
|
||||
@Update({ |
||||
"update bs_city", |
||||
"set region_name = #{regionName,jdbcType=VARCHAR},", |
||||
"parent_id = #{parentId,jdbcType=BIGINT},", |
||||
"`status` = #{status,jdbcType=INTEGER}", |
||||
"where region_id = #{regionId,jdbcType=BIGINT}" |
||||
}) |
||||
int updateByPrimaryKey(BsCity record); |
||||
} |
@ -0,0 +1,7 @@ |
||||
package com.hfkj.dao; |
||||
|
||||
/** |
||||
* mapper扩展类 |
||||
*/ |
||||
public interface BsCityMapperExt { |
||||
} |
@ -0,0 +1,224 @@ |
||||
package com.hfkj.dao; |
||||
|
||||
import com.hfkj.entity.BsCity; |
||||
import com.hfkj.entity.BsCityExample.Criteria; |
||||
import com.hfkj.entity.BsCityExample.Criterion; |
||||
import com.hfkj.entity.BsCityExample; |
||||
import java.util.List; |
||||
import java.util.Map; |
||||
import org.apache.ibatis.jdbc.SQL; |
||||
|
||||
public class BsCitySqlProvider { |
||||
|
||||
public String countByExample(BsCityExample example) { |
||||
SQL sql = new SQL(); |
||||
sql.SELECT("count(*)").FROM("bs_city"); |
||||
applyWhere(sql, example, false); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String deleteByExample(BsCityExample example) { |
||||
SQL sql = new SQL(); |
||||
sql.DELETE_FROM("bs_city"); |
||||
applyWhere(sql, example, false); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String insertSelective(BsCity record) { |
||||
SQL sql = new SQL(); |
||||
sql.INSERT_INTO("bs_city"); |
||||
|
||||
if (record.getRegionId() != null) { |
||||
sql.VALUES("region_id", "#{regionId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getRegionName() != null) { |
||||
sql.VALUES("region_name", "#{regionName,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getParentId() != null) { |
||||
sql.VALUES("parent_id", "#{parentId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getStatus() != null) { |
||||
sql.VALUES("`status`", "#{status,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String selectByExample(BsCityExample example) { |
||||
SQL sql = new SQL(); |
||||
if (example != null && example.isDistinct()) { |
||||
sql.SELECT_DISTINCT("region_id"); |
||||
} else { |
||||
sql.SELECT("region_id"); |
||||
} |
||||
sql.SELECT("region_name"); |
||||
sql.SELECT("parent_id"); |
||||
sql.SELECT("`status`"); |
||||
sql.FROM("bs_city"); |
||||
applyWhere(sql, example, false); |
||||
|
||||
if (example != null && example.getOrderByClause() != null) { |
||||
sql.ORDER_BY(example.getOrderByClause()); |
||||
} |
||||
|
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String updateByExampleSelective(Map<String, Object> parameter) { |
||||
BsCity record = (BsCity) parameter.get("record"); |
||||
BsCityExample example = (BsCityExample) parameter.get("example"); |
||||
|
||||
SQL sql = new SQL(); |
||||
sql.UPDATE("bs_city"); |
||||
|
||||
if (record.getRegionId() != null) { |
||||
sql.SET("region_id = #{record.regionId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getRegionName() != null) { |
||||
sql.SET("region_name = #{record.regionName,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getParentId() != null) { |
||||
sql.SET("parent_id = #{record.parentId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getStatus() != null) { |
||||
sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
applyWhere(sql, example, true); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String updateByExample(Map<String, Object> parameter) { |
||||
SQL sql = new SQL(); |
||||
sql.UPDATE("bs_city"); |
||||
|
||||
sql.SET("region_id = #{record.regionId,jdbcType=BIGINT}"); |
||||
sql.SET("region_name = #{record.regionName,jdbcType=VARCHAR}"); |
||||
sql.SET("parent_id = #{record.parentId,jdbcType=BIGINT}"); |
||||
sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); |
||||
|
||||
BsCityExample example = (BsCityExample) parameter.get("example"); |
||||
applyWhere(sql, example, true); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String updateByPrimaryKeySelective(BsCity record) { |
||||
SQL sql = new SQL(); |
||||
sql.UPDATE("bs_city"); |
||||
|
||||
if (record.getRegionName() != null) { |
||||
sql.SET("region_name = #{regionName,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getParentId() != null) { |
||||
sql.SET("parent_id = #{parentId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getStatus() != null) { |
||||
sql.SET("`status` = #{status,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
sql.WHERE("region_id = #{regionId,jdbcType=BIGINT}"); |
||||
|
||||
return sql.toString(); |
||||
} |
||||
|
||||
protected void applyWhere(SQL sql, BsCityExample example, boolean includeExamplePhrase) { |
||||
if (example == null) { |
||||
return; |
||||
} |
||||
|
||||
String parmPhrase1; |
||||
String parmPhrase1_th; |
||||
String parmPhrase2; |
||||
String parmPhrase2_th; |
||||
String parmPhrase3; |
||||
String parmPhrase3_th; |
||||
if (includeExamplePhrase) { |
||||
parmPhrase1 = "%s #{example.oredCriteria[%d].allCriteria[%d].value}"; |
||||
parmPhrase1_th = "%s #{example.oredCriteria[%d].allCriteria[%d].value,typeHandler=%s}"; |
||||
parmPhrase2 = "%s #{example.oredCriteria[%d].allCriteria[%d].value} and #{example.oredCriteria[%d].criteria[%d].secondValue}"; |
||||
parmPhrase2_th = "%s #{example.oredCriteria[%d].allCriteria[%d].value,typeHandler=%s} and #{example.oredCriteria[%d].criteria[%d].secondValue,typeHandler=%s}"; |
||||
parmPhrase3 = "#{example.oredCriteria[%d].allCriteria[%d].value[%d]}"; |
||||
parmPhrase3_th = "#{example.oredCriteria[%d].allCriteria[%d].value[%d],typeHandler=%s}"; |
||||
} else { |
||||
parmPhrase1 = "%s #{oredCriteria[%d].allCriteria[%d].value}"; |
||||
parmPhrase1_th = "%s #{oredCriteria[%d].allCriteria[%d].value,typeHandler=%s}"; |
||||
parmPhrase2 = "%s #{oredCriteria[%d].allCriteria[%d].value} and #{oredCriteria[%d].criteria[%d].secondValue}"; |
||||
parmPhrase2_th = "%s #{oredCriteria[%d].allCriteria[%d].value,typeHandler=%s} and #{oredCriteria[%d].criteria[%d].secondValue,typeHandler=%s}"; |
||||
parmPhrase3 = "#{oredCriteria[%d].allCriteria[%d].value[%d]}"; |
||||
parmPhrase3_th = "#{oredCriteria[%d].allCriteria[%d].value[%d],typeHandler=%s}"; |
||||
} |
||||
|
||||
StringBuilder sb = new StringBuilder(); |
||||
List<Criteria> oredCriteria = example.getOredCriteria(); |
||||
boolean firstCriteria = true; |
||||
for (int i = 0; i < oredCriteria.size(); i++) { |
||||
Criteria criteria = oredCriteria.get(i); |
||||
if (criteria.isValid()) { |
||||
if (firstCriteria) { |
||||
firstCriteria = false; |
||||
} else { |
||||
sb.append(" or "); |
||||
} |
||||
|
||||
sb.append('('); |
||||
List<Criterion> criterions = criteria.getAllCriteria(); |
||||
boolean firstCriterion = true; |
||||
for (int j = 0; j < criterions.size(); j++) { |
||||
Criterion criterion = criterions.get(j); |
||||
if (firstCriterion) { |
||||
firstCriterion = false; |
||||
} else { |
||||
sb.append(" and "); |
||||
} |
||||
|
||||
if (criterion.isNoValue()) { |
||||
sb.append(criterion.getCondition()); |
||||
} else if (criterion.isSingleValue()) { |
||||
if (criterion.getTypeHandler() == null) { |
||||
sb.append(String.format(parmPhrase1, criterion.getCondition(), i, j)); |
||||
} else { |
||||
sb.append(String.format(parmPhrase1_th, criterion.getCondition(), i, j,criterion.getTypeHandler())); |
||||
} |
||||
} else if (criterion.isBetweenValue()) { |
||||
if (criterion.getTypeHandler() == null) { |
||||
sb.append(String.format(parmPhrase2, criterion.getCondition(), i, j, i, j)); |
||||
} else { |
||||
sb.append(String.format(parmPhrase2_th, criterion.getCondition(), i, j, criterion.getTypeHandler(), i, j, criterion.getTypeHandler())); |
||||
} |
||||
} else if (criterion.isListValue()) { |
||||
sb.append(criterion.getCondition()); |
||||
sb.append(" ("); |
||||
List<?> listItems = (List<?>) criterion.getValue(); |
||||
boolean comma = false; |
||||
for (int k = 0; k < listItems.size(); k++) { |
||||
if (comma) { |
||||
sb.append(", "); |
||||
} else { |
||||
comma = true; |
||||
} |
||||
if (criterion.getTypeHandler() == null) { |
||||
sb.append(String.format(parmPhrase3, i, j, k)); |
||||
} else { |
||||
sb.append(String.format(parmPhrase3_th, i, j, k, criterion.getTypeHandler())); |
||||
} |
||||
} |
||||
sb.append(')'); |
||||
} |
||||
} |
||||
sb.append(')'); |
||||
} |
||||
} |
||||
|
||||
if (sb.length() > 0) { |
||||
sql.WHERE(sb.toString()); |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,122 @@ |
||||
package com.hfkj.dao; |
||||
|
||||
import com.hfkj.entity.CouponDiscountPackageDetails; |
||||
import com.hfkj.entity.CouponDiscountPackageDetailsExample; |
||||
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 CouponDiscountPackageDetailsMapper extends CouponDiscountPackageDetailsMapperExt { |
||||
@SelectProvider(type=CouponDiscountPackageDetailsSqlProvider.class, method="countByExample") |
||||
long countByExample(CouponDiscountPackageDetailsExample example); |
||||
|
||||
@DeleteProvider(type=CouponDiscountPackageDetailsSqlProvider.class, method="deleteByExample") |
||||
int deleteByExample(CouponDiscountPackageDetailsExample example); |
||||
|
||||
@Delete({ |
||||
"delete from coupon_discount_package_details", |
||||
"where id = #{id,jdbcType=INTEGER}" |
||||
}) |
||||
int deleteByPrimaryKey(Integer id); |
||||
|
||||
@Insert({ |
||||
"insert into coupon_discount_package_details (discount_package_id, discount_id, ", |
||||
"discount_name, num, ", |
||||
"created_time, updated_time, ", |
||||
"`status`, ext_1, ext_2, ", |
||||
"ext_3)", |
||||
"values (#{discountPackageId,jdbcType=INTEGER}, #{discountId,jdbcType=INTEGER}, ", |
||||
"#{discountName,jdbcType=VARCHAR}, #{num,jdbcType=INTEGER}, ", |
||||
"#{createdTime,jdbcType=TIMESTAMP}, #{updatedTime,jdbcType=TIMESTAMP}, ", |
||||
"#{status,jdbcType=INTEGER}, #{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, ", |
||||
"#{ext3,jdbcType=VARCHAR})" |
||||
}) |
||||
@Options(useGeneratedKeys=true,keyProperty="id") |
||||
int insert(CouponDiscountPackageDetails record); |
||||
|
||||
@InsertProvider(type=CouponDiscountPackageDetailsSqlProvider.class, method="insertSelective") |
||||
@Options(useGeneratedKeys=true,keyProperty="id") |
||||
int insertSelective(CouponDiscountPackageDetails record); |
||||
|
||||
@SelectProvider(type=CouponDiscountPackageDetailsSqlProvider.class, method="selectByExample") |
||||
@Results({ |
||||
@Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true), |
||||
@Result(column="discount_package_id", property="discountPackageId", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="discount_id", property="discountId", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="discount_name", property="discountName", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="num", property="num", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="created_time", property="createdTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="updated_time", property="updatedTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR) |
||||
}) |
||||
List<CouponDiscountPackageDetails> selectByExample(CouponDiscountPackageDetailsExample example); |
||||
|
||||
@Select({ |
||||
"select", |
||||
"id, discount_package_id, discount_id, discount_name, num, created_time, updated_time, ", |
||||
"`status`, ext_1, ext_2, ext_3", |
||||
"from coupon_discount_package_details", |
||||
"where id = #{id,jdbcType=INTEGER}" |
||||
}) |
||||
@Results({ |
||||
@Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true), |
||||
@Result(column="discount_package_id", property="discountPackageId", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="discount_id", property="discountId", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="discount_name", property="discountName", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="num", property="num", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="created_time", property="createdTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="updated_time", property="updatedTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR) |
||||
}) |
||||
CouponDiscountPackageDetails selectByPrimaryKey(Integer id); |
||||
|
||||
@UpdateProvider(type=CouponDiscountPackageDetailsSqlProvider.class, method="updateByExampleSelective") |
||||
int updateByExampleSelective(@Param("record") CouponDiscountPackageDetails record, @Param("example") CouponDiscountPackageDetailsExample example); |
||||
|
||||
@UpdateProvider(type=CouponDiscountPackageDetailsSqlProvider.class, method="updateByExample") |
||||
int updateByExample(@Param("record") CouponDiscountPackageDetails record, @Param("example") CouponDiscountPackageDetailsExample example); |
||||
|
||||
@UpdateProvider(type=CouponDiscountPackageDetailsSqlProvider.class, method="updateByPrimaryKeySelective") |
||||
int updateByPrimaryKeySelective(CouponDiscountPackageDetails record); |
||||
|
||||
@Update({ |
||||
"update coupon_discount_package_details", |
||||
"set discount_package_id = #{discountPackageId,jdbcType=INTEGER},", |
||||
"discount_id = #{discountId,jdbcType=INTEGER},", |
||||
"discount_name = #{discountName,jdbcType=VARCHAR},", |
||||
"num = #{num,jdbcType=INTEGER},", |
||||
"created_time = #{createdTime,jdbcType=TIMESTAMP},", |
||||
"updated_time = #{updatedTime,jdbcType=TIMESTAMP},", |
||||
"`status` = #{status,jdbcType=INTEGER},", |
||||
"ext_1 = #{ext1,jdbcType=VARCHAR},", |
||||
"ext_2 = #{ext2,jdbcType=VARCHAR},", |
||||
"ext_3 = #{ext3,jdbcType=VARCHAR}", |
||||
"where id = #{id,jdbcType=INTEGER}" |
||||
}) |
||||
int updateByPrimaryKey(CouponDiscountPackageDetails record); |
||||
} |
@ -0,0 +1,7 @@ |
||||
package com.hfkj.dao; |
||||
|
||||
/** |
||||
* mapper扩展类 |
||||
*/ |
||||
public interface CouponDiscountPackageDetailsMapperExt { |
||||
} |
@ -0,0 +1,318 @@ |
||||
package com.hfkj.dao; |
||||
|
||||
import com.hfkj.entity.CouponDiscountPackageDetails; |
||||
import com.hfkj.entity.CouponDiscountPackageDetailsExample.Criteria; |
||||
import com.hfkj.entity.CouponDiscountPackageDetailsExample.Criterion; |
||||
import com.hfkj.entity.CouponDiscountPackageDetailsExample; |
||||
import java.util.List; |
||||
import java.util.Map; |
||||
import org.apache.ibatis.jdbc.SQL; |
||||
|
||||
public class CouponDiscountPackageDetailsSqlProvider { |
||||
|
||||
public String countByExample(CouponDiscountPackageDetailsExample example) { |
||||
SQL sql = new SQL(); |
||||
sql.SELECT("count(*)").FROM("coupon_discount_package_details"); |
||||
applyWhere(sql, example, false); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String deleteByExample(CouponDiscountPackageDetailsExample example) { |
||||
SQL sql = new SQL(); |
||||
sql.DELETE_FROM("coupon_discount_package_details"); |
||||
applyWhere(sql, example, false); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String insertSelective(CouponDiscountPackageDetails record) { |
||||
SQL sql = new SQL(); |
||||
sql.INSERT_INTO("coupon_discount_package_details"); |
||||
|
||||
if (record.getDiscountPackageId() != null) { |
||||
sql.VALUES("discount_package_id", "#{discountPackageId,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getDiscountId() != null) { |
||||
sql.VALUES("discount_id", "#{discountId,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getDiscountName() != null) { |
||||
sql.VALUES("discount_name", "#{discountName,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getNum() != null) { |
||||
sql.VALUES("num", "#{num,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getCreatedTime() != null) { |
||||
sql.VALUES("created_time", "#{createdTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getUpdatedTime() != null) { |
||||
sql.VALUES("updated_time", "#{updatedTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getStatus() != null) { |
||||
sql.VALUES("`status`", "#{status,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getExt1() != null) { |
||||
sql.VALUES("ext_1", "#{ext1,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getExt2() != null) { |
||||
sql.VALUES("ext_2", "#{ext2,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getExt3() != null) { |
||||
sql.VALUES("ext_3", "#{ext3,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String selectByExample(CouponDiscountPackageDetailsExample example) { |
||||
SQL sql = new SQL(); |
||||
if (example != null && example.isDistinct()) { |
||||
sql.SELECT_DISTINCT("id"); |
||||
} else { |
||||
sql.SELECT("id"); |
||||
} |
||||
sql.SELECT("discount_package_id"); |
||||
sql.SELECT("discount_id"); |
||||
sql.SELECT("discount_name"); |
||||
sql.SELECT("num"); |
||||
sql.SELECT("created_time"); |
||||
sql.SELECT("updated_time"); |
||||
sql.SELECT("`status`"); |
||||
sql.SELECT("ext_1"); |
||||
sql.SELECT("ext_2"); |
||||
sql.SELECT("ext_3"); |
||||
sql.FROM("coupon_discount_package_details"); |
||||
applyWhere(sql, example, false); |
||||
|
||||
if (example != null && example.getOrderByClause() != null) { |
||||
sql.ORDER_BY(example.getOrderByClause()); |
||||
} |
||||
|
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String updateByExampleSelective(Map<String, Object> parameter) { |
||||
CouponDiscountPackageDetails record = (CouponDiscountPackageDetails) parameter.get("record"); |
||||
CouponDiscountPackageDetailsExample example = (CouponDiscountPackageDetailsExample) parameter.get("example"); |
||||
|
||||
SQL sql = new SQL(); |
||||
sql.UPDATE("coupon_discount_package_details"); |
||||
|
||||
if (record.getId() != null) { |
||||
sql.SET("id = #{record.id,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getDiscountPackageId() != null) { |
||||
sql.SET("discount_package_id = #{record.discountPackageId,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getDiscountId() != null) { |
||||
sql.SET("discount_id = #{record.discountId,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getDiscountName() != null) { |
||||
sql.SET("discount_name = #{record.discountName,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getNum() != null) { |
||||
sql.SET("num = #{record.num,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getCreatedTime() != null) { |
||||
sql.SET("created_time = #{record.createdTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getUpdatedTime() != null) { |
||||
sql.SET("updated_time = #{record.updatedTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getStatus() != null) { |
||||
sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getExt1() != null) { |
||||
sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getExt2() != null) { |
||||
sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getExt3() != null) { |
||||
sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
applyWhere(sql, example, true); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String updateByExample(Map<String, Object> parameter) { |
||||
SQL sql = new SQL(); |
||||
sql.UPDATE("coupon_discount_package_details"); |
||||
|
||||
sql.SET("id = #{record.id,jdbcType=INTEGER}"); |
||||
sql.SET("discount_package_id = #{record.discountPackageId,jdbcType=INTEGER}"); |
||||
sql.SET("discount_id = #{record.discountId,jdbcType=INTEGER}"); |
||||
sql.SET("discount_name = #{record.discountName,jdbcType=VARCHAR}"); |
||||
sql.SET("num = #{record.num,jdbcType=INTEGER}"); |
||||
sql.SET("created_time = #{record.createdTime,jdbcType=TIMESTAMP}"); |
||||
sql.SET("updated_time = #{record.updatedTime,jdbcType=TIMESTAMP}"); |
||||
sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); |
||||
sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}"); |
||||
sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}"); |
||||
sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}"); |
||||
|
||||
CouponDiscountPackageDetailsExample example = (CouponDiscountPackageDetailsExample) parameter.get("example"); |
||||
applyWhere(sql, example, true); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String updateByPrimaryKeySelective(CouponDiscountPackageDetails record) { |
||||
SQL sql = new SQL(); |
||||
sql.UPDATE("coupon_discount_package_details"); |
||||
|
||||
if (record.getDiscountPackageId() != null) { |
||||
sql.SET("discount_package_id = #{discountPackageId,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getDiscountId() != null) { |
||||
sql.SET("discount_id = #{discountId,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getDiscountName() != null) { |
||||
sql.SET("discount_name = #{discountName,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getNum() != null) { |
||||
sql.SET("num = #{num,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getCreatedTime() != null) { |
||||
sql.SET("created_time = #{createdTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getUpdatedTime() != null) { |
||||
sql.SET("updated_time = #{updatedTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getStatus() != null) { |
||||
sql.SET("`status` = #{status,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getExt1() != null) { |
||||
sql.SET("ext_1 = #{ext1,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getExt2() != null) { |
||||
sql.SET("ext_2 = #{ext2,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getExt3() != null) { |
||||
sql.SET("ext_3 = #{ext3,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
sql.WHERE("id = #{id,jdbcType=INTEGER}"); |
||||
|
||||
return sql.toString(); |
||||
} |
||||
|
||||
protected void applyWhere(SQL sql, CouponDiscountPackageDetailsExample example, boolean includeExamplePhrase) { |
||||
if (example == null) { |
||||
return; |
||||
} |
||||
|
||||
String parmPhrase1; |
||||
String parmPhrase1_th; |
||||
String parmPhrase2; |
||||
String parmPhrase2_th; |
||||
String parmPhrase3; |
||||
String parmPhrase3_th; |
||||
if (includeExamplePhrase) { |
||||
parmPhrase1 = "%s #{example.oredCriteria[%d].allCriteria[%d].value}"; |
||||
parmPhrase1_th = "%s #{example.oredCriteria[%d].allCriteria[%d].value,typeHandler=%s}"; |
||||
parmPhrase2 = "%s #{example.oredCriteria[%d].allCriteria[%d].value} and #{example.oredCriteria[%d].criteria[%d].secondValue}"; |
||||
parmPhrase2_th = "%s #{example.oredCriteria[%d].allCriteria[%d].value,typeHandler=%s} and #{example.oredCriteria[%d].criteria[%d].secondValue,typeHandler=%s}"; |
||||
parmPhrase3 = "#{example.oredCriteria[%d].allCriteria[%d].value[%d]}"; |
||||
parmPhrase3_th = "#{example.oredCriteria[%d].allCriteria[%d].value[%d],typeHandler=%s}"; |
||||
} else { |
||||
parmPhrase1 = "%s #{oredCriteria[%d].allCriteria[%d].value}"; |
||||
parmPhrase1_th = "%s #{oredCriteria[%d].allCriteria[%d].value,typeHandler=%s}"; |
||||
parmPhrase2 = "%s #{oredCriteria[%d].allCriteria[%d].value} and #{oredCriteria[%d].criteria[%d].secondValue}"; |
||||
parmPhrase2_th = "%s #{oredCriteria[%d].allCriteria[%d].value,typeHandler=%s} and #{oredCriteria[%d].criteria[%d].secondValue,typeHandler=%s}"; |
||||
parmPhrase3 = "#{oredCriteria[%d].allCriteria[%d].value[%d]}"; |
||||
parmPhrase3_th = "#{oredCriteria[%d].allCriteria[%d].value[%d],typeHandler=%s}"; |
||||
} |
||||
|
||||
StringBuilder sb = new StringBuilder(); |
||||
List<Criteria> oredCriteria = example.getOredCriteria(); |
||||
boolean firstCriteria = true; |
||||
for (int i = 0; i < oredCriteria.size(); i++) { |
||||
Criteria criteria = oredCriteria.get(i); |
||||
if (criteria.isValid()) { |
||||
if (firstCriteria) { |
||||
firstCriteria = false; |
||||
} else { |
||||
sb.append(" or "); |
||||
} |
||||
|
||||
sb.append('('); |
||||
List<Criterion> criterions = criteria.getAllCriteria(); |
||||
boolean firstCriterion = true; |
||||
for (int j = 0; j < criterions.size(); j++) { |
||||
Criterion criterion = criterions.get(j); |
||||
if (firstCriterion) { |
||||
firstCriterion = false; |
||||
} else { |
||||
sb.append(" and "); |
||||
} |
||||
|
||||
if (criterion.isNoValue()) { |
||||
sb.append(criterion.getCondition()); |
||||
} else if (criterion.isSingleValue()) { |
||||
if (criterion.getTypeHandler() == null) { |
||||
sb.append(String.format(parmPhrase1, criterion.getCondition(), i, j)); |
||||
} else { |
||||
sb.append(String.format(parmPhrase1_th, criterion.getCondition(), i, j,criterion.getTypeHandler())); |
||||
} |
||||
} else if (criterion.isBetweenValue()) { |
||||
if (criterion.getTypeHandler() == null) { |
||||
sb.append(String.format(parmPhrase2, criterion.getCondition(), i, j, i, j)); |
||||
} else { |
||||
sb.append(String.format(parmPhrase2_th, criterion.getCondition(), i, j, criterion.getTypeHandler(), i, j, criterion.getTypeHandler())); |
||||
} |
||||
} else if (criterion.isListValue()) { |
||||
sb.append(criterion.getCondition()); |
||||
sb.append(" ("); |
||||
List<?> listItems = (List<?>) criterion.getValue(); |
||||
boolean comma = false; |
||||
for (int k = 0; k < listItems.size(); k++) { |
||||
if (comma) { |
||||
sb.append(", "); |
||||
} else { |
||||
comma = true; |
||||
} |
||||
if (criterion.getTypeHandler() == null) { |
||||
sb.append(String.format(parmPhrase3, i, j, k)); |
||||
} else { |
||||
sb.append(String.format(parmPhrase3_th, i, j, k, criterion.getTypeHandler())); |
||||
} |
||||
} |
||||
sb.append(')'); |
||||
} |
||||
} |
||||
sb.append(')'); |
||||
} |
||||
} |
||||
|
||||
if (sb.length() > 0) { |
||||
sql.WHERE(sb.toString()); |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,133 @@ |
||||
package com.hfkj.dao; |
||||
|
||||
import com.hfkj.entity.CouponDiscountPackage; |
||||
import com.hfkj.entity.CouponDiscountPackageExample; |
||||
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 CouponDiscountPackageMapper extends CouponDiscountPackageMapperExt { |
||||
@SelectProvider(type=CouponDiscountPackageSqlProvider.class, method="countByExample") |
||||
long countByExample(CouponDiscountPackageExample example); |
||||
|
||||
@DeleteProvider(type=CouponDiscountPackageSqlProvider.class, method="deleteByExample") |
||||
int deleteByExample(CouponDiscountPackageExample example); |
||||
|
||||
@Delete({ |
||||
"delete from coupon_discount_package", |
||||
"where id = #{id,jdbcType=INTEGER}" |
||||
}) |
||||
int deleteByPrimaryKey(Integer id); |
||||
|
||||
@Insert({ |
||||
"insert into coupon_discount_package (`key`, title, ", |
||||
"effective_tiem, created_user_id, ", |
||||
"created_time, updated_user_id, ", |
||||
"updated_time, `status`, ", |
||||
"total_stock, surplus_stock, ", |
||||
"ext_1, ext_2, ext_3)", |
||||
"values (#{key,jdbcType=VARCHAR}, #{title,jdbcType=VARCHAR}, ", |
||||
"#{effectiveTiem,jdbcType=TIMESTAMP}, #{createdUserId,jdbcType=INTEGER}, ", |
||||
"#{createdTime,jdbcType=TIMESTAMP}, #{updatedUserId,jdbcType=INTEGER}, ", |
||||
"#{updatedTime,jdbcType=TIMESTAMP}, #{status,jdbcType=INTEGER}, ", |
||||
"#{totalStock,jdbcType=INTEGER}, #{surplusStock,jdbcType=INTEGER}, ", |
||||
"#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" |
||||
}) |
||||
@Options(useGeneratedKeys=true,keyProperty="id") |
||||
int insert(CouponDiscountPackage record); |
||||
|
||||
@InsertProvider(type=CouponDiscountPackageSqlProvider.class, method="insertSelective") |
||||
@Options(useGeneratedKeys=true,keyProperty="id") |
||||
int insertSelective(CouponDiscountPackage record); |
||||
|
||||
@SelectProvider(type=CouponDiscountPackageSqlProvider.class, method="selectByExample") |
||||
@Results({ |
||||
@Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true), |
||||
@Result(column="key", property="key", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="title", property="title", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="effective_tiem", property="effectiveTiem", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="created_user_id", property="createdUserId", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="created_time", property="createdTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="updated_user_id", property="updatedUserId", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="updated_time", property="updatedTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="total_stock", property="totalStock", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="surplus_stock", property="surplusStock", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR) |
||||
}) |
||||
List<CouponDiscountPackage> selectByExample(CouponDiscountPackageExample example); |
||||
|
||||
@Select({ |
||||
"select", |
||||
"id, `key`, title, effective_tiem, created_user_id, created_time, updated_user_id, ", |
||||
"updated_time, `status`, total_stock, surplus_stock, ext_1, ext_2, ext_3", |
||||
"from coupon_discount_package", |
||||
"where id = #{id,jdbcType=INTEGER}" |
||||
}) |
||||
@Results({ |
||||
@Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true), |
||||
@Result(column="key", property="key", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="title", property="title", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="effective_tiem", property="effectiveTiem", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="created_user_id", property="createdUserId", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="created_time", property="createdTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="updated_user_id", property="updatedUserId", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="updated_time", property="updatedTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="total_stock", property="totalStock", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="surplus_stock", property="surplusStock", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR) |
||||
}) |
||||
CouponDiscountPackage selectByPrimaryKey(Integer id); |
||||
|
||||
@UpdateProvider(type=CouponDiscountPackageSqlProvider.class, method="updateByExampleSelective") |
||||
int updateByExampleSelective(@Param("record") CouponDiscountPackage record, @Param("example") CouponDiscountPackageExample example); |
||||
|
||||
@UpdateProvider(type=CouponDiscountPackageSqlProvider.class, method="updateByExample") |
||||
int updateByExample(@Param("record") CouponDiscountPackage record, @Param("example") CouponDiscountPackageExample example); |
||||
|
||||
@UpdateProvider(type=CouponDiscountPackageSqlProvider.class, method="updateByPrimaryKeySelective") |
||||
int updateByPrimaryKeySelective(CouponDiscountPackage record); |
||||
|
||||
@Update({ |
||||
"update coupon_discount_package", |
||||
"set `key` = #{key,jdbcType=VARCHAR},", |
||||
"title = #{title,jdbcType=VARCHAR},", |
||||
"effective_tiem = #{effectiveTiem,jdbcType=TIMESTAMP},", |
||||
"created_user_id = #{createdUserId,jdbcType=INTEGER},", |
||||
"created_time = #{createdTime,jdbcType=TIMESTAMP},", |
||||
"updated_user_id = #{updatedUserId,jdbcType=INTEGER},", |
||||
"updated_time = #{updatedTime,jdbcType=TIMESTAMP},", |
||||
"`status` = #{status,jdbcType=INTEGER},", |
||||
"total_stock = #{totalStock,jdbcType=INTEGER},", |
||||
"surplus_stock = #{surplusStock,jdbcType=INTEGER},", |
||||
"ext_1 = #{ext1,jdbcType=VARCHAR},", |
||||
"ext_2 = #{ext2,jdbcType=VARCHAR},", |
||||
"ext_3 = #{ext3,jdbcType=VARCHAR}", |
||||
"where id = #{id,jdbcType=INTEGER}" |
||||
}) |
||||
int updateByPrimaryKey(CouponDiscountPackage record); |
||||
} |
@ -0,0 +1,7 @@ |
||||
package com.hfkj.dao; |
||||
|
||||
/** |
||||
* mapper扩展类 |
||||
*/ |
||||
public interface CouponDiscountPackageMapperExt { |
||||
} |
@ -0,0 +1,137 @@ |
||||
package com.hfkj.dao; |
||||
|
||||
import com.hfkj.entity.CouponDiscountPackageRecord; |
||||
import com.hfkj.entity.CouponDiscountPackageRecordExample; |
||||
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 CouponDiscountPackageRecordMapper extends CouponDiscountPackageRecordMapperExt { |
||||
@SelectProvider(type=CouponDiscountPackageRecordSqlProvider.class, method="countByExample") |
||||
long countByExample(CouponDiscountPackageRecordExample example); |
||||
|
||||
@DeleteProvider(type=CouponDiscountPackageRecordSqlProvider.class, method="deleteByExample") |
||||
int deleteByExample(CouponDiscountPackageRecordExample example); |
||||
|
||||
@Delete({ |
||||
"delete from coupon_discount_package_record", |
||||
"where id = #{id,jdbcType=INTEGER}" |
||||
}) |
||||
int deleteByPrimaryKey(Integer id); |
||||
|
||||
@Insert({ |
||||
"insert into coupon_discount_package_record (discount_package_title, discount_package_id, ", |
||||
"order_id, child_order_id, ", |
||||
"record_no, serial_no, ", |
||||
"`type`, user_id, user_phone, ", |
||||
"created_time, `status`, ", |
||||
"ext_1, ext_2, ext_3)", |
||||
"values (#{discountPackageTitle,jdbcType=VARCHAR}, #{discountPackageId,jdbcType=INTEGER}, ", |
||||
"#{orderId,jdbcType=INTEGER}, #{childOrderId,jdbcType=INTEGER}, ", |
||||
"#{recordNo,jdbcType=VARCHAR}, #{serialNo,jdbcType=VARCHAR}, ", |
||||
"#{type,jdbcType=INTEGER}, #{userId,jdbcType=INTEGER}, #{userPhone,jdbcType=VARCHAR}, ", |
||||
"#{createdTime,jdbcType=TIMESTAMP}, #{status,jdbcType=INTEGER}, ", |
||||
"#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" |
||||
}) |
||||
@Options(useGeneratedKeys=true,keyProperty="id") |
||||
int insert(CouponDiscountPackageRecord record); |
||||
|
||||
@InsertProvider(type=CouponDiscountPackageRecordSqlProvider.class, method="insertSelective") |
||||
@Options(useGeneratedKeys=true,keyProperty="id") |
||||
int insertSelective(CouponDiscountPackageRecord record); |
||||
|
||||
@SelectProvider(type=CouponDiscountPackageRecordSqlProvider.class, method="selectByExample") |
||||
@Results({ |
||||
@Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true), |
||||
@Result(column="discount_package_title", property="discountPackageTitle", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="discount_package_id", property="discountPackageId", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="order_id", property="orderId", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="child_order_id", property="childOrderId", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="record_no", property="recordNo", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="serial_no", property="serialNo", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="type", property="type", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="user_id", property="userId", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="user_phone", property="userPhone", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="created_time", property="createdTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR) |
||||
}) |
||||
List<CouponDiscountPackageRecord> selectByExample(CouponDiscountPackageRecordExample example); |
||||
|
||||
@Select({ |
||||
"select", |
||||
"id, discount_package_title, discount_package_id, order_id, child_order_id, record_no, ", |
||||
"serial_no, `type`, user_id, user_phone, created_time, `status`, ext_1, ext_2, ", |
||||
"ext_3", |
||||
"from coupon_discount_package_record", |
||||
"where id = #{id,jdbcType=INTEGER}" |
||||
}) |
||||
@Results({ |
||||
@Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true), |
||||
@Result(column="discount_package_title", property="discountPackageTitle", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="discount_package_id", property="discountPackageId", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="order_id", property="orderId", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="child_order_id", property="childOrderId", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="record_no", property="recordNo", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="serial_no", property="serialNo", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="type", property="type", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="user_id", property="userId", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="user_phone", property="userPhone", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="created_time", property="createdTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR) |
||||
}) |
||||
CouponDiscountPackageRecord selectByPrimaryKey(Integer id); |
||||
|
||||
@UpdateProvider(type=CouponDiscountPackageRecordSqlProvider.class, method="updateByExampleSelective") |
||||
int updateByExampleSelective(@Param("record") CouponDiscountPackageRecord record, @Param("example") CouponDiscountPackageRecordExample example); |
||||
|
||||
@UpdateProvider(type=CouponDiscountPackageRecordSqlProvider.class, method="updateByExample") |
||||
int updateByExample(@Param("record") CouponDiscountPackageRecord record, @Param("example") CouponDiscountPackageRecordExample example); |
||||
|
||||
@UpdateProvider(type=CouponDiscountPackageRecordSqlProvider.class, method="updateByPrimaryKeySelective") |
||||
int updateByPrimaryKeySelective(CouponDiscountPackageRecord record); |
||||
|
||||
@Update({ |
||||
"update coupon_discount_package_record", |
||||
"set discount_package_title = #{discountPackageTitle,jdbcType=VARCHAR},", |
||||
"discount_package_id = #{discountPackageId,jdbcType=INTEGER},", |
||||
"order_id = #{orderId,jdbcType=INTEGER},", |
||||
"child_order_id = #{childOrderId,jdbcType=INTEGER},", |
||||
"record_no = #{recordNo,jdbcType=VARCHAR},", |
||||
"serial_no = #{serialNo,jdbcType=VARCHAR},", |
||||
"`type` = #{type,jdbcType=INTEGER},", |
||||
"user_id = #{userId,jdbcType=INTEGER},", |
||||
"user_phone = #{userPhone,jdbcType=VARCHAR},", |
||||
"created_time = #{createdTime,jdbcType=TIMESTAMP},", |
||||
"`status` = #{status,jdbcType=INTEGER},", |
||||
"ext_1 = #{ext1,jdbcType=VARCHAR},", |
||||
"ext_2 = #{ext2,jdbcType=VARCHAR},", |
||||
"ext_3 = #{ext3,jdbcType=VARCHAR}", |
||||
"where id = #{id,jdbcType=INTEGER}" |
||||
}) |
||||
int updateByPrimaryKey(CouponDiscountPackageRecord record); |
||||
} |
@ -0,0 +1,7 @@ |
||||
package com.hfkj.dao; |
||||
|
||||
/** |
||||
* mapper扩展类 |
||||
*/ |
||||
public interface CouponDiscountPackageRecordMapperExt { |
||||
} |
@ -0,0 +1,374 @@ |
||||
package com.hfkj.dao; |
||||
|
||||
import com.hfkj.entity.CouponDiscountPackageRecord; |
||||
import com.hfkj.entity.CouponDiscountPackageRecordExample.Criteria; |
||||
import com.hfkj.entity.CouponDiscountPackageRecordExample.Criterion; |
||||
import com.hfkj.entity.CouponDiscountPackageRecordExample; |
||||
import java.util.List; |
||||
import java.util.Map; |
||||
import org.apache.ibatis.jdbc.SQL; |
||||
|
||||
public class CouponDiscountPackageRecordSqlProvider { |
||||
|
||||
public String countByExample(CouponDiscountPackageRecordExample example) { |
||||
SQL sql = new SQL(); |
||||
sql.SELECT("count(*)").FROM("coupon_discount_package_record"); |
||||
applyWhere(sql, example, false); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String deleteByExample(CouponDiscountPackageRecordExample example) { |
||||
SQL sql = new SQL(); |
||||
sql.DELETE_FROM("coupon_discount_package_record"); |
||||
applyWhere(sql, example, false); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String insertSelective(CouponDiscountPackageRecord record) { |
||||
SQL sql = new SQL(); |
||||
sql.INSERT_INTO("coupon_discount_package_record"); |
||||
|
||||
if (record.getDiscountPackageTitle() != null) { |
||||
sql.VALUES("discount_package_title", "#{discountPackageTitle,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getDiscountPackageId() != null) { |
||||
sql.VALUES("discount_package_id", "#{discountPackageId,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getOrderId() != null) { |
||||
sql.VALUES("order_id", "#{orderId,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getChildOrderId() != null) { |
||||
sql.VALUES("child_order_id", "#{childOrderId,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getRecordNo() != null) { |
||||
sql.VALUES("record_no", "#{recordNo,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getSerialNo() != null) { |
||||
sql.VALUES("serial_no", "#{serialNo,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getType() != null) { |
||||
sql.VALUES("`type`", "#{type,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getUserId() != null) { |
||||
sql.VALUES("user_id", "#{userId,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getUserPhone() != null) { |
||||
sql.VALUES("user_phone", "#{userPhone,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getCreatedTime() != null) { |
||||
sql.VALUES("created_time", "#{createdTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getStatus() != null) { |
||||
sql.VALUES("`status`", "#{status,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getExt1() != null) { |
||||
sql.VALUES("ext_1", "#{ext1,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getExt2() != null) { |
||||
sql.VALUES("ext_2", "#{ext2,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getExt3() != null) { |
||||
sql.VALUES("ext_3", "#{ext3,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String selectByExample(CouponDiscountPackageRecordExample 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("order_id"); |
||||
sql.SELECT("child_order_id"); |
||||
sql.SELECT("record_no"); |
||||
sql.SELECT("serial_no"); |
||||
sql.SELECT("`type`"); |
||||
sql.SELECT("user_id"); |
||||
sql.SELECT("user_phone"); |
||||
sql.SELECT("created_time"); |
||||
sql.SELECT("`status`"); |
||||
sql.SELECT("ext_1"); |
||||
sql.SELECT("ext_2"); |
||||
sql.SELECT("ext_3"); |
||||
sql.FROM("coupon_discount_package_record"); |
||||
applyWhere(sql, example, false); |
||||
|
||||
if (example != null && example.getOrderByClause() != null) { |
||||
sql.ORDER_BY(example.getOrderByClause()); |
||||
} |
||||
|
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String updateByExampleSelective(Map<String, Object> parameter) { |
||||
CouponDiscountPackageRecord record = (CouponDiscountPackageRecord) parameter.get("record"); |
||||
CouponDiscountPackageRecordExample example = (CouponDiscountPackageRecordExample) parameter.get("example"); |
||||
|
||||
SQL sql = new SQL(); |
||||
sql.UPDATE("coupon_discount_package_record"); |
||||
|
||||
if (record.getId() != null) { |
||||
sql.SET("id = #{record.id,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
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=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getOrderId() != null) { |
||||
sql.SET("order_id = #{record.orderId,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getChildOrderId() != null) { |
||||
sql.SET("child_order_id = #{record.childOrderId,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getRecordNo() != null) { |
||||
sql.SET("record_no = #{record.recordNo,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getSerialNo() != null) { |
||||
sql.SET("serial_no = #{record.serialNo,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getType() != null) { |
||||
sql.SET("`type` = #{record.type,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getUserId() != null) { |
||||
sql.SET("user_id = #{record.userId,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getUserPhone() != null) { |
||||
sql.SET("user_phone = #{record.userPhone,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getCreatedTime() != null) { |
||||
sql.SET("created_time = #{record.createdTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getStatus() != null) { |
||||
sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getExt1() != null) { |
||||
sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getExt2() != null) { |
||||
sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getExt3() != null) { |
||||
sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
applyWhere(sql, example, true); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String updateByExample(Map<String, Object> parameter) { |
||||
SQL sql = new SQL(); |
||||
sql.UPDATE("coupon_discount_package_record"); |
||||
|
||||
sql.SET("id = #{record.id,jdbcType=INTEGER}"); |
||||
sql.SET("discount_package_title = #{record.discountPackageTitle,jdbcType=VARCHAR}"); |
||||
sql.SET("discount_package_id = #{record.discountPackageId,jdbcType=INTEGER}"); |
||||
sql.SET("order_id = #{record.orderId,jdbcType=INTEGER}"); |
||||
sql.SET("child_order_id = #{record.childOrderId,jdbcType=INTEGER}"); |
||||
sql.SET("record_no = #{record.recordNo,jdbcType=VARCHAR}"); |
||||
sql.SET("serial_no = #{record.serialNo,jdbcType=VARCHAR}"); |
||||
sql.SET("`type` = #{record.type,jdbcType=INTEGER}"); |
||||
sql.SET("user_id = #{record.userId,jdbcType=INTEGER}"); |
||||
sql.SET("user_phone = #{record.userPhone,jdbcType=VARCHAR}"); |
||||
sql.SET("created_time = #{record.createdTime,jdbcType=TIMESTAMP}"); |
||||
sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); |
||||
sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}"); |
||||
sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}"); |
||||
sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}"); |
||||
|
||||
CouponDiscountPackageRecordExample example = (CouponDiscountPackageRecordExample) parameter.get("example"); |
||||
applyWhere(sql, example, true); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String updateByPrimaryKeySelective(CouponDiscountPackageRecord record) { |
||||
SQL sql = new SQL(); |
||||
sql.UPDATE("coupon_discount_package_record"); |
||||
|
||||
if (record.getDiscountPackageTitle() != null) { |
||||
sql.SET("discount_package_title = #{discountPackageTitle,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getDiscountPackageId() != null) { |
||||
sql.SET("discount_package_id = #{discountPackageId,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getOrderId() != null) { |
||||
sql.SET("order_id = #{orderId,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getChildOrderId() != null) { |
||||
sql.SET("child_order_id = #{childOrderId,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getRecordNo() != null) { |
||||
sql.SET("record_no = #{recordNo,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getSerialNo() != null) { |
||||
sql.SET("serial_no = #{serialNo,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getType() != null) { |
||||
sql.SET("`type` = #{type,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getUserId() != null) { |
||||
sql.SET("user_id = #{userId,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getUserPhone() != null) { |
||||
sql.SET("user_phone = #{userPhone,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getCreatedTime() != null) { |
||||
sql.SET("created_time = #{createdTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getStatus() != null) { |
||||
sql.SET("`status` = #{status,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getExt1() != null) { |
||||
sql.SET("ext_1 = #{ext1,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getExt2() != null) { |
||||
sql.SET("ext_2 = #{ext2,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getExt3() != null) { |
||||
sql.SET("ext_3 = #{ext3,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
sql.WHERE("id = #{id,jdbcType=INTEGER}"); |
||||
|
||||
return sql.toString(); |
||||
} |
||||
|
||||
protected void applyWhere(SQL sql, CouponDiscountPackageRecordExample example, boolean includeExamplePhrase) { |
||||
if (example == null) { |
||||
return; |
||||
} |
||||
|
||||
String parmPhrase1; |
||||
String parmPhrase1_th; |
||||
String parmPhrase2; |
||||
String parmPhrase2_th; |
||||
String parmPhrase3; |
||||
String parmPhrase3_th; |
||||
if (includeExamplePhrase) { |
||||
parmPhrase1 = "%s #{example.oredCriteria[%d].allCriteria[%d].value}"; |
||||
parmPhrase1_th = "%s #{example.oredCriteria[%d].allCriteria[%d].value,typeHandler=%s}"; |
||||
parmPhrase2 = "%s #{example.oredCriteria[%d].allCriteria[%d].value} and #{example.oredCriteria[%d].criteria[%d].secondValue}"; |
||||
parmPhrase2_th = "%s #{example.oredCriteria[%d].allCriteria[%d].value,typeHandler=%s} and #{example.oredCriteria[%d].criteria[%d].secondValue,typeHandler=%s}"; |
||||
parmPhrase3 = "#{example.oredCriteria[%d].allCriteria[%d].value[%d]}"; |
||||
parmPhrase3_th = "#{example.oredCriteria[%d].allCriteria[%d].value[%d],typeHandler=%s}"; |
||||
} else { |
||||
parmPhrase1 = "%s #{oredCriteria[%d].allCriteria[%d].value}"; |
||||
parmPhrase1_th = "%s #{oredCriteria[%d].allCriteria[%d].value,typeHandler=%s}"; |
||||
parmPhrase2 = "%s #{oredCriteria[%d].allCriteria[%d].value} and #{oredCriteria[%d].criteria[%d].secondValue}"; |
||||
parmPhrase2_th = "%s #{oredCriteria[%d].allCriteria[%d].value,typeHandler=%s} and #{oredCriteria[%d].criteria[%d].secondValue,typeHandler=%s}"; |
||||
parmPhrase3 = "#{oredCriteria[%d].allCriteria[%d].value[%d]}"; |
||||
parmPhrase3_th = "#{oredCriteria[%d].allCriteria[%d].value[%d],typeHandler=%s}"; |
||||
} |
||||
|
||||
StringBuilder sb = new StringBuilder(); |
||||
List<Criteria> oredCriteria = example.getOredCriteria(); |
||||
boolean firstCriteria = true; |
||||
for (int i = 0; i < oredCriteria.size(); i++) { |
||||
Criteria criteria = oredCriteria.get(i); |
||||
if (criteria.isValid()) { |
||||
if (firstCriteria) { |
||||
firstCriteria = false; |
||||
} else { |
||||
sb.append(" or "); |
||||
} |
||||
|
||||
sb.append('('); |
||||
List<Criterion> criterions = criteria.getAllCriteria(); |
||||
boolean firstCriterion = true; |
||||
for (int j = 0; j < criterions.size(); j++) { |
||||
Criterion criterion = criterions.get(j); |
||||
if (firstCriterion) { |
||||
firstCriterion = false; |
||||
} else { |
||||
sb.append(" and "); |
||||
} |
||||
|
||||
if (criterion.isNoValue()) { |
||||
sb.append(criterion.getCondition()); |
||||
} else if (criterion.isSingleValue()) { |
||||
if (criterion.getTypeHandler() == null) { |
||||
sb.append(String.format(parmPhrase1, criterion.getCondition(), i, j)); |
||||
} else { |
||||
sb.append(String.format(parmPhrase1_th, criterion.getCondition(), i, j,criterion.getTypeHandler())); |
||||
} |
||||
} else if (criterion.isBetweenValue()) { |
||||
if (criterion.getTypeHandler() == null) { |
||||
sb.append(String.format(parmPhrase2, criterion.getCondition(), i, j, i, j)); |
||||
} else { |
||||
sb.append(String.format(parmPhrase2_th, criterion.getCondition(), i, j, criterion.getTypeHandler(), i, j, criterion.getTypeHandler())); |
||||
} |
||||
} else if (criterion.isListValue()) { |
||||
sb.append(criterion.getCondition()); |
||||
sb.append(" ("); |
||||
List<?> listItems = (List<?>) criterion.getValue(); |
||||
boolean comma = false; |
||||
for (int k = 0; k < listItems.size(); k++) { |
||||
if (comma) { |
||||
sb.append(", "); |
||||
} else { |
||||
comma = true; |
||||
} |
||||
if (criterion.getTypeHandler() == null) { |
||||
sb.append(String.format(parmPhrase3, i, j, k)); |
||||
} else { |
||||
sb.append(String.format(parmPhrase3_th, i, j, k, criterion.getTypeHandler())); |
||||
} |
||||
} |
||||
sb.append(')'); |
||||
} |
||||
} |
||||
sb.append(')'); |
||||
} |
||||
} |
||||
|
||||
if (sb.length() > 0) { |
||||
sql.WHERE(sb.toString()); |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,360 @@ |
||||
package com.hfkj.dao; |
||||
|
||||
import com.hfkj.entity.CouponDiscountPackage; |
||||
import com.hfkj.entity.CouponDiscountPackageExample.Criteria; |
||||
import com.hfkj.entity.CouponDiscountPackageExample.Criterion; |
||||
import com.hfkj.entity.CouponDiscountPackageExample; |
||||
import java.util.List; |
||||
import java.util.Map; |
||||
import org.apache.ibatis.jdbc.SQL; |
||||
|
||||
public class CouponDiscountPackageSqlProvider { |
||||
|
||||
public String countByExample(CouponDiscountPackageExample example) { |
||||
SQL sql = new SQL(); |
||||
sql.SELECT("count(*)").FROM("coupon_discount_package"); |
||||
applyWhere(sql, example, false); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String deleteByExample(CouponDiscountPackageExample example) { |
||||
SQL sql = new SQL(); |
||||
sql.DELETE_FROM("coupon_discount_package"); |
||||
applyWhere(sql, example, false); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String insertSelective(CouponDiscountPackage record) { |
||||
SQL sql = new SQL(); |
||||
sql.INSERT_INTO("coupon_discount_package"); |
||||
|
||||
if (record.getKey() != null) { |
||||
sql.VALUES("`key`", "#{key,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getTitle() != null) { |
||||
sql.VALUES("title", "#{title,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getEffectiveTiem() != null) { |
||||
sql.VALUES("effective_tiem", "#{effectiveTiem,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getCreatedUserId() != null) { |
||||
sql.VALUES("created_user_id", "#{createdUserId,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getCreatedTime() != null) { |
||||
sql.VALUES("created_time", "#{createdTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getUpdatedUserId() != null) { |
||||
sql.VALUES("updated_user_id", "#{updatedUserId,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getUpdatedTime() != null) { |
||||
sql.VALUES("updated_time", "#{updatedTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getStatus() != null) { |
||||
sql.VALUES("`status`", "#{status,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getTotalStock() != null) { |
||||
sql.VALUES("total_stock", "#{totalStock,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getSurplusStock() != null) { |
||||
sql.VALUES("surplus_stock", "#{surplusStock,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getExt1() != null) { |
||||
sql.VALUES("ext_1", "#{ext1,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getExt2() != null) { |
||||
sql.VALUES("ext_2", "#{ext2,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getExt3() != null) { |
||||
sql.VALUES("ext_3", "#{ext3,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String selectByExample(CouponDiscountPackageExample example) { |
||||
SQL sql = new SQL(); |
||||
if (example != null && example.isDistinct()) { |
||||
sql.SELECT_DISTINCT("id"); |
||||
} else { |
||||
sql.SELECT("id"); |
||||
} |
||||
sql.SELECT("`key`"); |
||||
sql.SELECT("title"); |
||||
sql.SELECT("effective_tiem"); |
||||
sql.SELECT("created_user_id"); |
||||
sql.SELECT("created_time"); |
||||
sql.SELECT("updated_user_id"); |
||||
sql.SELECT("updated_time"); |
||||
sql.SELECT("`status`"); |
||||
sql.SELECT("total_stock"); |
||||
sql.SELECT("surplus_stock"); |
||||
sql.SELECT("ext_1"); |
||||
sql.SELECT("ext_2"); |
||||
sql.SELECT("ext_3"); |
||||
sql.FROM("coupon_discount_package"); |
||||
applyWhere(sql, example, false); |
||||
|
||||
if (example != null && example.getOrderByClause() != null) { |
||||
sql.ORDER_BY(example.getOrderByClause()); |
||||
} |
||||
|
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String updateByExampleSelective(Map<String, Object> parameter) { |
||||
CouponDiscountPackage record = (CouponDiscountPackage) parameter.get("record"); |
||||
CouponDiscountPackageExample example = (CouponDiscountPackageExample) parameter.get("example"); |
||||
|
||||
SQL sql = new SQL(); |
||||
sql.UPDATE("coupon_discount_package"); |
||||
|
||||
if (record.getId() != null) { |
||||
sql.SET("id = #{record.id,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getKey() != null) { |
||||
sql.SET("`key` = #{record.key,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getTitle() != null) { |
||||
sql.SET("title = #{record.title,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getEffectiveTiem() != null) { |
||||
sql.SET("effective_tiem = #{record.effectiveTiem,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getCreatedUserId() != null) { |
||||
sql.SET("created_user_id = #{record.createdUserId,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getCreatedTime() != null) { |
||||
sql.SET("created_time = #{record.createdTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getUpdatedUserId() != null) { |
||||
sql.SET("updated_user_id = #{record.updatedUserId,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getUpdatedTime() != null) { |
||||
sql.SET("updated_time = #{record.updatedTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getStatus() != null) { |
||||
sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getTotalStock() != null) { |
||||
sql.SET("total_stock = #{record.totalStock,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getSurplusStock() != null) { |
||||
sql.SET("surplus_stock = #{record.surplusStock,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getExt1() != null) { |
||||
sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getExt2() != null) { |
||||
sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getExt3() != null) { |
||||
sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
applyWhere(sql, example, true); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String updateByExample(Map<String, Object> parameter) { |
||||
SQL sql = new SQL(); |
||||
sql.UPDATE("coupon_discount_package"); |
||||
|
||||
sql.SET("id = #{record.id,jdbcType=INTEGER}"); |
||||
sql.SET("`key` = #{record.key,jdbcType=VARCHAR}"); |
||||
sql.SET("title = #{record.title,jdbcType=VARCHAR}"); |
||||
sql.SET("effective_tiem = #{record.effectiveTiem,jdbcType=TIMESTAMP}"); |
||||
sql.SET("created_user_id = #{record.createdUserId,jdbcType=INTEGER}"); |
||||
sql.SET("created_time = #{record.createdTime,jdbcType=TIMESTAMP}"); |
||||
sql.SET("updated_user_id = #{record.updatedUserId,jdbcType=INTEGER}"); |
||||
sql.SET("updated_time = #{record.updatedTime,jdbcType=TIMESTAMP}"); |
||||
sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); |
||||
sql.SET("total_stock = #{record.totalStock,jdbcType=INTEGER}"); |
||||
sql.SET("surplus_stock = #{record.surplusStock,jdbcType=INTEGER}"); |
||||
sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}"); |
||||
sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}"); |
||||
sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}"); |
||||
|
||||
CouponDiscountPackageExample example = (CouponDiscountPackageExample) parameter.get("example"); |
||||
applyWhere(sql, example, true); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String updateByPrimaryKeySelective(CouponDiscountPackage record) { |
||||
SQL sql = new SQL(); |
||||
sql.UPDATE("coupon_discount_package"); |
||||
|
||||
if (record.getKey() != null) { |
||||
sql.SET("`key` = #{key,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getTitle() != null) { |
||||
sql.SET("title = #{title,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getEffectiveTiem() != null) { |
||||
sql.SET("effective_tiem = #{effectiveTiem,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getCreatedUserId() != null) { |
||||
sql.SET("created_user_id = #{createdUserId,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getCreatedTime() != null) { |
||||
sql.SET("created_time = #{createdTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getUpdatedUserId() != null) { |
||||
sql.SET("updated_user_id = #{updatedUserId,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getUpdatedTime() != null) { |
||||
sql.SET("updated_time = #{updatedTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getStatus() != null) { |
||||
sql.SET("`status` = #{status,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getTotalStock() != null) { |
||||
sql.SET("total_stock = #{totalStock,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getSurplusStock() != null) { |
||||
sql.SET("surplus_stock = #{surplusStock,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getExt1() != null) { |
||||
sql.SET("ext_1 = #{ext1,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getExt2() != null) { |
||||
sql.SET("ext_2 = #{ext2,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getExt3() != null) { |
||||
sql.SET("ext_3 = #{ext3,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
sql.WHERE("id = #{id,jdbcType=INTEGER}"); |
||||
|
||||
return sql.toString(); |
||||
} |
||||
|
||||
protected void applyWhere(SQL sql, CouponDiscountPackageExample example, boolean includeExamplePhrase) { |
||||
if (example == null) { |
||||
return; |
||||
} |
||||
|
||||
String parmPhrase1; |
||||
String parmPhrase1_th; |
||||
String parmPhrase2; |
||||
String parmPhrase2_th; |
||||
String parmPhrase3; |
||||
String parmPhrase3_th; |
||||
if (includeExamplePhrase) { |
||||
parmPhrase1 = "%s #{example.oredCriteria[%d].allCriteria[%d].value}"; |
||||
parmPhrase1_th = "%s #{example.oredCriteria[%d].allCriteria[%d].value,typeHandler=%s}"; |
||||
parmPhrase2 = "%s #{example.oredCriteria[%d].allCriteria[%d].value} and #{example.oredCriteria[%d].criteria[%d].secondValue}"; |
||||
parmPhrase2_th = "%s #{example.oredCriteria[%d].allCriteria[%d].value,typeHandler=%s} and #{example.oredCriteria[%d].criteria[%d].secondValue,typeHandler=%s}"; |
||||
parmPhrase3 = "#{example.oredCriteria[%d].allCriteria[%d].value[%d]}"; |
||||
parmPhrase3_th = "#{example.oredCriteria[%d].allCriteria[%d].value[%d],typeHandler=%s}"; |
||||
} else { |
||||
parmPhrase1 = "%s #{oredCriteria[%d].allCriteria[%d].value}"; |
||||
parmPhrase1_th = "%s #{oredCriteria[%d].allCriteria[%d].value,typeHandler=%s}"; |
||||
parmPhrase2 = "%s #{oredCriteria[%d].allCriteria[%d].value} and #{oredCriteria[%d].criteria[%d].secondValue}"; |
||||
parmPhrase2_th = "%s #{oredCriteria[%d].allCriteria[%d].value,typeHandler=%s} and #{oredCriteria[%d].criteria[%d].secondValue,typeHandler=%s}"; |
||||
parmPhrase3 = "#{oredCriteria[%d].allCriteria[%d].value[%d]}"; |
||||
parmPhrase3_th = "#{oredCriteria[%d].allCriteria[%d].value[%d],typeHandler=%s}"; |
||||
} |
||||
|
||||
StringBuilder sb = new StringBuilder(); |
||||
List<Criteria> oredCriteria = example.getOredCriteria(); |
||||
boolean firstCriteria = true; |
||||
for (int i = 0; i < oredCriteria.size(); i++) { |
||||
Criteria criteria = oredCriteria.get(i); |
||||
if (criteria.isValid()) { |
||||
if (firstCriteria) { |
||||
firstCriteria = false; |
||||
} else { |
||||
sb.append(" or "); |
||||
} |
||||
|
||||
sb.append('('); |
||||
List<Criterion> criterions = criteria.getAllCriteria(); |
||||
boolean firstCriterion = true; |
||||
for (int j = 0; j < criterions.size(); j++) { |
||||
Criterion criterion = criterions.get(j); |
||||
if (firstCriterion) { |
||||
firstCriterion = false; |
||||
} else { |
||||
sb.append(" and "); |
||||
} |
||||
|
||||
if (criterion.isNoValue()) { |
||||
sb.append(criterion.getCondition()); |
||||
} else if (criterion.isSingleValue()) { |
||||
if (criterion.getTypeHandler() == null) { |
||||
sb.append(String.format(parmPhrase1, criterion.getCondition(), i, j)); |
||||
} else { |
||||
sb.append(String.format(parmPhrase1_th, criterion.getCondition(), i, j,criterion.getTypeHandler())); |
||||
} |
||||
} else if (criterion.isBetweenValue()) { |
||||
if (criterion.getTypeHandler() == null) { |
||||
sb.append(String.format(parmPhrase2, criterion.getCondition(), i, j, i, j)); |
||||
} else { |
||||
sb.append(String.format(parmPhrase2_th, criterion.getCondition(), i, j, criterion.getTypeHandler(), i, j, criterion.getTypeHandler())); |
||||
} |
||||
} else if (criterion.isListValue()) { |
||||
sb.append(criterion.getCondition()); |
||||
sb.append(" ("); |
||||
List<?> listItems = (List<?>) criterion.getValue(); |
||||
boolean comma = false; |
||||
for (int k = 0; k < listItems.size(); k++) { |
||||
if (comma) { |
||||
sb.append(", "); |
||||
} else { |
||||
comma = true; |
||||
} |
||||
if (criterion.getTypeHandler() == null) { |
||||
sb.append(String.format(parmPhrase3, i, j, k)); |
||||
} else { |
||||
sb.append(String.format(parmPhrase3_th, i, j, k, criterion.getTypeHandler())); |
||||
} |
||||
} |
||||
sb.append(')'); |
||||
} |
||||
} |
||||
sb.append(')'); |
||||
} |
||||
} |
||||
|
||||
if (sb.length() > 0) { |
||||
sql.WHERE(sb.toString()); |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,142 @@ |
||||
package com.hfkj.dao; |
||||
|
||||
import com.hfkj.entity.CouponDiscountUserRel; |
||||
import com.hfkj.entity.CouponDiscountUserRelExample; |
||||
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 CouponDiscountUserRelMapper extends CouponDiscountUserRelMapperExt { |
||||
@SelectProvider(type=CouponDiscountUserRelSqlProvider.class, method="countByExample") |
||||
long countByExample(CouponDiscountUserRelExample example); |
||||
|
||||
@DeleteProvider(type=CouponDiscountUserRelSqlProvider.class, method="deleteByExample") |
||||
int deleteByExample(CouponDiscountUserRelExample example); |
||||
|
||||
@Delete({ |
||||
"delete from coupon_discount_user_rel", |
||||
"where id = #{id,jdbcType=BIGINT}" |
||||
}) |
||||
int deleteByPrimaryKey(Long id); |
||||
|
||||
@Insert({ |
||||
"insert into coupon_discount_user_rel (discount_id, discount_name, ", |
||||
"discount_img, discount_type, ", |
||||
"discount_condition, discount_price, ", |
||||
"discount_percentage, user_id, ", |
||||
"`status`, use_time, ", |
||||
"create_time, use_end_time, ", |
||||
"ext_1, ext_2, ext_3)", |
||||
"values (#{discountId,jdbcType=BIGINT}, #{discountName,jdbcType=VARCHAR}, ", |
||||
"#{discountImg,jdbcType=VARCHAR}, #{discountType,jdbcType=INTEGER}, ", |
||||
"#{discountCondition,jdbcType=DECIMAL}, #{discountPrice,jdbcType=DECIMAL}, ", |
||||
"#{discountPercentage,jdbcType=DECIMAL}, #{userId,jdbcType=BIGINT}, ", |
||||
"#{status,jdbcType=INTEGER}, #{useTime,jdbcType=TIMESTAMP}, ", |
||||
"#{createTime,jdbcType=TIMESTAMP}, #{useEndTime,jdbcType=TIMESTAMP}, ", |
||||
"#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" |
||||
}) |
||||
@Options(useGeneratedKeys=true,keyProperty="id") |
||||
int insert(CouponDiscountUserRel record); |
||||
|
||||
@InsertProvider(type=CouponDiscountUserRelSqlProvider.class, method="insertSelective") |
||||
@Options(useGeneratedKeys=true,keyProperty="id") |
||||
int insertSelective(CouponDiscountUserRel record); |
||||
|
||||
@SelectProvider(type=CouponDiscountUserRelSqlProvider.class, method="selectByExample") |
||||
@Results({ |
||||
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), |
||||
@Result(column="discount_id", property="discountId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="discount_name", property="discountName", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="discount_img", property="discountImg", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="discount_type", property="discountType", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="discount_condition", property="discountCondition", jdbcType=JdbcType.DECIMAL), |
||||
@Result(column="discount_price", property="discountPrice", jdbcType=JdbcType.DECIMAL), |
||||
@Result(column="discount_percentage", property="discountPercentage", jdbcType=JdbcType.DECIMAL), |
||||
@Result(column="user_id", property="userId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="use_time", property="useTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="use_end_time", property="useEndTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@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<CouponDiscountUserRel> selectByExample(CouponDiscountUserRelExample example); |
||||
|
||||
@Select({ |
||||
"select", |
||||
"id, discount_id, discount_name, discount_img, discount_type, discount_condition, ", |
||||
"discount_price, discount_percentage, user_id, `status`, use_time, create_time, ", |
||||
"use_end_time, ext_1, ext_2, ext_3", |
||||
"from coupon_discount_user_rel", |
||||
"where id = #{id,jdbcType=BIGINT}" |
||||
}) |
||||
@Results({ |
||||
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), |
||||
@Result(column="discount_id", property="discountId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="discount_name", property="discountName", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="discount_img", property="discountImg", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="discount_type", property="discountType", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="discount_condition", property="discountCondition", jdbcType=JdbcType.DECIMAL), |
||||
@Result(column="discount_price", property="discountPrice", jdbcType=JdbcType.DECIMAL), |
||||
@Result(column="discount_percentage", property="discountPercentage", jdbcType=JdbcType.DECIMAL), |
||||
@Result(column="user_id", property="userId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="use_time", property="useTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="use_end_time", property="useEndTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@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) |
||||
}) |
||||
CouponDiscountUserRel selectByPrimaryKey(Long id); |
||||
|
||||
@UpdateProvider(type=CouponDiscountUserRelSqlProvider.class, method="updateByExampleSelective") |
||||
int updateByExampleSelective(@Param("record") CouponDiscountUserRel record, @Param("example") CouponDiscountUserRelExample example); |
||||
|
||||
@UpdateProvider(type=CouponDiscountUserRelSqlProvider.class, method="updateByExample") |
||||
int updateByExample(@Param("record") CouponDiscountUserRel record, @Param("example") CouponDiscountUserRelExample example); |
||||
|
||||
@UpdateProvider(type=CouponDiscountUserRelSqlProvider.class, method="updateByPrimaryKeySelective") |
||||
int updateByPrimaryKeySelective(CouponDiscountUserRel record); |
||||
|
||||
@Update({ |
||||
"update coupon_discount_user_rel", |
||||
"set discount_id = #{discountId,jdbcType=BIGINT},", |
||||
"discount_name = #{discountName,jdbcType=VARCHAR},", |
||||
"discount_img = #{discountImg,jdbcType=VARCHAR},", |
||||
"discount_type = #{discountType,jdbcType=INTEGER},", |
||||
"discount_condition = #{discountCondition,jdbcType=DECIMAL},", |
||||
"discount_price = #{discountPrice,jdbcType=DECIMAL},", |
||||
"discount_percentage = #{discountPercentage,jdbcType=DECIMAL},", |
||||
"user_id = #{userId,jdbcType=BIGINT},", |
||||
"`status` = #{status,jdbcType=INTEGER},", |
||||
"use_time = #{useTime,jdbcType=TIMESTAMP},", |
||||
"create_time = #{createTime,jdbcType=TIMESTAMP},", |
||||
"use_end_time = #{useEndTime,jdbcType=TIMESTAMP},", |
||||
"ext_1 = #{ext1,jdbcType=VARCHAR},", |
||||
"ext_2 = #{ext2,jdbcType=VARCHAR},", |
||||
"ext_3 = #{ext3,jdbcType=VARCHAR}", |
||||
"where id = #{id,jdbcType=BIGINT}" |
||||
}) |
||||
int updateByPrimaryKey(CouponDiscountUserRel record); |
||||
} |
@ -0,0 +1,7 @@ |
||||
package com.hfkj.dao; |
||||
|
||||
/** |
||||
* mapper扩展类 |
||||
*/ |
||||
public interface CouponDiscountUserRelMapperExt { |
||||
} |
@ -0,0 +1,388 @@ |
||||
package com.hfkj.dao; |
||||
|
||||
import com.hfkj.entity.CouponDiscountUserRel; |
||||
import com.hfkj.entity.CouponDiscountUserRelExample.Criteria; |
||||
import com.hfkj.entity.CouponDiscountUserRelExample.Criterion; |
||||
import com.hfkj.entity.CouponDiscountUserRelExample; |
||||
import java.util.List; |
||||
import java.util.Map; |
||||
import org.apache.ibatis.jdbc.SQL; |
||||
|
||||
public class CouponDiscountUserRelSqlProvider { |
||||
|
||||
public String countByExample(CouponDiscountUserRelExample example) { |
||||
SQL sql = new SQL(); |
||||
sql.SELECT("count(*)").FROM("coupon_discount_user_rel"); |
||||
applyWhere(sql, example, false); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String deleteByExample(CouponDiscountUserRelExample example) { |
||||
SQL sql = new SQL(); |
||||
sql.DELETE_FROM("coupon_discount_user_rel"); |
||||
applyWhere(sql, example, false); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String insertSelective(CouponDiscountUserRel record) { |
||||
SQL sql = new SQL(); |
||||
sql.INSERT_INTO("coupon_discount_user_rel"); |
||||
|
||||
if (record.getDiscountId() != null) { |
||||
sql.VALUES("discount_id", "#{discountId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getDiscountName() != null) { |
||||
sql.VALUES("discount_name", "#{discountName,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getDiscountImg() != null) { |
||||
sql.VALUES("discount_img", "#{discountImg,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getDiscountType() != null) { |
||||
sql.VALUES("discount_type", "#{discountType,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getDiscountCondition() != null) { |
||||
sql.VALUES("discount_condition", "#{discountCondition,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getDiscountPrice() != null) { |
||||
sql.VALUES("discount_price", "#{discountPrice,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getDiscountPercentage() != null) { |
||||
sql.VALUES("discount_percentage", "#{discountPercentage,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getUserId() != null) { |
||||
sql.VALUES("user_id", "#{userId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getStatus() != null) { |
||||
sql.VALUES("`status`", "#{status,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getUseTime() != null) { |
||||
sql.VALUES("use_time", "#{useTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getCreateTime() != null) { |
||||
sql.VALUES("create_time", "#{createTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getUseEndTime() != null) { |
||||
sql.VALUES("use_end_time", "#{useEndTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
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(CouponDiscountUserRelExample example) { |
||||
SQL sql = new SQL(); |
||||
if (example != null && example.isDistinct()) { |
||||
sql.SELECT_DISTINCT("id"); |
||||
} else { |
||||
sql.SELECT("id"); |
||||
} |
||||
sql.SELECT("discount_id"); |
||||
sql.SELECT("discount_name"); |
||||
sql.SELECT("discount_img"); |
||||
sql.SELECT("discount_type"); |
||||
sql.SELECT("discount_condition"); |
||||
sql.SELECT("discount_price"); |
||||
sql.SELECT("discount_percentage"); |
||||
sql.SELECT("user_id"); |
||||
sql.SELECT("`status`"); |
||||
sql.SELECT("use_time"); |
||||
sql.SELECT("create_time"); |
||||
sql.SELECT("use_end_time"); |
||||
sql.SELECT("ext_1"); |
||||
sql.SELECT("ext_2"); |
||||
sql.SELECT("ext_3"); |
||||
sql.FROM("coupon_discount_user_rel"); |
||||
applyWhere(sql, example, false); |
||||
|
||||
if (example != null && example.getOrderByClause() != null) { |
||||
sql.ORDER_BY(example.getOrderByClause()); |
||||
} |
||||
|
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String updateByExampleSelective(Map<String, Object> parameter) { |
||||
CouponDiscountUserRel record = (CouponDiscountUserRel) parameter.get("record"); |
||||
CouponDiscountUserRelExample example = (CouponDiscountUserRelExample) parameter.get("example"); |
||||
|
||||
SQL sql = new SQL(); |
||||
sql.UPDATE("coupon_discount_user_rel"); |
||||
|
||||
if (record.getId() != null) { |
||||
sql.SET("id = #{record.id,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getDiscountId() != null) { |
||||
sql.SET("discount_id = #{record.discountId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getDiscountName() != null) { |
||||
sql.SET("discount_name = #{record.discountName,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getDiscountImg() != null) { |
||||
sql.SET("discount_img = #{record.discountImg,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getDiscountType() != null) { |
||||
sql.SET("discount_type = #{record.discountType,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getDiscountCondition() != null) { |
||||
sql.SET("discount_condition = #{record.discountCondition,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getDiscountPrice() != null) { |
||||
sql.SET("discount_price = #{record.discountPrice,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getDiscountPercentage() != null) { |
||||
sql.SET("discount_percentage = #{record.discountPercentage,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getUserId() != null) { |
||||
sql.SET("user_id = #{record.userId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getStatus() != null) { |
||||
sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getUseTime() != null) { |
||||
sql.SET("use_time = #{record.useTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getCreateTime() != null) { |
||||
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getUseEndTime() != null) { |
||||
sql.SET("use_end_time = #{record.useEndTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getExt1() != null) { |
||||
sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getExt2() != null) { |
||||
sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getExt3() != null) { |
||||
sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
applyWhere(sql, example, true); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String updateByExample(Map<String, Object> parameter) { |
||||
SQL sql = new SQL(); |
||||
sql.UPDATE("coupon_discount_user_rel"); |
||||
|
||||
sql.SET("id = #{record.id,jdbcType=BIGINT}"); |
||||
sql.SET("discount_id = #{record.discountId,jdbcType=BIGINT}"); |
||||
sql.SET("discount_name = #{record.discountName,jdbcType=VARCHAR}"); |
||||
sql.SET("discount_img = #{record.discountImg,jdbcType=VARCHAR}"); |
||||
sql.SET("discount_type = #{record.discountType,jdbcType=INTEGER}"); |
||||
sql.SET("discount_condition = #{record.discountCondition,jdbcType=DECIMAL}"); |
||||
sql.SET("discount_price = #{record.discountPrice,jdbcType=DECIMAL}"); |
||||
sql.SET("discount_percentage = #{record.discountPercentage,jdbcType=DECIMAL}"); |
||||
sql.SET("user_id = #{record.userId,jdbcType=BIGINT}"); |
||||
sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); |
||||
sql.SET("use_time = #{record.useTime,jdbcType=TIMESTAMP}"); |
||||
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); |
||||
sql.SET("use_end_time = #{record.useEndTime,jdbcType=TIMESTAMP}"); |
||||
sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}"); |
||||
sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}"); |
||||
sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}"); |
||||
|
||||
CouponDiscountUserRelExample example = (CouponDiscountUserRelExample) parameter.get("example"); |
||||
applyWhere(sql, example, true); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String updateByPrimaryKeySelective(CouponDiscountUserRel record) { |
||||
SQL sql = new SQL(); |
||||
sql.UPDATE("coupon_discount_user_rel"); |
||||
|
||||
if (record.getDiscountId() != null) { |
||||
sql.SET("discount_id = #{discountId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getDiscountName() != null) { |
||||
sql.SET("discount_name = #{discountName,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getDiscountImg() != null) { |
||||
sql.SET("discount_img = #{discountImg,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getDiscountType() != null) { |
||||
sql.SET("discount_type = #{discountType,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getDiscountCondition() != null) { |
||||
sql.SET("discount_condition = #{discountCondition,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getDiscountPrice() != null) { |
||||
sql.SET("discount_price = #{discountPrice,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getDiscountPercentage() != null) { |
||||
sql.SET("discount_percentage = #{discountPercentage,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getUserId() != null) { |
||||
sql.SET("user_id = #{userId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getStatus() != null) { |
||||
sql.SET("`status` = #{status,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getUseTime() != null) { |
||||
sql.SET("use_time = #{useTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getCreateTime() != null) { |
||||
sql.SET("create_time = #{createTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getUseEndTime() != null) { |
||||
sql.SET("use_end_time = #{useEndTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
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, CouponDiscountUserRelExample example, boolean includeExamplePhrase) { |
||||
if (example == null) { |
||||
return; |
||||
} |
||||
|
||||
String parmPhrase1; |
||||
String parmPhrase1_th; |
||||
String parmPhrase2; |
||||
String parmPhrase2_th; |
||||
String parmPhrase3; |
||||
String parmPhrase3_th; |
||||
if (includeExamplePhrase) { |
||||
parmPhrase1 = "%s #{example.oredCriteria[%d].allCriteria[%d].value}"; |
||||
parmPhrase1_th = "%s #{example.oredCriteria[%d].allCriteria[%d].value,typeHandler=%s}"; |
||||
parmPhrase2 = "%s #{example.oredCriteria[%d].allCriteria[%d].value} and #{example.oredCriteria[%d].criteria[%d].secondValue}"; |
||||
parmPhrase2_th = "%s #{example.oredCriteria[%d].allCriteria[%d].value,typeHandler=%s} and #{example.oredCriteria[%d].criteria[%d].secondValue,typeHandler=%s}"; |
||||
parmPhrase3 = "#{example.oredCriteria[%d].allCriteria[%d].value[%d]}"; |
||||
parmPhrase3_th = "#{example.oredCriteria[%d].allCriteria[%d].value[%d],typeHandler=%s}"; |
||||
} else { |
||||
parmPhrase1 = "%s #{oredCriteria[%d].allCriteria[%d].value}"; |
||||
parmPhrase1_th = "%s #{oredCriteria[%d].allCriteria[%d].value,typeHandler=%s}"; |
||||
parmPhrase2 = "%s #{oredCriteria[%d].allCriteria[%d].value} and #{oredCriteria[%d].criteria[%d].secondValue}"; |
||||
parmPhrase2_th = "%s #{oredCriteria[%d].allCriteria[%d].value,typeHandler=%s} and #{oredCriteria[%d].criteria[%d].secondValue,typeHandler=%s}"; |
||||
parmPhrase3 = "#{oredCriteria[%d].allCriteria[%d].value[%d]}"; |
||||
parmPhrase3_th = "#{oredCriteria[%d].allCriteria[%d].value[%d],typeHandler=%s}"; |
||||
} |
||||
|
||||
StringBuilder sb = new StringBuilder(); |
||||
List<Criteria> oredCriteria = example.getOredCriteria(); |
||||
boolean firstCriteria = true; |
||||
for (int i = 0; i < oredCriteria.size(); i++) { |
||||
Criteria criteria = oredCriteria.get(i); |
||||
if (criteria.isValid()) { |
||||
if (firstCriteria) { |
||||
firstCriteria = false; |
||||
} else { |
||||
sb.append(" or "); |
||||
} |
||||
|
||||
sb.append('('); |
||||
List<Criterion> criterions = criteria.getAllCriteria(); |
||||
boolean firstCriterion = true; |
||||
for (int j = 0; j < criterions.size(); j++) { |
||||
Criterion criterion = criterions.get(j); |
||||
if (firstCriterion) { |
||||
firstCriterion = false; |
||||
} else { |
||||
sb.append(" and "); |
||||
} |
||||
|
||||
if (criterion.isNoValue()) { |
||||
sb.append(criterion.getCondition()); |
||||
} else if (criterion.isSingleValue()) { |
||||
if (criterion.getTypeHandler() == null) { |
||||
sb.append(String.format(parmPhrase1, criterion.getCondition(), i, j)); |
||||
} else { |
||||
sb.append(String.format(parmPhrase1_th, criterion.getCondition(), i, j,criterion.getTypeHandler())); |
||||
} |
||||
} else if (criterion.isBetweenValue()) { |
||||
if (criterion.getTypeHandler() == null) { |
||||
sb.append(String.format(parmPhrase2, criterion.getCondition(), i, j, i, j)); |
||||
} else { |
||||
sb.append(String.format(parmPhrase2_th, criterion.getCondition(), i, j, criterion.getTypeHandler(), i, j, criterion.getTypeHandler())); |
||||
} |
||||
} else if (criterion.isListValue()) { |
||||
sb.append(criterion.getCondition()); |
||||
sb.append(" ("); |
||||
List<?> listItems = (List<?>) criterion.getValue(); |
||||
boolean comma = false; |
||||
for (int k = 0; k < listItems.size(); k++) { |
||||
if (comma) { |
||||
sb.append(", "); |
||||
} else { |
||||
comma = true; |
||||
} |
||||
if (criterion.getTypeHandler() == null) { |
||||
sb.append(String.format(parmPhrase3, i, j, k)); |
||||
} else { |
||||
sb.append(String.format(parmPhrase3_th, i, j, k, criterion.getTypeHandler())); |
||||
} |
||||
} |
||||
sb.append(')'); |
||||
} |
||||
} |
||||
sb.append(')'); |
||||
} |
||||
} |
||||
|
||||
if (sb.length() > 0) { |
||||
sql.WHERE(sb.toString()); |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,163 @@ |
||||
package com.hfkj.dao; |
||||
|
||||
import com.hfkj.entity.GoodsLogistics; |
||||
import com.hfkj.entity.GoodsLogisticsExample; |
||||
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 GoodsLogisticsMapper extends GoodsLogisticsMapperExt { |
||||
@SelectProvider(type=GoodsLogisticsSqlProvider.class, method="countByExample") |
||||
long countByExample(GoodsLogisticsExample example); |
||||
|
||||
@DeleteProvider(type=GoodsLogisticsSqlProvider.class, method="deleteByExample") |
||||
int deleteByExample(GoodsLogisticsExample example); |
||||
|
||||
@Delete({ |
||||
"delete from goods_logistics", |
||||
"where id = #{id,jdbcType=BIGINT}" |
||||
}) |
||||
int deleteByPrimaryKey(Long id); |
||||
|
||||
@Insert({ |
||||
"insert into goods_logistics (user_id, order_id, ", |
||||
"task_no, `number`, ", |
||||
"logistics_status, logistics_status_desc, ", |
||||
"the_last_message, the_last_time, ", |
||||
"take_time, courier, ", |
||||
"courier_phone, logistics_trace_details, ", |
||||
"express_company_name, `status`, ", |
||||
"create_time, op_id, ", |
||||
"op_name, ext_1, ext_2, ", |
||||
"ext_3)", |
||||
"values (#{userId,jdbcType=BIGINT}, #{orderId,jdbcType=BIGINT}, ", |
||||
"#{taskNo,jdbcType=VARCHAR}, #{number,jdbcType=VARCHAR}, ", |
||||
"#{logisticsStatus,jdbcType=VARCHAR}, #{logisticsStatusDesc,jdbcType=VARCHAR}, ", |
||||
"#{theLastMessage,jdbcType=VARCHAR}, #{theLastTime,jdbcType=TIMESTAMP}, ", |
||||
"#{takeTime,jdbcType=VARCHAR}, #{courier,jdbcType=VARCHAR}, ", |
||||
"#{courierPhone,jdbcType=VARCHAR}, #{logisticsTraceDetails,jdbcType=VARCHAR}, ", |
||||
"#{expressCompanyName,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, ", |
||||
"#{createTime,jdbcType=TIMESTAMP}, #{opId,jdbcType=BIGINT}, ", |
||||
"#{opName,jdbcType=VARCHAR}, #{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, ", |
||||
"#{ext3,jdbcType=VARCHAR})" |
||||
}) |
||||
@Options(useGeneratedKeys=true,keyProperty="id") |
||||
int insert(GoodsLogistics record); |
||||
|
||||
@InsertProvider(type=GoodsLogisticsSqlProvider.class, method="insertSelective") |
||||
@Options(useGeneratedKeys=true,keyProperty="id") |
||||
int insertSelective(GoodsLogistics record); |
||||
|
||||
@SelectProvider(type=GoodsLogisticsSqlProvider.class, method="selectByExample") |
||||
@Results({ |
||||
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), |
||||
@Result(column="user_id", property="userId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="order_id", property="orderId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="task_no", property="taskNo", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="number", property="number", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="logistics_status", property="logisticsStatus", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="logistics_status_desc", property="logisticsStatusDesc", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="the_last_message", property="theLastMessage", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="the_last_time", property="theLastTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="take_time", property="takeTime", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="courier", property="courier", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="courier_phone", property="courierPhone", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="logistics_trace_details", property="logisticsTraceDetails", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="express_company_name", property="expressCompanyName", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@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<GoodsLogistics> selectByExample(GoodsLogisticsExample example); |
||||
|
||||
@Select({ |
||||
"select", |
||||
"id, user_id, order_id, task_no, `number`, logistics_status, logistics_status_desc, ", |
||||
"the_last_message, the_last_time, take_time, courier, courier_phone, logistics_trace_details, ", |
||||
"express_company_name, `status`, create_time, op_id, op_name, ext_1, ext_2, ext_3", |
||||
"from goods_logistics", |
||||
"where id = #{id,jdbcType=BIGINT}" |
||||
}) |
||||
@Results({ |
||||
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), |
||||
@Result(column="user_id", property="userId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="order_id", property="orderId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="task_no", property="taskNo", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="number", property="number", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="logistics_status", property="logisticsStatus", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="logistics_status_desc", property="logisticsStatusDesc", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="the_last_message", property="theLastMessage", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="the_last_time", property="theLastTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="take_time", property="takeTime", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="courier", property="courier", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="courier_phone", property="courierPhone", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="logistics_trace_details", property="logisticsTraceDetails", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="express_company_name", property="expressCompanyName", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@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) |
||||
}) |
||||
GoodsLogistics selectByPrimaryKey(Long id); |
||||
|
||||
@UpdateProvider(type=GoodsLogisticsSqlProvider.class, method="updateByExampleSelective") |
||||
int updateByExampleSelective(@Param("record") GoodsLogistics record, @Param("example") GoodsLogisticsExample example); |
||||
|
||||
@UpdateProvider(type=GoodsLogisticsSqlProvider.class, method="updateByExample") |
||||
int updateByExample(@Param("record") GoodsLogistics record, @Param("example") GoodsLogisticsExample example); |
||||
|
||||
@UpdateProvider(type=GoodsLogisticsSqlProvider.class, method="updateByPrimaryKeySelective") |
||||
int updateByPrimaryKeySelective(GoodsLogistics record); |
||||
|
||||
@Update({ |
||||
"update goods_logistics", |
||||
"set user_id = #{userId,jdbcType=BIGINT},", |
||||
"order_id = #{orderId,jdbcType=BIGINT},", |
||||
"task_no = #{taskNo,jdbcType=VARCHAR},", |
||||
"`number` = #{number,jdbcType=VARCHAR},", |
||||
"logistics_status = #{logisticsStatus,jdbcType=VARCHAR},", |
||||
"logistics_status_desc = #{logisticsStatusDesc,jdbcType=VARCHAR},", |
||||
"the_last_message = #{theLastMessage,jdbcType=VARCHAR},", |
||||
"the_last_time = #{theLastTime,jdbcType=TIMESTAMP},", |
||||
"take_time = #{takeTime,jdbcType=VARCHAR},", |
||||
"courier = #{courier,jdbcType=VARCHAR},", |
||||
"courier_phone = #{courierPhone,jdbcType=VARCHAR},", |
||||
"logistics_trace_details = #{logisticsTraceDetails,jdbcType=VARCHAR},", |
||||
"express_company_name = #{expressCompanyName,jdbcType=VARCHAR},", |
||||
"`status` = #{status,jdbcType=INTEGER},", |
||||
"create_time = #{createTime,jdbcType=TIMESTAMP},", |
||||
"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(GoodsLogistics record); |
||||
} |
@ -0,0 +1,7 @@ |
||||
package com.hfkj.dao; |
||||
|
||||
/** |
||||
* mapper扩展类 |
||||
*/ |
||||
public interface GoodsLogisticsMapperExt { |
||||
} |
@ -0,0 +1,458 @@ |
||||
package com.hfkj.dao; |
||||
|
||||
import com.hfkj.entity.GoodsLogistics; |
||||
import com.hfkj.entity.GoodsLogisticsExample.Criteria; |
||||
import com.hfkj.entity.GoodsLogisticsExample.Criterion; |
||||
import com.hfkj.entity.GoodsLogisticsExample; |
||||
import java.util.List; |
||||
import java.util.Map; |
||||
import org.apache.ibatis.jdbc.SQL; |
||||
|
||||
public class GoodsLogisticsSqlProvider { |
||||
|
||||
public String countByExample(GoodsLogisticsExample example) { |
||||
SQL sql = new SQL(); |
||||
sql.SELECT("count(*)").FROM("goods_logistics"); |
||||
applyWhere(sql, example, false); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String deleteByExample(GoodsLogisticsExample example) { |
||||
SQL sql = new SQL(); |
||||
sql.DELETE_FROM("goods_logistics"); |
||||
applyWhere(sql, example, false); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String insertSelective(GoodsLogistics record) { |
||||
SQL sql = new SQL(); |
||||
sql.INSERT_INTO("goods_logistics"); |
||||
|
||||
if (record.getUserId() != null) { |
||||
sql.VALUES("user_id", "#{userId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getOrderId() != null) { |
||||
sql.VALUES("order_id", "#{orderId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getTaskNo() != null) { |
||||
sql.VALUES("task_no", "#{taskNo,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getNumber() != null) { |
||||
sql.VALUES("`number`", "#{number,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getLogisticsStatus() != null) { |
||||
sql.VALUES("logistics_status", "#{logisticsStatus,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getLogisticsStatusDesc() != null) { |
||||
sql.VALUES("logistics_status_desc", "#{logisticsStatusDesc,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getTheLastMessage() != null) { |
||||
sql.VALUES("the_last_message", "#{theLastMessage,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getTheLastTime() != null) { |
||||
sql.VALUES("the_last_time", "#{theLastTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getTakeTime() != null) { |
||||
sql.VALUES("take_time", "#{takeTime,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getCourier() != null) { |
||||
sql.VALUES("courier", "#{courier,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getCourierPhone() != null) { |
||||
sql.VALUES("courier_phone", "#{courierPhone,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getLogisticsTraceDetails() != null) { |
||||
sql.VALUES("logistics_trace_details", "#{logisticsTraceDetails,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getExpressCompanyName() != null) { |
||||
sql.VALUES("express_company_name", "#{expressCompanyName,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getStatus() != null) { |
||||
sql.VALUES("`status`", "#{status,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getCreateTime() != null) { |
||||
sql.VALUES("create_time", "#{createTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
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(GoodsLogisticsExample example) { |
||||
SQL sql = new SQL(); |
||||
if (example != null && example.isDistinct()) { |
||||
sql.SELECT_DISTINCT("id"); |
||||
} else { |
||||
sql.SELECT("id"); |
||||
} |
||||
sql.SELECT("user_id"); |
||||
sql.SELECT("order_id"); |
||||
sql.SELECT("task_no"); |
||||
sql.SELECT("`number`"); |
||||
sql.SELECT("logistics_status"); |
||||
sql.SELECT("logistics_status_desc"); |
||||
sql.SELECT("the_last_message"); |
||||
sql.SELECT("the_last_time"); |
||||
sql.SELECT("take_time"); |
||||
sql.SELECT("courier"); |
||||
sql.SELECT("courier_phone"); |
||||
sql.SELECT("logistics_trace_details"); |
||||
sql.SELECT("express_company_name"); |
||||
sql.SELECT("`status`"); |
||||
sql.SELECT("create_time"); |
||||
sql.SELECT("op_id"); |
||||
sql.SELECT("op_name"); |
||||
sql.SELECT("ext_1"); |
||||
sql.SELECT("ext_2"); |
||||
sql.SELECT("ext_3"); |
||||
sql.FROM("goods_logistics"); |
||||
applyWhere(sql, example, false); |
||||
|
||||
if (example != null && example.getOrderByClause() != null) { |
||||
sql.ORDER_BY(example.getOrderByClause()); |
||||
} |
||||
|
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String updateByExampleSelective(Map<String, Object> parameter) { |
||||
GoodsLogistics record = (GoodsLogistics) parameter.get("record"); |
||||
GoodsLogisticsExample example = (GoodsLogisticsExample) parameter.get("example"); |
||||
|
||||
SQL sql = new SQL(); |
||||
sql.UPDATE("goods_logistics"); |
||||
|
||||
if (record.getId() != null) { |
||||
sql.SET("id = #{record.id,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getUserId() != null) { |
||||
sql.SET("user_id = #{record.userId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getOrderId() != null) { |
||||
sql.SET("order_id = #{record.orderId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getTaskNo() != null) { |
||||
sql.SET("task_no = #{record.taskNo,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getNumber() != null) { |
||||
sql.SET("`number` = #{record.number,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getLogisticsStatus() != null) { |
||||
sql.SET("logistics_status = #{record.logisticsStatus,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getLogisticsStatusDesc() != null) { |
||||
sql.SET("logistics_status_desc = #{record.logisticsStatusDesc,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getTheLastMessage() != null) { |
||||
sql.SET("the_last_message = #{record.theLastMessage,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getTheLastTime() != null) { |
||||
sql.SET("the_last_time = #{record.theLastTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getTakeTime() != null) { |
||||
sql.SET("take_time = #{record.takeTime,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getCourier() != null) { |
||||
sql.SET("courier = #{record.courier,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getCourierPhone() != null) { |
||||
sql.SET("courier_phone = #{record.courierPhone,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getLogisticsTraceDetails() != null) { |
||||
sql.SET("logistics_trace_details = #{record.logisticsTraceDetails,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getExpressCompanyName() != null) { |
||||
sql.SET("express_company_name = #{record.expressCompanyName,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getStatus() != null) { |
||||
sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getCreateTime() != null) { |
||||
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getOpId() != null) { |
||||
sql.SET("op_id = #{record.opId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getOpName() != null) { |
||||
sql.SET("op_name = #{record.opName,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getExt1() != null) { |
||||
sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getExt2() != null) { |
||||
sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getExt3() != null) { |
||||
sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
applyWhere(sql, example, true); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String updateByExample(Map<String, Object> parameter) { |
||||
SQL sql = new SQL(); |
||||
sql.UPDATE("goods_logistics"); |
||||
|
||||
sql.SET("id = #{record.id,jdbcType=BIGINT}"); |
||||
sql.SET("user_id = #{record.userId,jdbcType=BIGINT}"); |
||||
sql.SET("order_id = #{record.orderId,jdbcType=BIGINT}"); |
||||
sql.SET("task_no = #{record.taskNo,jdbcType=VARCHAR}"); |
||||
sql.SET("`number` = #{record.number,jdbcType=VARCHAR}"); |
||||
sql.SET("logistics_status = #{record.logisticsStatus,jdbcType=VARCHAR}"); |
||||
sql.SET("logistics_status_desc = #{record.logisticsStatusDesc,jdbcType=VARCHAR}"); |
||||
sql.SET("the_last_message = #{record.theLastMessage,jdbcType=VARCHAR}"); |
||||
sql.SET("the_last_time = #{record.theLastTime,jdbcType=TIMESTAMP}"); |
||||
sql.SET("take_time = #{record.takeTime,jdbcType=VARCHAR}"); |
||||
sql.SET("courier = #{record.courier,jdbcType=VARCHAR}"); |
||||
sql.SET("courier_phone = #{record.courierPhone,jdbcType=VARCHAR}"); |
||||
sql.SET("logistics_trace_details = #{record.logisticsTraceDetails,jdbcType=VARCHAR}"); |
||||
sql.SET("express_company_name = #{record.expressCompanyName,jdbcType=VARCHAR}"); |
||||
sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); |
||||
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); |
||||
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}"); |
||||
|
||||
GoodsLogisticsExample example = (GoodsLogisticsExample) parameter.get("example"); |
||||
applyWhere(sql, example, true); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String updateByPrimaryKeySelective(GoodsLogistics record) { |
||||
SQL sql = new SQL(); |
||||
sql.UPDATE("goods_logistics"); |
||||
|
||||
if (record.getUserId() != null) { |
||||
sql.SET("user_id = #{userId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getOrderId() != null) { |
||||
sql.SET("order_id = #{orderId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getTaskNo() != null) { |
||||
sql.SET("task_no = #{taskNo,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getNumber() != null) { |
||||
sql.SET("`number` = #{number,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getLogisticsStatus() != null) { |
||||
sql.SET("logistics_status = #{logisticsStatus,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getLogisticsStatusDesc() != null) { |
||||
sql.SET("logistics_status_desc = #{logisticsStatusDesc,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getTheLastMessage() != null) { |
||||
sql.SET("the_last_message = #{theLastMessage,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getTheLastTime() != null) { |
||||
sql.SET("the_last_time = #{theLastTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getTakeTime() != null) { |
||||
sql.SET("take_time = #{takeTime,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getCourier() != null) { |
||||
sql.SET("courier = #{courier,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getCourierPhone() != null) { |
||||
sql.SET("courier_phone = #{courierPhone,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getLogisticsTraceDetails() != null) { |
||||
sql.SET("logistics_trace_details = #{logisticsTraceDetails,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getExpressCompanyName() != null) { |
||||
sql.SET("express_company_name = #{expressCompanyName,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getStatus() != null) { |
||||
sql.SET("`status` = #{status,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getCreateTime() != null) { |
||||
sql.SET("create_time = #{createTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
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, GoodsLogisticsExample example, boolean includeExamplePhrase) { |
||||
if (example == null) { |
||||
return; |
||||
} |
||||
|
||||
String parmPhrase1; |
||||
String parmPhrase1_th; |
||||
String parmPhrase2; |
||||
String parmPhrase2_th; |
||||
String parmPhrase3; |
||||
String parmPhrase3_th; |
||||
if (includeExamplePhrase) { |
||||
parmPhrase1 = "%s #{example.oredCriteria[%d].allCriteria[%d].value}"; |
||||
parmPhrase1_th = "%s #{example.oredCriteria[%d].allCriteria[%d].value,typeHandler=%s}"; |
||||
parmPhrase2 = "%s #{example.oredCriteria[%d].allCriteria[%d].value} and #{example.oredCriteria[%d].criteria[%d].secondValue}"; |
||||
parmPhrase2_th = "%s #{example.oredCriteria[%d].allCriteria[%d].value,typeHandler=%s} and #{example.oredCriteria[%d].criteria[%d].secondValue,typeHandler=%s}"; |
||||
parmPhrase3 = "#{example.oredCriteria[%d].allCriteria[%d].value[%d]}"; |
||||
parmPhrase3_th = "#{example.oredCriteria[%d].allCriteria[%d].value[%d],typeHandler=%s}"; |
||||
} else { |
||||
parmPhrase1 = "%s #{oredCriteria[%d].allCriteria[%d].value}"; |
||||
parmPhrase1_th = "%s #{oredCriteria[%d].allCriteria[%d].value,typeHandler=%s}"; |
||||
parmPhrase2 = "%s #{oredCriteria[%d].allCriteria[%d].value} and #{oredCriteria[%d].criteria[%d].secondValue}"; |
||||
parmPhrase2_th = "%s #{oredCriteria[%d].allCriteria[%d].value,typeHandler=%s} and #{oredCriteria[%d].criteria[%d].secondValue,typeHandler=%s}"; |
||||
parmPhrase3 = "#{oredCriteria[%d].allCriteria[%d].value[%d]}"; |
||||
parmPhrase3_th = "#{oredCriteria[%d].allCriteria[%d].value[%d],typeHandler=%s}"; |
||||
} |
||||
|
||||
StringBuilder sb = new StringBuilder(); |
||||
List<Criteria> oredCriteria = example.getOredCriteria(); |
||||
boolean firstCriteria = true; |
||||
for (int i = 0; i < oredCriteria.size(); i++) { |
||||
Criteria criteria = oredCriteria.get(i); |
||||
if (criteria.isValid()) { |
||||
if (firstCriteria) { |
||||
firstCriteria = false; |
||||
} else { |
||||
sb.append(" or "); |
||||
} |
||||
|
||||
sb.append('('); |
||||
List<Criterion> criterions = criteria.getAllCriteria(); |
||||
boolean firstCriterion = true; |
||||
for (int j = 0; j < criterions.size(); j++) { |
||||
Criterion criterion = criterions.get(j); |
||||
if (firstCriterion) { |
||||
firstCriterion = false; |
||||
} else { |
||||
sb.append(" and "); |
||||
} |
||||
|
||||
if (criterion.isNoValue()) { |
||||
sb.append(criterion.getCondition()); |
||||
} else if (criterion.isSingleValue()) { |
||||
if (criterion.getTypeHandler() == null) { |
||||
sb.append(String.format(parmPhrase1, criterion.getCondition(), i, j)); |
||||
} else { |
||||
sb.append(String.format(parmPhrase1_th, criterion.getCondition(), i, j,criterion.getTypeHandler())); |
||||
} |
||||
} else if (criterion.isBetweenValue()) { |
||||
if (criterion.getTypeHandler() == null) { |
||||
sb.append(String.format(parmPhrase2, criterion.getCondition(), i, j, i, j)); |
||||
} else { |
||||
sb.append(String.format(parmPhrase2_th, criterion.getCondition(), i, j, criterion.getTypeHandler(), i, j, criterion.getTypeHandler())); |
||||
} |
||||
} else if (criterion.isListValue()) { |
||||
sb.append(criterion.getCondition()); |
||||
sb.append(" ("); |
||||
List<?> listItems = (List<?>) criterion.getValue(); |
||||
boolean comma = false; |
||||
for (int k = 0; k < listItems.size(); k++) { |
||||
if (comma) { |
||||
sb.append(", "); |
||||
} else { |
||||
comma = true; |
||||
} |
||||
if (criterion.getTypeHandler() == null) { |
||||
sb.append(String.format(parmPhrase3, i, j, k)); |
||||
} else { |
||||
sb.append(String.format(parmPhrase3_th, i, j, k, criterion.getTypeHandler())); |
||||
} |
||||
} |
||||
sb.append(')'); |
||||
} |
||||
} |
||||
sb.append(')'); |
||||
} |
||||
} |
||||
|
||||
if (sb.length() > 0) { |
||||
sql.WHERE(sb.toString()); |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,138 @@ |
||||
package com.hfkj.dao; |
||||
|
||||
import com.hfkj.entity.GoodsUserAddress; |
||||
import com.hfkj.entity.GoodsUserAddressExample; |
||||
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 GoodsUserAddressMapper extends GoodsUserAddressMapperExt { |
||||
@SelectProvider(type=GoodsUserAddressSqlProvider.class, method="countByExample") |
||||
long countByExample(GoodsUserAddressExample example); |
||||
|
||||
@DeleteProvider(type=GoodsUserAddressSqlProvider.class, method="deleteByExample") |
||||
int deleteByExample(GoodsUserAddressExample example); |
||||
|
||||
@Delete({ |
||||
"delete from goods_user_address", |
||||
"where id = #{id,jdbcType=BIGINT}" |
||||
}) |
||||
int deleteByPrimaryKey(Long id); |
||||
|
||||
@Insert({ |
||||
"insert into goods_user_address (user_id, consignee, ", |
||||
"phone, address, ", |
||||
"region_id, region_name, ", |
||||
"whether_default, create_time, ", |
||||
"update_time, op_id, ", |
||||
"op_name, ext_1, ext_2, ", |
||||
"ext_3)", |
||||
"values (#{userId,jdbcType=BIGINT}, #{consignee,jdbcType=VARCHAR}, ", |
||||
"#{phone,jdbcType=VARCHAR}, #{address,jdbcType=VARCHAR}, ", |
||||
"#{regionId,jdbcType=VARCHAR}, #{regionName,jdbcType=VARCHAR}, ", |
||||
"#{whetherDefault,jdbcType=BIT}, #{createTime,jdbcType=TIMESTAMP}, ", |
||||
"#{updateTime,jdbcType=TIMESTAMP}, #{opId,jdbcType=BIGINT}, ", |
||||
"#{opName,jdbcType=VARCHAR}, #{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, ", |
||||
"#{ext3,jdbcType=VARCHAR})" |
||||
}) |
||||
@Options(useGeneratedKeys=true,keyProperty="id") |
||||
int insert(GoodsUserAddress record); |
||||
|
||||
@InsertProvider(type=GoodsUserAddressSqlProvider.class, method="insertSelective") |
||||
@Options(useGeneratedKeys=true,keyProperty="id") |
||||
int insertSelective(GoodsUserAddress record); |
||||
|
||||
@SelectProvider(type=GoodsUserAddressSqlProvider.class, method="selectByExample") |
||||
@Results({ |
||||
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), |
||||
@Result(column="user_id", property="userId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="consignee", property="consignee", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="phone", property="phone", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="address", property="address", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="region_id", property="regionId", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="region_name", property="regionName", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="whether_default", property="whetherDefault", jdbcType=JdbcType.BIT), |
||||
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@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<GoodsUserAddress> selectByExample(GoodsUserAddressExample example); |
||||
|
||||
@Select({ |
||||
"select", |
||||
"id, user_id, consignee, phone, address, region_id, region_name, whether_default, ", |
||||
"create_time, update_time, op_id, op_name, ext_1, ext_2, ext_3", |
||||
"from goods_user_address", |
||||
"where id = #{id,jdbcType=BIGINT}" |
||||
}) |
||||
@Results({ |
||||
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), |
||||
@Result(column="user_id", property="userId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="consignee", property="consignee", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="phone", property="phone", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="address", property="address", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="region_id", property="regionId", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="region_name", property="regionName", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="whether_default", property="whetherDefault", jdbcType=JdbcType.BIT), |
||||
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@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) |
||||
}) |
||||
GoodsUserAddress selectByPrimaryKey(Long id); |
||||
|
||||
@UpdateProvider(type=GoodsUserAddressSqlProvider.class, method="updateByExampleSelective") |
||||
int updateByExampleSelective(@Param("record") GoodsUserAddress record, @Param("example") GoodsUserAddressExample example); |
||||
|
||||
@UpdateProvider(type=GoodsUserAddressSqlProvider.class, method="updateByExample") |
||||
int updateByExample(@Param("record") GoodsUserAddress record, @Param("example") GoodsUserAddressExample example); |
||||
|
||||
@UpdateProvider(type=GoodsUserAddressSqlProvider.class, method="updateByPrimaryKeySelective") |
||||
int updateByPrimaryKeySelective(GoodsUserAddress record); |
||||
|
||||
@Update({ |
||||
"update goods_user_address", |
||||
"set user_id = #{userId,jdbcType=BIGINT},", |
||||
"consignee = #{consignee,jdbcType=VARCHAR},", |
||||
"phone = #{phone,jdbcType=VARCHAR},", |
||||
"address = #{address,jdbcType=VARCHAR},", |
||||
"region_id = #{regionId,jdbcType=VARCHAR},", |
||||
"region_name = #{regionName,jdbcType=VARCHAR},", |
||||
"whether_default = #{whetherDefault,jdbcType=BIT},", |
||||
"create_time = #{createTime,jdbcType=TIMESTAMP},", |
||||
"update_time = #{updateTime,jdbcType=TIMESTAMP},", |
||||
"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(GoodsUserAddress record); |
||||
} |
@ -0,0 +1,7 @@ |
||||
package com.hfkj.dao; |
||||
|
||||
/** |
||||
* mapper扩展类 |
||||
*/ |
||||
public interface GoodsUserAddressMapperExt { |
||||
} |
@ -0,0 +1,374 @@ |
||||
package com.hfkj.dao; |
||||
|
||||
import com.hfkj.entity.GoodsUserAddress; |
||||
import com.hfkj.entity.GoodsUserAddressExample.Criteria; |
||||
import com.hfkj.entity.GoodsUserAddressExample.Criterion; |
||||
import com.hfkj.entity.GoodsUserAddressExample; |
||||
import java.util.List; |
||||
import java.util.Map; |
||||
import org.apache.ibatis.jdbc.SQL; |
||||
|
||||
public class GoodsUserAddressSqlProvider { |
||||
|
||||
public String countByExample(GoodsUserAddressExample example) { |
||||
SQL sql = new SQL(); |
||||
sql.SELECT("count(*)").FROM("goods_user_address"); |
||||
applyWhere(sql, example, false); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String deleteByExample(GoodsUserAddressExample example) { |
||||
SQL sql = new SQL(); |
||||
sql.DELETE_FROM("goods_user_address"); |
||||
applyWhere(sql, example, false); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String insertSelective(GoodsUserAddress record) { |
||||
SQL sql = new SQL(); |
||||
sql.INSERT_INTO("goods_user_address"); |
||||
|
||||
if (record.getUserId() != null) { |
||||
sql.VALUES("user_id", "#{userId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getConsignee() != null) { |
||||
sql.VALUES("consignee", "#{consignee,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getPhone() != null) { |
||||
sql.VALUES("phone", "#{phone,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getAddress() != null) { |
||||
sql.VALUES("address", "#{address,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getRegionId() != null) { |
||||
sql.VALUES("region_id", "#{regionId,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getRegionName() != null) { |
||||
sql.VALUES("region_name", "#{regionName,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getWhetherDefault() != null) { |
||||
sql.VALUES("whether_default", "#{whetherDefault,jdbcType=BIT}"); |
||||
} |
||||
|
||||
if (record.getCreateTime() != null) { |
||||
sql.VALUES("create_time", "#{createTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getUpdateTime() != null) { |
||||
sql.VALUES("update_time", "#{updateTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
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(GoodsUserAddressExample example) { |
||||
SQL sql = new SQL(); |
||||
if (example != null && example.isDistinct()) { |
||||
sql.SELECT_DISTINCT("id"); |
||||
} else { |
||||
sql.SELECT("id"); |
||||
} |
||||
sql.SELECT("user_id"); |
||||
sql.SELECT("consignee"); |
||||
sql.SELECT("phone"); |
||||
sql.SELECT("address"); |
||||
sql.SELECT("region_id"); |
||||
sql.SELECT("region_name"); |
||||
sql.SELECT("whether_default"); |
||||
sql.SELECT("create_time"); |
||||
sql.SELECT("update_time"); |
||||
sql.SELECT("op_id"); |
||||
sql.SELECT("op_name"); |
||||
sql.SELECT("ext_1"); |
||||
sql.SELECT("ext_2"); |
||||
sql.SELECT("ext_3"); |
||||
sql.FROM("goods_user_address"); |
||||
applyWhere(sql, example, false); |
||||
|
||||
if (example != null && example.getOrderByClause() != null) { |
||||
sql.ORDER_BY(example.getOrderByClause()); |
||||
} |
||||
|
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String updateByExampleSelective(Map<String, Object> parameter) { |
||||
GoodsUserAddress record = (GoodsUserAddress) parameter.get("record"); |
||||
GoodsUserAddressExample example = (GoodsUserAddressExample) parameter.get("example"); |
||||
|
||||
SQL sql = new SQL(); |
||||
sql.UPDATE("goods_user_address"); |
||||
|
||||
if (record.getId() != null) { |
||||
sql.SET("id = #{record.id,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getUserId() != null) { |
||||
sql.SET("user_id = #{record.userId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getConsignee() != null) { |
||||
sql.SET("consignee = #{record.consignee,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getPhone() != null) { |
||||
sql.SET("phone = #{record.phone,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getAddress() != null) { |
||||
sql.SET("address = #{record.address,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getRegionId() != null) { |
||||
sql.SET("region_id = #{record.regionId,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getRegionName() != null) { |
||||
sql.SET("region_name = #{record.regionName,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getWhetherDefault() != null) { |
||||
sql.SET("whether_default = #{record.whetherDefault,jdbcType=BIT}"); |
||||
} |
||||
|
||||
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.getOpId() != null) { |
||||
sql.SET("op_id = #{record.opId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getOpName() != null) { |
||||
sql.SET("op_name = #{record.opName,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getExt1() != null) { |
||||
sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getExt2() != null) { |
||||
sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getExt3() != null) { |
||||
sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
applyWhere(sql, example, true); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String updateByExample(Map<String, Object> parameter) { |
||||
SQL sql = new SQL(); |
||||
sql.UPDATE("goods_user_address"); |
||||
|
||||
sql.SET("id = #{record.id,jdbcType=BIGINT}"); |
||||
sql.SET("user_id = #{record.userId,jdbcType=BIGINT}"); |
||||
sql.SET("consignee = #{record.consignee,jdbcType=VARCHAR}"); |
||||
sql.SET("phone = #{record.phone,jdbcType=VARCHAR}"); |
||||
sql.SET("address = #{record.address,jdbcType=VARCHAR}"); |
||||
sql.SET("region_id = #{record.regionId,jdbcType=VARCHAR}"); |
||||
sql.SET("region_name = #{record.regionName,jdbcType=VARCHAR}"); |
||||
sql.SET("whether_default = #{record.whetherDefault,jdbcType=BIT}"); |
||||
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); |
||||
sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}"); |
||||
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}"); |
||||
|
||||
GoodsUserAddressExample example = (GoodsUserAddressExample) parameter.get("example"); |
||||
applyWhere(sql, example, true); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String updateByPrimaryKeySelective(GoodsUserAddress record) { |
||||
SQL sql = new SQL(); |
||||
sql.UPDATE("goods_user_address"); |
||||
|
||||
if (record.getUserId() != null) { |
||||
sql.SET("user_id = #{userId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getConsignee() != null) { |
||||
sql.SET("consignee = #{consignee,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getPhone() != null) { |
||||
sql.SET("phone = #{phone,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getAddress() != null) { |
||||
sql.SET("address = #{address,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getRegionId() != null) { |
||||
sql.SET("region_id = #{regionId,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getRegionName() != null) { |
||||
sql.SET("region_name = #{regionName,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getWhetherDefault() != null) { |
||||
sql.SET("whether_default = #{whetherDefault,jdbcType=BIT}"); |
||||
} |
||||
|
||||
if (record.getCreateTime() != null) { |
||||
sql.SET("create_time = #{createTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getUpdateTime() != null) { |
||||
sql.SET("update_time = #{updateTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
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, GoodsUserAddressExample example, boolean includeExamplePhrase) { |
||||
if (example == null) { |
||||
return; |
||||
} |
||||
|
||||
String parmPhrase1; |
||||
String parmPhrase1_th; |
||||
String parmPhrase2; |
||||
String parmPhrase2_th; |
||||
String parmPhrase3; |
||||
String parmPhrase3_th; |
||||
if (includeExamplePhrase) { |
||||
parmPhrase1 = "%s #{example.oredCriteria[%d].allCriteria[%d].value}"; |
||||
parmPhrase1_th = "%s #{example.oredCriteria[%d].allCriteria[%d].value,typeHandler=%s}"; |
||||
parmPhrase2 = "%s #{example.oredCriteria[%d].allCriteria[%d].value} and #{example.oredCriteria[%d].criteria[%d].secondValue}"; |
||||
parmPhrase2_th = "%s #{example.oredCriteria[%d].allCriteria[%d].value,typeHandler=%s} and #{example.oredCriteria[%d].criteria[%d].secondValue,typeHandler=%s}"; |
||||
parmPhrase3 = "#{example.oredCriteria[%d].allCriteria[%d].value[%d]}"; |
||||
parmPhrase3_th = "#{example.oredCriteria[%d].allCriteria[%d].value[%d],typeHandler=%s}"; |
||||
} else { |
||||
parmPhrase1 = "%s #{oredCriteria[%d].allCriteria[%d].value}"; |
||||
parmPhrase1_th = "%s #{oredCriteria[%d].allCriteria[%d].value,typeHandler=%s}"; |
||||
parmPhrase2 = "%s #{oredCriteria[%d].allCriteria[%d].value} and #{oredCriteria[%d].criteria[%d].secondValue}"; |
||||
parmPhrase2_th = "%s #{oredCriteria[%d].allCriteria[%d].value,typeHandler=%s} and #{oredCriteria[%d].criteria[%d].secondValue,typeHandler=%s}"; |
||||
parmPhrase3 = "#{oredCriteria[%d].allCriteria[%d].value[%d]}"; |
||||
parmPhrase3_th = "#{oredCriteria[%d].allCriteria[%d].value[%d],typeHandler=%s}"; |
||||
} |
||||
|
||||
StringBuilder sb = new StringBuilder(); |
||||
List<Criteria> oredCriteria = example.getOredCriteria(); |
||||
boolean firstCriteria = true; |
||||
for (int i = 0; i < oredCriteria.size(); i++) { |
||||
Criteria criteria = oredCriteria.get(i); |
||||
if (criteria.isValid()) { |
||||
if (firstCriteria) { |
||||
firstCriteria = false; |
||||
} else { |
||||
sb.append(" or "); |
||||
} |
||||
|
||||
sb.append('('); |
||||
List<Criterion> criterions = criteria.getAllCriteria(); |
||||
boolean firstCriterion = true; |
||||
for (int j = 0; j < criterions.size(); j++) { |
||||
Criterion criterion = criterions.get(j); |
||||
if (firstCriterion) { |
||||
firstCriterion = false; |
||||
} else { |
||||
sb.append(" and "); |
||||
} |
||||
|
||||
if (criterion.isNoValue()) { |
||||
sb.append(criterion.getCondition()); |
||||
} else if (criterion.isSingleValue()) { |
||||
if (criterion.getTypeHandler() == null) { |
||||
sb.append(String.format(parmPhrase1, criterion.getCondition(), i, j)); |
||||
} else { |
||||
sb.append(String.format(parmPhrase1_th, criterion.getCondition(), i, j,criterion.getTypeHandler())); |
||||
} |
||||
} else if (criterion.isBetweenValue()) { |
||||
if (criterion.getTypeHandler() == null) { |
||||
sb.append(String.format(parmPhrase2, criterion.getCondition(), i, j, i, j)); |
||||
} else { |
||||
sb.append(String.format(parmPhrase2_th, criterion.getCondition(), i, j, criterion.getTypeHandler(), i, j, criterion.getTypeHandler())); |
||||
} |
||||
} else if (criterion.isListValue()) { |
||||
sb.append(criterion.getCondition()); |
||||
sb.append(" ("); |
||||
List<?> listItems = (List<?>) criterion.getValue(); |
||||
boolean comma = false; |
||||
for (int k = 0; k < listItems.size(); k++) { |
||||
if (comma) { |
||||
sb.append(", "); |
||||
} else { |
||||
comma = true; |
||||
} |
||||
if (criterion.getTypeHandler() == null) { |
||||
sb.append(String.format(parmPhrase3, i, j, k)); |
||||
} else { |
||||
sb.append(String.format(parmPhrase3_th, i, j, k, criterion.getTypeHandler())); |
||||
} |
||||
} |
||||
sb.append(')'); |
||||
} |
||||
} |
||||
sb.append(')'); |
||||
} |
||||
} |
||||
|
||||
if (sb.length() > 0) { |
||||
sql.WHERE(sb.toString()); |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,112 @@ |
||||
package com.hfkj.entity; |
||||
|
||||
import java.io.Serializable; |
||||
|
||||
/** |
||||
* bs_city |
||||
* @author |
||||
*/ |
||||
/** |
||||
* |
||||
* 代码由工具生成 |
||||
* |
||||
**/ |
||||
public class BsCity implements Serializable { |
||||
/** |
||||
* 主键 |
||||
*/ |
||||
private Long regionId; |
||||
|
||||
/** |
||||
* 省市区 |
||||
*/ |
||||
private String regionName; |
||||
|
||||
/** |
||||
* 父类id |
||||
*/ |
||||
private Long parentId; |
||||
|
||||
/** |
||||
* 状态,是否可用 |
||||
*/ |
||||
private Integer status; |
||||
|
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
public Long getRegionId() { |
||||
return regionId; |
||||
} |
||||
|
||||
public void setRegionId(Long regionId) { |
||||
this.regionId = regionId; |
||||
} |
||||
|
||||
public String getRegionName() { |
||||
return regionName; |
||||
} |
||||
|
||||
public void setRegionName(String regionName) { |
||||
this.regionName = regionName; |
||||
} |
||||
|
||||
public Long getParentId() { |
||||
return parentId; |
||||
} |
||||
|
||||
public void setParentId(Long parentId) { |
||||
this.parentId = parentId; |
||||
} |
||||
|
||||
public Integer getStatus() { |
||||
return status; |
||||
} |
||||
|
||||
public void setStatus(Integer status) { |
||||
this.status = status; |
||||
} |
||||
|
||||
@Override |
||||
public boolean equals(Object that) { |
||||
if (this == that) { |
||||
return true; |
||||
} |
||||
if (that == null) { |
||||
return false; |
||||
} |
||||
if (getClass() != that.getClass()) { |
||||
return false; |
||||
} |
||||
BsCity other = (BsCity) that; |
||||
return (this.getRegionId() == null ? other.getRegionId() == null : this.getRegionId().equals(other.getRegionId())) |
||||
&& (this.getRegionName() == null ? other.getRegionName() == null : this.getRegionName().equals(other.getRegionName())) |
||||
&& (this.getParentId() == null ? other.getParentId() == null : this.getParentId().equals(other.getParentId())) |
||||
&& (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())); |
||||
} |
||||
|
||||
@Override |
||||
public int hashCode() { |
||||
final int prime = 31; |
||||
int result = 1; |
||||
result = prime * result + ((getRegionId() == null) ? 0 : getRegionId().hashCode()); |
||||
result = prime * result + ((getRegionName() == null) ? 0 : getRegionName().hashCode()); |
||||
result = prime * result + ((getParentId() == null) ? 0 : getParentId().hashCode()); |
||||
result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); |
||||
return result; |
||||
} |
||||
|
||||
@Override |
||||
public String toString() { |
||||
StringBuilder sb = new StringBuilder(); |
||||
sb.append(getClass().getSimpleName()); |
||||
sb.append(" ["); |
||||
sb.append("Hash = ").append(hashCode()); |
||||
sb.append(", regionId=").append(regionId); |
||||
sb.append(", regionName=").append(regionName); |
||||
sb.append(", parentId=").append(parentId); |
||||
sb.append(", status=").append(status); |
||||
sb.append(", serialVersionUID=").append(serialVersionUID); |
||||
sb.append("]"); |
||||
return sb.toString(); |
||||
} |
||||
} |
@ -0,0 +1,472 @@ |
||||
package com.hfkj.entity; |
||||
|
||||
import java.util.ArrayList; |
||||
import java.util.List; |
||||
|
||||
public class BsCityExample { |
||||
protected String orderByClause; |
||||
|
||||
protected boolean distinct; |
||||
|
||||
protected List<Criteria> oredCriteria; |
||||
|
||||
private Integer limit; |
||||
|
||||
private Long offset; |
||||
|
||||
public BsCityExample() { |
||||
oredCriteria = new ArrayList<Criteria>(); |
||||
} |
||||
|
||||
public void setOrderByClause(String orderByClause) { |
||||
this.orderByClause = orderByClause; |
||||
} |
||||
|
||||
public String getOrderByClause() { |
||||
return orderByClause; |
||||
} |
||||
|
||||
public void setDistinct(boolean distinct) { |
||||
this.distinct = distinct; |
||||
} |
||||
|
||||
public boolean isDistinct() { |
||||
return distinct; |
||||
} |
||||
|
||||
public List<Criteria> getOredCriteria() { |
||||
return oredCriteria; |
||||
} |
||||
|
||||
public void or(Criteria criteria) { |
||||
oredCriteria.add(criteria); |
||||
} |
||||
|
||||
public Criteria or() { |
||||
Criteria criteria = createCriteriaInternal(); |
||||
oredCriteria.add(criteria); |
||||
return criteria; |
||||
} |
||||
|
||||
public Criteria createCriteria() { |
||||
Criteria criteria = createCriteriaInternal(); |
||||
if (oredCriteria.size() == 0) { |
||||
oredCriteria.add(criteria); |
||||
} |
||||
return criteria; |
||||
} |
||||
|
||||
protected Criteria createCriteriaInternal() { |
||||
Criteria criteria = new Criteria(); |
||||
return criteria; |
||||
} |
||||
|
||||
public void clear() { |
||||
oredCriteria.clear(); |
||||
orderByClause = null; |
||||
distinct = false; |
||||
} |
||||
|
||||
public void setLimit(Integer limit) { |
||||
this.limit = limit; |
||||
} |
||||
|
||||
public Integer getLimit() { |
||||
return limit; |
||||
} |
||||
|
||||
public void setOffset(Long offset) { |
||||
this.offset = offset; |
||||
} |
||||
|
||||
public Long getOffset() { |
||||
return offset; |
||||
} |
||||
|
||||
protected abstract static class GeneratedCriteria { |
||||
protected List<Criterion> criteria; |
||||
|
||||
protected GeneratedCriteria() { |
||||
super(); |
||||
criteria = new ArrayList<Criterion>(); |
||||
} |
||||
|
||||
public boolean isValid() { |
||||
return criteria.size() > 0; |
||||
} |
||||
|
||||
public List<Criterion> getAllCriteria() { |
||||
return criteria; |
||||
} |
||||
|
||||
public List<Criterion> getCriteria() { |
||||
return criteria; |
||||
} |
||||
|
||||
protected void addCriterion(String condition) { |
||||
if (condition == null) { |
||||
throw new RuntimeException("Value for condition cannot be null"); |
||||
} |
||||
criteria.add(new Criterion(condition)); |
||||
} |
||||
|
||||
protected void addCriterion(String condition, Object value, String property) { |
||||
if (value == null) { |
||||
throw new RuntimeException("Value for " + property + " cannot be null"); |
||||
} |
||||
criteria.add(new Criterion(condition, value)); |
||||
} |
||||
|
||||
protected void addCriterion(String condition, Object value1, Object value2, String property) { |
||||
if (value1 == null || value2 == null) { |
||||
throw new RuntimeException("Between values for " + property + " cannot be null"); |
||||
} |
||||
criteria.add(new Criterion(condition, value1, value2)); |
||||
} |
||||
|
||||
public Criteria andRegionIdIsNull() { |
||||
addCriterion("region_id is null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andRegionIdIsNotNull() { |
||||
addCriterion("region_id is not null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andRegionIdEqualTo(Long value) { |
||||
addCriterion("region_id =", value, "regionId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andRegionIdNotEqualTo(Long value) { |
||||
addCriterion("region_id <>", value, "regionId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andRegionIdGreaterThan(Long value) { |
||||
addCriterion("region_id >", value, "regionId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andRegionIdGreaterThanOrEqualTo(Long value) { |
||||
addCriterion("region_id >=", value, "regionId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andRegionIdLessThan(Long value) { |
||||
addCriterion("region_id <", value, "regionId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andRegionIdLessThanOrEqualTo(Long value) { |
||||
addCriterion("region_id <=", value, "regionId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andRegionIdIn(List<Long> values) { |
||||
addCriterion("region_id in", values, "regionId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andRegionIdNotIn(List<Long> values) { |
||||
addCriterion("region_id not in", values, "regionId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andRegionIdBetween(Long value1, Long value2) { |
||||
addCriterion("region_id between", value1, value2, "regionId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andRegionIdNotBetween(Long value1, Long value2) { |
||||
addCriterion("region_id not between", value1, value2, "regionId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andRegionNameIsNull() { |
||||
addCriterion("region_name is null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andRegionNameIsNotNull() { |
||||
addCriterion("region_name is not null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andRegionNameEqualTo(String value) { |
||||
addCriterion("region_name =", value, "regionName"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andRegionNameNotEqualTo(String value) { |
||||
addCriterion("region_name <>", value, "regionName"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andRegionNameGreaterThan(String value) { |
||||
addCriterion("region_name >", value, "regionName"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andRegionNameGreaterThanOrEqualTo(String value) { |
||||
addCriterion("region_name >=", value, "regionName"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andRegionNameLessThan(String value) { |
||||
addCriterion("region_name <", value, "regionName"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andRegionNameLessThanOrEqualTo(String value) { |
||||
addCriterion("region_name <=", value, "regionName"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andRegionNameLike(String value) { |
||||
addCriterion("region_name like", value, "regionName"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andRegionNameNotLike(String value) { |
||||
addCriterion("region_name not like", value, "regionName"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andRegionNameIn(List<String> values) { |
||||
addCriterion("region_name in", values, "regionName"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andRegionNameNotIn(List<String> values) { |
||||
addCriterion("region_name not in", values, "regionName"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andRegionNameBetween(String value1, String value2) { |
||||
addCriterion("region_name between", value1, value2, "regionName"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andRegionNameNotBetween(String value1, String value2) { |
||||
addCriterion("region_name not between", value1, value2, "regionName"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andParentIdIsNull() { |
||||
addCriterion("parent_id is null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andParentIdIsNotNull() { |
||||
addCriterion("parent_id is not null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andParentIdEqualTo(Long value) { |
||||
addCriterion("parent_id =", value, "parentId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andParentIdNotEqualTo(Long value) { |
||||
addCriterion("parent_id <>", value, "parentId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andParentIdGreaterThan(Long value) { |
||||
addCriterion("parent_id >", value, "parentId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andParentIdGreaterThanOrEqualTo(Long value) { |
||||
addCriterion("parent_id >=", value, "parentId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andParentIdLessThan(Long value) { |
||||
addCriterion("parent_id <", value, "parentId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andParentIdLessThanOrEqualTo(Long value) { |
||||
addCriterion("parent_id <=", value, "parentId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andParentIdIn(List<Long> values) { |
||||
addCriterion("parent_id in", values, "parentId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andParentIdNotIn(List<Long> values) { |
||||
addCriterion("parent_id not in", values, "parentId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andParentIdBetween(Long value1, Long value2) { |
||||
addCriterion("parent_id between", value1, value2, "parentId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andParentIdNotBetween(Long value1, Long value2) { |
||||
addCriterion("parent_id not between", value1, value2, "parentId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andStatusIsNull() { |
||||
addCriterion("`status` is null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andStatusIsNotNull() { |
||||
addCriterion("`status` is not null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andStatusEqualTo(Integer value) { |
||||
addCriterion("`status` =", value, "status"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andStatusNotEqualTo(Integer value) { |
||||
addCriterion("`status` <>", value, "status"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andStatusGreaterThan(Integer value) { |
||||
addCriterion("`status` >", value, "status"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andStatusGreaterThanOrEqualTo(Integer value) { |
||||
addCriterion("`status` >=", value, "status"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andStatusLessThan(Integer value) { |
||||
addCriterion("`status` <", value, "status"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andStatusLessThanOrEqualTo(Integer value) { |
||||
addCriterion("`status` <=", value, "status"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andStatusIn(List<Integer> values) { |
||||
addCriterion("`status` in", values, "status"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andStatusNotIn(List<Integer> values) { |
||||
addCriterion("`status` not in", values, "status"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andStatusBetween(Integer value1, Integer value2) { |
||||
addCriterion("`status` between", value1, value2, "status"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andStatusNotBetween(Integer value1, Integer value2) { |
||||
addCriterion("`status` not between", value1, value2, "status"); |
||||
return (Criteria) this; |
||||
} |
||||
} |
||||
|
||||
/** |
||||
*/ |
||||
public 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); |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,273 @@ |
||||
package com.hfkj.entity; |
||||
|
||||
import java.io.Serializable; |
||||
import java.util.Date; |
||||
|
||||
/** |
||||
* coupon_discount_package |
||||
* @author |
||||
*/ |
||||
/** |
||||
* |
||||
* 代码由工具生成 |
||||
* |
||||
**/ |
||||
public class CouponDiscountPackage implements Serializable { |
||||
/** |
||||
* 主键 |
||||
*/ |
||||
private Integer id; |
||||
|
||||
/** |
||||
* 编码 |
||||
*/ |
||||
private String key; |
||||
|
||||
/** |
||||
* 标题 |
||||
*/ |
||||
private String title; |
||||
|
||||
/** |
||||
* 有效期 |
||||
*/ |
||||
private Date effectiveTiem; |
||||
|
||||
/** |
||||
* 创建人 |
||||
*/ |
||||
private Integer createdUserId; |
||||
|
||||
/** |
||||
* 创建时间 |
||||
*/ |
||||
private Date createdTime; |
||||
|
||||
/** |
||||
* 更新人 |
||||
*/ |
||||
private Integer updatedUserId; |
||||
|
||||
/** |
||||
* 更新时间 |
||||
*/ |
||||
private Date updatedTime; |
||||
|
||||
/** |
||||
* 状态 1: 上架 2: 编辑中 0:删除 |
||||
*/ |
||||
private Integer status; |
||||
|
||||
/** |
||||
* 总库存 |
||||
*/ |
||||
private Integer totalStock; |
||||
|
||||
/** |
||||
* 剩余库存 |
||||
*/ |
||||
private Integer surplusStock; |
||||
|
||||
/** |
||||
* 扩展字段 |
||||
*/ |
||||
private String ext1; |
||||
|
||||
/** |
||||
* 扩展字段 |
||||
*/ |
||||
private String ext2; |
||||
|
||||
/** |
||||
* 扩展字段 |
||||
*/ |
||||
private String ext3; |
||||
|
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
public Integer getId() { |
||||
return id; |
||||
} |
||||
|
||||
public void setId(Integer id) { |
||||
this.id = id; |
||||
} |
||||
|
||||
public String getKey() { |
||||
return key; |
||||
} |
||||
|
||||
public void setKey(String key) { |
||||
this.key = key; |
||||
} |
||||
|
||||
public String getTitle() { |
||||
return title; |
||||
} |
||||
|
||||
public void setTitle(String title) { |
||||
this.title = title; |
||||
} |
||||
|
||||
public Date getEffectiveTiem() { |
||||
return effectiveTiem; |
||||
} |
||||
|
||||
public void setEffectiveTiem(Date effectiveTiem) { |
||||
this.effectiveTiem = effectiveTiem; |
||||
} |
||||
|
||||
public Integer getCreatedUserId() { |
||||
return createdUserId; |
||||
} |
||||
|
||||
public void setCreatedUserId(Integer createdUserId) { |
||||
this.createdUserId = createdUserId; |
||||
} |
||||
|
||||
public Date getCreatedTime() { |
||||
return createdTime; |
||||
} |
||||
|
||||
public void setCreatedTime(Date createdTime) { |
||||
this.createdTime = createdTime; |
||||
} |
||||
|
||||
public Integer getUpdatedUserId() { |
||||
return updatedUserId; |
||||
} |
||||
|
||||
public void setUpdatedUserId(Integer updatedUserId) { |
||||
this.updatedUserId = updatedUserId; |
||||
} |
||||
|
||||
public Date getUpdatedTime() { |
||||
return updatedTime; |
||||
} |
||||
|
||||
public void setUpdatedTime(Date updatedTime) { |
||||
this.updatedTime = updatedTime; |
||||
} |
||||
|
||||
public Integer getStatus() { |
||||
return status; |
||||
} |
||||
|
||||
public void setStatus(Integer status) { |
||||
this.status = status; |
||||
} |
||||
|
||||
public Integer getTotalStock() { |
||||
return totalStock; |
||||
} |
||||
|
||||
public void setTotalStock(Integer totalStock) { |
||||
this.totalStock = totalStock; |
||||
} |
||||
|
||||
public Integer getSurplusStock() { |
||||
return surplusStock; |
||||
} |
||||
|
||||
public void setSurplusStock(Integer surplusStock) { |
||||
this.surplusStock = surplusStock; |
||||
} |
||||
|
||||
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; |
||||
} |
||||
CouponDiscountPackage other = (CouponDiscountPackage) that; |
||||
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) |
||||
&& (this.getKey() == null ? other.getKey() == null : this.getKey().equals(other.getKey())) |
||||
&& (this.getTitle() == null ? other.getTitle() == null : this.getTitle().equals(other.getTitle())) |
||||
&& (this.getEffectiveTiem() == null ? other.getEffectiveTiem() == null : this.getEffectiveTiem().equals(other.getEffectiveTiem())) |
||||
&& (this.getCreatedUserId() == null ? other.getCreatedUserId() == null : this.getCreatedUserId().equals(other.getCreatedUserId())) |
||||
&& (this.getCreatedTime() == null ? other.getCreatedTime() == null : this.getCreatedTime().equals(other.getCreatedTime())) |
||||
&& (this.getUpdatedUserId() == null ? other.getUpdatedUserId() == null : this.getUpdatedUserId().equals(other.getUpdatedUserId())) |
||||
&& (this.getUpdatedTime() == null ? other.getUpdatedTime() == null : this.getUpdatedTime().equals(other.getUpdatedTime())) |
||||
&& (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) |
||||
&& (this.getTotalStock() == null ? other.getTotalStock() == null : this.getTotalStock().equals(other.getTotalStock())) |
||||
&& (this.getSurplusStock() == null ? other.getSurplusStock() == null : this.getSurplusStock().equals(other.getSurplusStock())) |
||||
&& (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 + ((getKey() == null) ? 0 : getKey().hashCode()); |
||||
result = prime * result + ((getTitle() == null) ? 0 : getTitle().hashCode()); |
||||
result = prime * result + ((getEffectiveTiem() == null) ? 0 : getEffectiveTiem().hashCode()); |
||||
result = prime * result + ((getCreatedUserId() == null) ? 0 : getCreatedUserId().hashCode()); |
||||
result = prime * result + ((getCreatedTime() == null) ? 0 : getCreatedTime().hashCode()); |
||||
result = prime * result + ((getUpdatedUserId() == null) ? 0 : getUpdatedUserId().hashCode()); |
||||
result = prime * result + ((getUpdatedTime() == null) ? 0 : getUpdatedTime().hashCode()); |
||||
result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); |
||||
result = prime * result + ((getTotalStock() == null) ? 0 : getTotalStock().hashCode()); |
||||
result = prime * result + ((getSurplusStock() == null) ? 0 : getSurplusStock().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(", key=").append(key); |
||||
sb.append(", title=").append(title); |
||||
sb.append(", effectiveTiem=").append(effectiveTiem); |
||||
sb.append(", createdUserId=").append(createdUserId); |
||||
sb.append(", createdTime=").append(createdTime); |
||||
sb.append(", updatedUserId=").append(updatedUserId); |
||||
sb.append(", updatedTime=").append(updatedTime); |
||||
sb.append(", status=").append(status); |
||||
sb.append(", totalStock=").append(totalStock); |
||||
sb.append(", surplusStock=").append(surplusStock); |
||||
sb.append(", ext1=").append(ext1); |
||||
sb.append(", ext2=").append(ext2); |
||||
sb.append(", ext3=").append(ext3); |
||||
sb.append(", serialVersionUID=").append(serialVersionUID); |
||||
sb.append("]"); |
||||
return sb.toString(); |
||||
} |
||||
} |
@ -0,0 +1,225 @@ |
||||
package com.hfkj.entity; |
||||
|
||||
import java.io.Serializable; |
||||
import java.util.Date; |
||||
|
||||
/** |
||||
* coupon_discount_package_details |
||||
* @author |
||||
*/ |
||||
/** |
||||
* |
||||
* 代码由工具生成 |
||||
* |
||||
**/ |
||||
public class CouponDiscountPackageDetails implements Serializable { |
||||
/** |
||||
* 主键 |
||||
*/ |
||||
private Integer id; |
||||
|
||||
/** |
||||
* 优惠券包id |
||||
*/ |
||||
private Integer discountPackageId; |
||||
|
||||
/** |
||||
* 优惠券id |
||||
*/ |
||||
private Integer discountId; |
||||
|
||||
/** |
||||
* 优惠券名称 |
||||
*/ |
||||
private String discountName; |
||||
|
||||
/** |
||||
* 数量 |
||||
*/ |
||||
private Integer num; |
||||
|
||||
/** |
||||
* 创建时间 |
||||
*/ |
||||
private Date createdTime; |
||||
|
||||
/** |
||||
* 更新时间 |
||||
*/ |
||||
private Date updatedTime; |
||||
|
||||
/** |
||||
* 状态 1: 正常 0: 删除 |
||||
*/ |
||||
private Integer status; |
||||
|
||||
/** |
||||
* 扩展字段 |
||||
*/ |
||||
private String ext1; |
||||
|
||||
/** |
||||
* 扩展字段 |
||||
*/ |
||||
private String ext2; |
||||
|
||||
/** |
||||
* 扩展字段 |
||||
*/ |
||||
private String ext3; |
||||
|
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
public Integer getId() { |
||||
return id; |
||||
} |
||||
|
||||
public void setId(Integer id) { |
||||
this.id = id; |
||||
} |
||||
|
||||
public Integer getDiscountPackageId() { |
||||
return discountPackageId; |
||||
} |
||||
|
||||
public void setDiscountPackageId(Integer discountPackageId) { |
||||
this.discountPackageId = discountPackageId; |
||||
} |
||||
|
||||
public Integer getDiscountId() { |
||||
return discountId; |
||||
} |
||||
|
||||
public void setDiscountId(Integer discountId) { |
||||
this.discountId = discountId; |
||||
} |
||||
|
||||
public String getDiscountName() { |
||||
return discountName; |
||||
} |
||||
|
||||
public void setDiscountName(String discountName) { |
||||
this.discountName = discountName; |
||||
} |
||||
|
||||
public Integer getNum() { |
||||
return num; |
||||
} |
||||
|
||||
public void setNum(Integer num) { |
||||
this.num = num; |
||||
} |
||||
|
||||
public Date getCreatedTime() { |
||||
return createdTime; |
||||
} |
||||
|
||||
public void setCreatedTime(Date createdTime) { |
||||
this.createdTime = createdTime; |
||||
} |
||||
|
||||
public Date getUpdatedTime() { |
||||
return updatedTime; |
||||
} |
||||
|
||||
public void setUpdatedTime(Date updatedTime) { |
||||
this.updatedTime = updatedTime; |
||||
} |
||||
|
||||
public Integer getStatus() { |
||||
return status; |
||||
} |
||||
|
||||
public void setStatus(Integer status) { |
||||
this.status = status; |
||||
} |
||||
|
||||
public String getExt1() { |
||||
return ext1; |
||||
} |
||||
|
||||
public void setExt1(String ext1) { |
||||
this.ext1 = ext1; |
||||
} |
||||
|
||||
public String getExt2() { |
||||
return ext2; |
||||
} |
||||
|
||||
public void setExt2(String ext2) { |
||||
this.ext2 = ext2; |
||||
} |
||||
|
||||
public String getExt3() { |
||||
return ext3; |
||||
} |
||||
|
||||
public void setExt3(String ext3) { |
||||
this.ext3 = ext3; |
||||
} |
||||
|
||||
@Override |
||||
public boolean equals(Object that) { |
||||
if (this == that) { |
||||
return true; |
||||
} |
||||
if (that == null) { |
||||
return false; |
||||
} |
||||
if (getClass() != that.getClass()) { |
||||
return false; |
||||
} |
||||
CouponDiscountPackageDetails other = (CouponDiscountPackageDetails) that; |
||||
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) |
||||
&& (this.getDiscountPackageId() == null ? other.getDiscountPackageId() == null : this.getDiscountPackageId().equals(other.getDiscountPackageId())) |
||||
&& (this.getDiscountId() == null ? other.getDiscountId() == null : this.getDiscountId().equals(other.getDiscountId())) |
||||
&& (this.getDiscountName() == null ? other.getDiscountName() == null : this.getDiscountName().equals(other.getDiscountName())) |
||||
&& (this.getNum() == null ? other.getNum() == null : this.getNum().equals(other.getNum())) |
||||
&& (this.getCreatedTime() == null ? other.getCreatedTime() == null : this.getCreatedTime().equals(other.getCreatedTime())) |
||||
&& (this.getUpdatedTime() == null ? other.getUpdatedTime() == null : this.getUpdatedTime().equals(other.getUpdatedTime())) |
||||
&& (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) |
||||
&& (this.getExt1() == null ? other.getExt1() == null : this.getExt1().equals(other.getExt1())) |
||||
&& (this.getExt2() == null ? other.getExt2() == null : this.getExt2().equals(other.getExt2())) |
||||
&& (this.getExt3() == null ? other.getExt3() == null : this.getExt3().equals(other.getExt3())); |
||||
} |
||||
|
||||
@Override |
||||
public int hashCode() { |
||||
final int prime = 31; |
||||
int result = 1; |
||||
result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); |
||||
result = prime * result + ((getDiscountPackageId() == null) ? 0 : getDiscountPackageId().hashCode()); |
||||
result = prime * result + ((getDiscountId() == null) ? 0 : getDiscountId().hashCode()); |
||||
result = prime * result + ((getDiscountName() == null) ? 0 : getDiscountName().hashCode()); |
||||
result = prime * result + ((getNum() == null) ? 0 : getNum().hashCode()); |
||||
result = prime * result + ((getCreatedTime() == null) ? 0 : getCreatedTime().hashCode()); |
||||
result = prime * result + ((getUpdatedTime() == null) ? 0 : getUpdatedTime().hashCode()); |
||||
result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); |
||||
result = prime * result + ((getExt1() == null) ? 0 : getExt1().hashCode()); |
||||
result = prime * result + ((getExt2() == null) ? 0 : getExt2().hashCode()); |
||||
result = prime * result + ((getExt3() == null) ? 0 : getExt3().hashCode()); |
||||
return result; |
||||
} |
||||
|
||||
@Override |
||||
public String toString() { |
||||
StringBuilder sb = new StringBuilder(); |
||||
sb.append(getClass().getSimpleName()); |
||||
sb.append(" ["); |
||||
sb.append("Hash = ").append(hashCode()); |
||||
sb.append(", id=").append(id); |
||||
sb.append(", discountPackageId=").append(discountPackageId); |
||||
sb.append(", discountId=").append(discountId); |
||||
sb.append(", discountName=").append(discountName); |
||||
sb.append(", num=").append(num); |
||||
sb.append(", createdTime=").append(createdTime); |
||||
sb.append(", updatedTime=").append(updatedTime); |
||||
sb.append(", status=").append(status); |
||||
sb.append(", ext1=").append(ext1); |
||||
sb.append(", ext2=").append(ext2); |
||||
sb.append(", ext3=").append(ext3); |
||||
sb.append(", serialVersionUID=").append(serialVersionUID); |
||||
sb.append("]"); |
||||
return sb.toString(); |
||||
} |
||||
} |
@ -0,0 +1,923 @@ |
||||
package com.hfkj.entity; |
||||
|
||||
import java.util.ArrayList; |
||||
import java.util.Date; |
||||
import java.util.List; |
||||
|
||||
public class CouponDiscountPackageDetailsExample { |
||||
protected String orderByClause; |
||||
|
||||
protected boolean distinct; |
||||
|
||||
protected List<Criteria> oredCriteria; |
||||
|
||||
private Integer limit; |
||||
|
||||
private Long offset; |
||||
|
||||
public CouponDiscountPackageDetailsExample() { |
||||
oredCriteria = new ArrayList<Criteria>(); |
||||
} |
||||
|
||||
public void setOrderByClause(String orderByClause) { |
||||
this.orderByClause = orderByClause; |
||||
} |
||||
|
||||
public String getOrderByClause() { |
||||
return orderByClause; |
||||
} |
||||
|
||||
public void setDistinct(boolean distinct) { |
||||
this.distinct = distinct; |
||||
} |
||||
|
||||
public boolean isDistinct() { |
||||
return distinct; |
||||
} |
||||
|
||||
public List<Criteria> getOredCriteria() { |
||||
return oredCriteria; |
||||
} |
||||
|
||||
public void or(Criteria criteria) { |
||||
oredCriteria.add(criteria); |
||||
} |
||||
|
||||
public Criteria or() { |
||||
Criteria criteria = createCriteriaInternal(); |
||||
oredCriteria.add(criteria); |
||||
return criteria; |
||||
} |
||||
|
||||
public Criteria createCriteria() { |
||||
Criteria criteria = createCriteriaInternal(); |
||||
if (oredCriteria.size() == 0) { |
||||
oredCriteria.add(criteria); |
||||
} |
||||
return criteria; |
||||
} |
||||
|
||||
protected Criteria createCriteriaInternal() { |
||||
Criteria criteria = new Criteria(); |
||||
return criteria; |
||||
} |
||||
|
||||
public void clear() { |
||||
oredCriteria.clear(); |
||||
orderByClause = null; |
||||
distinct = false; |
||||
} |
||||
|
||||
public void setLimit(Integer limit) { |
||||
this.limit = limit; |
||||
} |
||||
|
||||
public Integer getLimit() { |
||||
return limit; |
||||
} |
||||
|
||||
public void setOffset(Long offset) { |
||||
this.offset = offset; |
||||
} |
||||
|
||||
public Long getOffset() { |
||||
return offset; |
||||
} |
||||
|
||||
protected abstract static class GeneratedCriteria { |
||||
protected List<Criterion> criteria; |
||||
|
||||
protected GeneratedCriteria() { |
||||
super(); |
||||
criteria = new ArrayList<Criterion>(); |
||||
} |
||||
|
||||
public boolean isValid() { |
||||
return criteria.size() > 0; |
||||
} |
||||
|
||||
public List<Criterion> getAllCriteria() { |
||||
return criteria; |
||||
} |
||||
|
||||
public List<Criterion> getCriteria() { |
||||
return criteria; |
||||
} |
||||
|
||||
protected void addCriterion(String condition) { |
||||
if (condition == null) { |
||||
throw new RuntimeException("Value for condition cannot be null"); |
||||
} |
||||
criteria.add(new Criterion(condition)); |
||||
} |
||||
|
||||
protected void addCriterion(String condition, Object value, String property) { |
||||
if (value == null) { |
||||
throw new RuntimeException("Value for " + property + " cannot be null"); |
||||
} |
||||
criteria.add(new Criterion(condition, value)); |
||||
} |
||||
|
||||
protected void addCriterion(String condition, Object value1, Object value2, String property) { |
||||
if (value1 == null || value2 == null) { |
||||
throw new RuntimeException("Between values for " + property + " cannot be null"); |
||||
} |
||||
criteria.add(new Criterion(condition, value1, value2)); |
||||
} |
||||
|
||||
public Criteria andIdIsNull() { |
||||
addCriterion("id is null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andIdIsNotNull() { |
||||
addCriterion("id is not null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andIdEqualTo(Integer value) { |
||||
addCriterion("id =", value, "id"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andIdNotEqualTo(Integer value) { |
||||
addCriterion("id <>", value, "id"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andIdGreaterThan(Integer value) { |
||||
addCriterion("id >", value, "id"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andIdGreaterThanOrEqualTo(Integer value) { |
||||
addCriterion("id >=", value, "id"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andIdLessThan(Integer value) { |
||||
addCriterion("id <", value, "id"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andIdLessThanOrEqualTo(Integer value) { |
||||
addCriterion("id <=", value, "id"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andIdIn(List<Integer> values) { |
||||
addCriterion("id in", values, "id"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andIdNotIn(List<Integer> values) { |
||||
addCriterion("id not in", values, "id"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andIdBetween(Integer value1, Integer value2) { |
||||
addCriterion("id between", value1, value2, "id"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andIdNotBetween(Integer value1, Integer value2) { |
||||
addCriterion("id not between", value1, value2, "id"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria 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(Integer value) { |
||||
addCriterion("discount_package_id =", value, "discountPackageId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andDiscountPackageIdNotEqualTo(Integer value) { |
||||
addCriterion("discount_package_id <>", value, "discountPackageId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andDiscountPackageIdGreaterThan(Integer value) { |
||||
addCriterion("discount_package_id >", value, "discountPackageId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andDiscountPackageIdGreaterThanOrEqualTo(Integer value) { |
||||
addCriterion("discount_package_id >=", value, "discountPackageId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andDiscountPackageIdLessThan(Integer value) { |
||||
addCriterion("discount_package_id <", value, "discountPackageId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andDiscountPackageIdLessThanOrEqualTo(Integer value) { |
||||
addCriterion("discount_package_id <=", value, "discountPackageId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andDiscountPackageIdIn(List<Integer> values) { |
||||
addCriterion("discount_package_id in", values, "discountPackageId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andDiscountPackageIdNotIn(List<Integer> values) { |
||||
addCriterion("discount_package_id not in", values, "discountPackageId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andDiscountPackageIdBetween(Integer value1, Integer value2) { |
||||
addCriterion("discount_package_id between", value1, value2, "discountPackageId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andDiscountPackageIdNotBetween(Integer value1, Integer value2) { |
||||
addCriterion("discount_package_id not between", value1, value2, "discountPackageId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andDiscountIdIsNull() { |
||||
addCriterion("discount_id is null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andDiscountIdIsNotNull() { |
||||
addCriterion("discount_id is not null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andDiscountIdEqualTo(Integer value) { |
||||
addCriterion("discount_id =", value, "discountId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andDiscountIdNotEqualTo(Integer value) { |
||||
addCriterion("discount_id <>", value, "discountId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andDiscountIdGreaterThan(Integer value) { |
||||
addCriterion("discount_id >", value, "discountId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andDiscountIdGreaterThanOrEqualTo(Integer value) { |
||||
addCriterion("discount_id >=", value, "discountId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andDiscountIdLessThan(Integer value) { |
||||
addCriterion("discount_id <", value, "discountId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andDiscountIdLessThanOrEqualTo(Integer value) { |
||||
addCriterion("discount_id <=", value, "discountId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andDiscountIdIn(List<Integer> values) { |
||||
addCriterion("discount_id in", values, "discountId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andDiscountIdNotIn(List<Integer> values) { |
||||
addCriterion("discount_id not in", values, "discountId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andDiscountIdBetween(Integer value1, Integer value2) { |
||||
addCriterion("discount_id between", value1, value2, "discountId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andDiscountIdNotBetween(Integer value1, Integer value2) { |
||||
addCriterion("discount_id not between", value1, value2, "discountId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andDiscountNameIsNull() { |
||||
addCriterion("discount_name is null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andDiscountNameIsNotNull() { |
||||
addCriterion("discount_name is not null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andDiscountNameEqualTo(String value) { |
||||
addCriterion("discount_name =", value, "discountName"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andDiscountNameNotEqualTo(String value) { |
||||
addCriterion("discount_name <>", value, "discountName"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andDiscountNameGreaterThan(String value) { |
||||
addCriterion("discount_name >", value, "discountName"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andDiscountNameGreaterThanOrEqualTo(String value) { |
||||
addCriterion("discount_name >=", value, "discountName"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andDiscountNameLessThan(String value) { |
||||
addCriterion("discount_name <", value, "discountName"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andDiscountNameLessThanOrEqualTo(String value) { |
||||
addCriterion("discount_name <=", value, "discountName"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andDiscountNameLike(String value) { |
||||
addCriterion("discount_name like", value, "discountName"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andDiscountNameNotLike(String value) { |
||||
addCriterion("discount_name not like", value, "discountName"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andDiscountNameIn(List<String> values) { |
||||
addCriterion("discount_name in", values, "discountName"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andDiscountNameNotIn(List<String> values) { |
||||
addCriterion("discount_name not in", values, "discountName"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andDiscountNameBetween(String value1, String value2) { |
||||
addCriterion("discount_name between", value1, value2, "discountName"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andDiscountNameNotBetween(String value1, String value2) { |
||||
addCriterion("discount_name not between", value1, value2, "discountName"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andNumIsNull() { |
||||
addCriterion("num is null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andNumIsNotNull() { |
||||
addCriterion("num is not null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andNumEqualTo(Integer value) { |
||||
addCriterion("num =", value, "num"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andNumNotEqualTo(Integer value) { |
||||
addCriterion("num <>", value, "num"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andNumGreaterThan(Integer value) { |
||||
addCriterion("num >", value, "num"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andNumGreaterThanOrEqualTo(Integer value) { |
||||
addCriterion("num >=", value, "num"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andNumLessThan(Integer value) { |
||||
addCriterion("num <", value, "num"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andNumLessThanOrEqualTo(Integer value) { |
||||
addCriterion("num <=", value, "num"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andNumIn(List<Integer> values) { |
||||
addCriterion("num in", values, "num"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andNumNotIn(List<Integer> values) { |
||||
addCriterion("num not in", values, "num"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andNumBetween(Integer value1, Integer value2) { |
||||
addCriterion("num between", value1, value2, "num"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andNumNotBetween(Integer value1, Integer value2) { |
||||
addCriterion("num not between", value1, value2, "num"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCreatedTimeIsNull() { |
||||
addCriterion("created_time is null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCreatedTimeIsNotNull() { |
||||
addCriterion("created_time is not null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCreatedTimeEqualTo(Date value) { |
||||
addCriterion("created_time =", value, "createdTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCreatedTimeNotEqualTo(Date value) { |
||||
addCriterion("created_time <>", value, "createdTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCreatedTimeGreaterThan(Date value) { |
||||
addCriterion("created_time >", value, "createdTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCreatedTimeGreaterThanOrEqualTo(Date value) { |
||||
addCriterion("created_time >=", value, "createdTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCreatedTimeLessThan(Date value) { |
||||
addCriterion("created_time <", value, "createdTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCreatedTimeLessThanOrEqualTo(Date value) { |
||||
addCriterion("created_time <=", value, "createdTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCreatedTimeIn(List<Date> values) { |
||||
addCriterion("created_time in", values, "createdTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCreatedTimeNotIn(List<Date> values) { |
||||
addCriterion("created_time not in", values, "createdTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCreatedTimeBetween(Date value1, Date value2) { |
||||
addCriterion("created_time between", value1, value2, "createdTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCreatedTimeNotBetween(Date value1, Date value2) { |
||||
addCriterion("created_time not between", value1, value2, "createdTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUpdatedTimeIsNull() { |
||||
addCriterion("updated_time is null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUpdatedTimeIsNotNull() { |
||||
addCriterion("updated_time is not null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUpdatedTimeEqualTo(Date value) { |
||||
addCriterion("updated_time =", value, "updatedTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUpdatedTimeNotEqualTo(Date value) { |
||||
addCriterion("updated_time <>", value, "updatedTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUpdatedTimeGreaterThan(Date value) { |
||||
addCriterion("updated_time >", value, "updatedTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUpdatedTimeGreaterThanOrEqualTo(Date value) { |
||||
addCriterion("updated_time >=", value, "updatedTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUpdatedTimeLessThan(Date value) { |
||||
addCriterion("updated_time <", value, "updatedTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUpdatedTimeLessThanOrEqualTo(Date value) { |
||||
addCriterion("updated_time <=", value, "updatedTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUpdatedTimeIn(List<Date> values) { |
||||
addCriterion("updated_time in", values, "updatedTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUpdatedTimeNotIn(List<Date> values) { |
||||
addCriterion("updated_time not in", values, "updatedTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUpdatedTimeBetween(Date value1, Date value2) { |
||||
addCriterion("updated_time between", value1, value2, "updatedTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUpdatedTimeNotBetween(Date value1, Date value2) { |
||||
addCriterion("updated_time not between", value1, value2, "updatedTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andStatusIsNull() { |
||||
addCriterion("`status` is null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andStatusIsNotNull() { |
||||
addCriterion("`status` is not null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andStatusEqualTo(Integer value) { |
||||
addCriterion("`status` =", value, "status"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andStatusNotEqualTo(Integer value) { |
||||
addCriterion("`status` <>", value, "status"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andStatusGreaterThan(Integer value) { |
||||
addCriterion("`status` >", value, "status"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andStatusGreaterThanOrEqualTo(Integer value) { |
||||
addCriterion("`status` >=", value, "status"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andStatusLessThan(Integer value) { |
||||
addCriterion("`status` <", value, "status"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andStatusLessThanOrEqualTo(Integer value) { |
||||
addCriterion("`status` <=", value, "status"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andStatusIn(List<Integer> values) { |
||||
addCriterion("`status` in", values, "status"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andStatusNotIn(List<Integer> values) { |
||||
addCriterion("`status` not in", values, "status"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andStatusBetween(Integer value1, Integer value2) { |
||||
addCriterion("`status` between", value1, value2, "status"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andStatusNotBetween(Integer value1, Integer value2) { |
||||
addCriterion("`status` not between", value1, value2, "status"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt1IsNull() { |
||||
addCriterion("ext_1 is null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt1IsNotNull() { |
||||
addCriterion("ext_1 is not null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt1EqualTo(String value) { |
||||
addCriterion("ext_1 =", value, "ext1"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt1NotEqualTo(String value) { |
||||
addCriterion("ext_1 <>", value, "ext1"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt1GreaterThan(String value) { |
||||
addCriterion("ext_1 >", value, "ext1"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt1GreaterThanOrEqualTo(String value) { |
||||
addCriterion("ext_1 >=", value, "ext1"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt1LessThan(String value) { |
||||
addCriterion("ext_1 <", value, "ext1"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt1LessThanOrEqualTo(String value) { |
||||
addCriterion("ext_1 <=", value, "ext1"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt1Like(String value) { |
||||
addCriterion("ext_1 like", value, "ext1"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt1NotLike(String value) { |
||||
addCriterion("ext_1 not like", value, "ext1"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt1In(List<String> values) { |
||||
addCriterion("ext_1 in", values, "ext1"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt1NotIn(List<String> values) { |
||||
addCriterion("ext_1 not in", values, "ext1"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt1Between(String value1, String value2) { |
||||
addCriterion("ext_1 between", value1, value2, "ext1"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt1NotBetween(String value1, String value2) { |
||||
addCriterion("ext_1 not between", value1, value2, "ext1"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt2IsNull() { |
||||
addCriterion("ext_2 is null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt2IsNotNull() { |
||||
addCriterion("ext_2 is not null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt2EqualTo(String value) { |
||||
addCriterion("ext_2 =", value, "ext2"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt2NotEqualTo(String value) { |
||||
addCriterion("ext_2 <>", value, "ext2"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt2GreaterThan(String value) { |
||||
addCriterion("ext_2 >", value, "ext2"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt2GreaterThanOrEqualTo(String value) { |
||||
addCriterion("ext_2 >=", value, "ext2"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt2LessThan(String value) { |
||||
addCriterion("ext_2 <", value, "ext2"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt2LessThanOrEqualTo(String value) { |
||||
addCriterion("ext_2 <=", value, "ext2"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt2Like(String value) { |
||||
addCriterion("ext_2 like", value, "ext2"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt2NotLike(String value) { |
||||
addCriterion("ext_2 not like", value, "ext2"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt2In(List<String> values) { |
||||
addCriterion("ext_2 in", values, "ext2"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt2NotIn(List<String> values) { |
||||
addCriterion("ext_2 not in", values, "ext2"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt2Between(String value1, String value2) { |
||||
addCriterion("ext_2 between", value1, value2, "ext2"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt2NotBetween(String value1, String value2) { |
||||
addCriterion("ext_2 not between", value1, value2, "ext2"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt3IsNull() { |
||||
addCriterion("ext_3 is null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt3IsNotNull() { |
||||
addCriterion("ext_3 is not null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt3EqualTo(String value) { |
||||
addCriterion("ext_3 =", value, "ext3"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt3NotEqualTo(String value) { |
||||
addCriterion("ext_3 <>", value, "ext3"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt3GreaterThan(String value) { |
||||
addCriterion("ext_3 >", value, "ext3"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt3GreaterThanOrEqualTo(String value) { |
||||
addCriterion("ext_3 >=", value, "ext3"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt3LessThan(String value) { |
||||
addCriterion("ext_3 <", value, "ext3"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt3LessThanOrEqualTo(String value) { |
||||
addCriterion("ext_3 <=", value, "ext3"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt3Like(String value) { |
||||
addCriterion("ext_3 like", value, "ext3"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt3NotLike(String value) { |
||||
addCriterion("ext_3 not like", value, "ext3"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt3In(List<String> values) { |
||||
addCriterion("ext_3 in", values, "ext3"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt3NotIn(List<String> values) { |
||||
addCriterion("ext_3 not in", values, "ext3"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt3Between(String value1, String value2) { |
||||
addCriterion("ext_3 between", value1, value2, "ext3"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt3NotBetween(String value1, String value2) { |
||||
addCriterion("ext_3 not between", value1, value2, "ext3"); |
||||
return (Criteria) this; |
||||
} |
||||
} |
||||
|
||||
/** |
||||
*/ |
||||
public static class Criteria extends GeneratedCriteria { |
||||
|
||||
protected Criteria() { |
||||
super(); |
||||
} |
||||
} |
||||
|
||||
public static class Criterion { |
||||
private String condition; |
||||
|
||||
private Object value; |
||||
|
||||
private Object secondValue; |
||||
|
||||
private boolean noValue; |
||||
|
||||
private boolean singleValue; |
||||
|
||||
private boolean betweenValue; |
||||
|
||||
private boolean listValue; |
||||
|
||||
private String typeHandler; |
||||
|
||||
public String getCondition() { |
||||
return condition; |
||||
} |
||||
|
||||
public Object getValue() { |
||||
return value; |
||||
} |
||||
|
||||
public Object getSecondValue() { |
||||
return secondValue; |
||||
} |
||||
|
||||
public boolean isNoValue() { |
||||
return noValue; |
||||
} |
||||
|
||||
public boolean isSingleValue() { |
||||
return singleValue; |
||||
} |
||||
|
||||
public boolean isBetweenValue() { |
||||
return betweenValue; |
||||
} |
||||
|
||||
public boolean isListValue() { |
||||
return listValue; |
||||
} |
||||
|
||||
public String getTypeHandler() { |
||||
return typeHandler; |
||||
} |
||||
|
||||
protected Criterion(String condition) { |
||||
super(); |
||||
this.condition = condition; |
||||
this.typeHandler = null; |
||||
this.noValue = true; |
||||
} |
||||
|
||||
protected Criterion(String condition, Object value, String typeHandler) { |
||||
super(); |
||||
this.condition = condition; |
||||
this.value = value; |
||||
this.typeHandler = typeHandler; |
||||
if (value instanceof List<?>) { |
||||
this.listValue = true; |
||||
} else { |
||||
this.singleValue = true; |
||||
} |
||||
} |
||||
|
||||
protected Criterion(String condition, Object value) { |
||||
this(condition, value, null); |
||||
} |
||||
|
||||
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { |
||||
super(); |
||||
this.condition = condition; |
||||
this.value = value; |
||||
this.secondValue = secondValue; |
||||
this.typeHandler = typeHandler; |
||||
this.betweenValue = true; |
||||
} |
||||
|
||||
protected Criterion(String condition, Object value, Object secondValue) { |
||||
this(condition, value, secondValue, null); |
||||
} |
||||
} |
||||
} |
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,289 @@ |
||||
package com.hfkj.entity; |
||||
|
||||
import java.io.Serializable; |
||||
import java.util.Date; |
||||
|
||||
/** |
||||
* coupon_discount_package_record |
||||
* @author |
||||
*/ |
||||
/** |
||||
* |
||||
* 代码由工具生成 |
||||
* |
||||
**/ |
||||
public class CouponDiscountPackageRecord implements Serializable { |
||||
/** |
||||
* 主键 |
||||
*/ |
||||
private Integer id; |
||||
|
||||
/** |
||||
* 优惠券包名称 |
||||
*/ |
||||
private String discountPackageTitle; |
||||
|
||||
/** |
||||
* 优惠券包id |
||||
*/ |
||||
private Integer discountPackageId; |
||||
|
||||
/** |
||||
* 支付订单id |
||||
*/ |
||||
private Integer orderId; |
||||
|
||||
/** |
||||
* 子订单id |
||||
*/ |
||||
private Integer childOrderId; |
||||
|
||||
/** |
||||
* 记录订单 |
||||
*/ |
||||
private String recordNo; |
||||
|
||||
/** |
||||
* 记录序号 |
||||
*/ |
||||
private String serialNo; |
||||
|
||||
/** |
||||
* 销售类型 :1 售卖 2: 赠送 |
||||
*/ |
||||
private Integer type; |
||||
|
||||
/** |
||||
* 用户id |
||||
*/ |
||||
private Integer userId; |
||||
|
||||
/** |
||||
* 用户手机号 |
||||
*/ |
||||
private String userPhone; |
||||
|
||||
/** |
||||
* 创建时间 |
||||
*/ |
||||
private Date createdTime; |
||||
|
||||
/** |
||||
* 状态 1:正常 0 : 删除 |
||||
*/ |
||||
private Integer status; |
||||
|
||||
/** |
||||
* 扩展字段 |
||||
*/ |
||||
private String ext1; |
||||
|
||||
/** |
||||
* 扩展字段 |
||||
*/ |
||||
private String ext2; |
||||
|
||||
/** |
||||
* 扩展字段 |
||||
*/ |
||||
private String ext3; |
||||
|
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
public Integer getId() { |
||||
return id; |
||||
} |
||||
|
||||
public void setId(Integer id) { |
||||
this.id = id; |
||||
} |
||||
|
||||
public String getDiscountPackageTitle() { |
||||
return discountPackageTitle; |
||||
} |
||||
|
||||
public void setDiscountPackageTitle(String discountPackageTitle) { |
||||
this.discountPackageTitle = discountPackageTitle; |
||||
} |
||||
|
||||
public Integer getDiscountPackageId() { |
||||
return discountPackageId; |
||||
} |
||||
|
||||
public void setDiscountPackageId(Integer discountPackageId) { |
||||
this.discountPackageId = discountPackageId; |
||||
} |
||||
|
||||
public Integer getOrderId() { |
||||
return orderId; |
||||
} |
||||
|
||||
public void setOrderId(Integer orderId) { |
||||
this.orderId = orderId; |
||||
} |
||||
|
||||
public Integer getChildOrderId() { |
||||
return childOrderId; |
||||
} |
||||
|
||||
public void setChildOrderId(Integer childOrderId) { |
||||
this.childOrderId = childOrderId; |
||||
} |
||||
|
||||
public String getRecordNo() { |
||||
return recordNo; |
||||
} |
||||
|
||||
public void setRecordNo(String recordNo) { |
||||
this.recordNo = recordNo; |
||||
} |
||||
|
||||
public String getSerialNo() { |
||||
return serialNo; |
||||
} |
||||
|
||||
public void setSerialNo(String serialNo) { |
||||
this.serialNo = serialNo; |
||||
} |
||||
|
||||
public Integer getType() { |
||||
return type; |
||||
} |
||||
|
||||
public void setType(Integer type) { |
||||
this.type = type; |
||||
} |
||||
|
||||
public Integer getUserId() { |
||||
return userId; |
||||
} |
||||
|
||||
public void setUserId(Integer userId) { |
||||
this.userId = userId; |
||||
} |
||||
|
||||
public String getUserPhone() { |
||||
return userPhone; |
||||
} |
||||
|
||||
public void setUserPhone(String userPhone) { |
||||
this.userPhone = userPhone; |
||||
} |
||||
|
||||
public Date getCreatedTime() { |
||||
return createdTime; |
||||
} |
||||
|
||||
public void setCreatedTime(Date createdTime) { |
||||
this.createdTime = createdTime; |
||||
} |
||||
|
||||
public Integer getStatus() { |
||||
return status; |
||||
} |
||||
|
||||
public void setStatus(Integer status) { |
||||
this.status = status; |
||||
} |
||||
|
||||
public String getExt1() { |
||||
return ext1; |
||||
} |
||||
|
||||
public void setExt1(String ext1) { |
||||
this.ext1 = ext1; |
||||
} |
||||
|
||||
public String getExt2() { |
||||
return ext2; |
||||
} |
||||
|
||||
public void setExt2(String ext2) { |
||||
this.ext2 = ext2; |
||||
} |
||||
|
||||
public String getExt3() { |
||||
return ext3; |
||||
} |
||||
|
||||
public void setExt3(String ext3) { |
||||
this.ext3 = ext3; |
||||
} |
||||
|
||||
@Override |
||||
public boolean equals(Object that) { |
||||
if (this == that) { |
||||
return true; |
||||
} |
||||
if (that == null) { |
||||
return false; |
||||
} |
||||
if (getClass() != that.getClass()) { |
||||
return false; |
||||
} |
||||
CouponDiscountPackageRecord other = (CouponDiscountPackageRecord) 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.getOrderId() == null ? other.getOrderId() == null : this.getOrderId().equals(other.getOrderId())) |
||||
&& (this.getChildOrderId() == null ? other.getChildOrderId() == null : this.getChildOrderId().equals(other.getChildOrderId())) |
||||
&& (this.getRecordNo() == null ? other.getRecordNo() == null : this.getRecordNo().equals(other.getRecordNo())) |
||||
&& (this.getSerialNo() == null ? other.getSerialNo() == null : this.getSerialNo().equals(other.getSerialNo())) |
||||
&& (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType())) |
||||
&& (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId())) |
||||
&& (this.getUserPhone() == null ? other.getUserPhone() == null : this.getUserPhone().equals(other.getUserPhone())) |
||||
&& (this.getCreatedTime() == null ? other.getCreatedTime() == null : this.getCreatedTime().equals(other.getCreatedTime())) |
||||
&& (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) |
||||
&& (this.getExt1() == null ? other.getExt1() == null : this.getExt1().equals(other.getExt1())) |
||||
&& (this.getExt2() == null ? other.getExt2() == null : this.getExt2().equals(other.getExt2())) |
||||
&& (this.getExt3() == null ? other.getExt3() == null : this.getExt3().equals(other.getExt3())); |
||||
} |
||||
|
||||
@Override |
||||
public int hashCode() { |
||||
final int prime = 31; |
||||
int result = 1; |
||||
result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); |
||||
result = prime * result + ((getDiscountPackageTitle() == null) ? 0 : getDiscountPackageTitle().hashCode()); |
||||
result = prime * result + ((getDiscountPackageId() == null) ? 0 : getDiscountPackageId().hashCode()); |
||||
result = prime * result + ((getOrderId() == null) ? 0 : getOrderId().hashCode()); |
||||
result = prime * result + ((getChildOrderId() == null) ? 0 : getChildOrderId().hashCode()); |
||||
result = prime * result + ((getRecordNo() == null) ? 0 : getRecordNo().hashCode()); |
||||
result = prime * result + ((getSerialNo() == null) ? 0 : getSerialNo().hashCode()); |
||||
result = prime * result + ((getType() == null) ? 0 : getType().hashCode()); |
||||
result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode()); |
||||
result = prime * result + ((getUserPhone() == null) ? 0 : getUserPhone().hashCode()); |
||||
result = prime * result + ((getCreatedTime() == null) ? 0 : getCreatedTime().hashCode()); |
||||
result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); |
||||
result = prime * result + ((getExt1() == null) ? 0 : getExt1().hashCode()); |
||||
result = prime * result + ((getExt2() == null) ? 0 : getExt2().hashCode()); |
||||
result = prime * result + ((getExt3() == null) ? 0 : getExt3().hashCode()); |
||||
return result; |
||||
} |
||||
|
||||
@Override |
||||
public String toString() { |
||||
StringBuilder sb = new StringBuilder(); |
||||
sb.append(getClass().getSimpleName()); |
||||
sb.append(" ["); |
||||
sb.append("Hash = ").append(hashCode()); |
||||
sb.append(", id=").append(id); |
||||
sb.append(", discountPackageTitle=").append(discountPackageTitle); |
||||
sb.append(", discountPackageId=").append(discountPackageId); |
||||
sb.append(", orderId=").append(orderId); |
||||
sb.append(", childOrderId=").append(childOrderId); |
||||
sb.append(", recordNo=").append(recordNo); |
||||
sb.append(", serialNo=").append(serialNo); |
||||
sb.append(", type=").append(type); |
||||
sb.append(", userId=").append(userId); |
||||
sb.append(", userPhone=").append(userPhone); |
||||
sb.append(", createdTime=").append(createdTime); |
||||
sb.append(", status=").append(status); |
||||
sb.append(", ext1=").append(ext1); |
||||
sb.append(", ext2=").append(ext2); |
||||
sb.append(", ext3=").append(ext3); |
||||
sb.append(", serialVersionUID=").append(serialVersionUID); |
||||
sb.append("]"); |
||||
return sb.toString(); |
||||
} |
||||
} |
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,297 @@ |
||||
package com.hfkj.entity; |
||||
|
||||
import java.io.Serializable; |
||||
import java.math.BigDecimal; |
||||
import java.util.Date; |
||||
|
||||
/** |
||||
* coupon_discount_user_rel |
||||
* @author |
||||
*/ |
||||
/** |
||||
* |
||||
* 代码由工具生成 |
||||
* |
||||
**/ |
||||
public class CouponDiscountUserRel implements Serializable { |
||||
/** |
||||
* 主键 |
||||
*/ |
||||
private Long id; |
||||
|
||||
/** |
||||
* 优惠券id |
||||
*/ |
||||
private Long discountId; |
||||
|
||||
/** |
||||
* 优惠券名称 |
||||
*/ |
||||
private String discountName; |
||||
|
||||
/** |
||||
* 优惠券图片 |
||||
*/ |
||||
private String discountImg; |
||||
|
||||
/** |
||||
* 卡卷类型 1:满减 2:抵扣 3:折扣 |
||||
*/ |
||||
private Integer discountType; |
||||
|
||||
/** |
||||
* 优惠券条件(满减价格) |
||||
*/ |
||||
private BigDecimal discountCondition; |
||||
|
||||
/** |
||||
* 优惠券价格 |
||||
*/ |
||||
private BigDecimal discountPrice; |
||||
|
||||
/** |
||||
* 折扣百分比(折扣使用) |
||||
*/ |
||||
private BigDecimal discountPercentage; |
||||
|
||||
/** |
||||
* 用户id |
||||
*/ |
||||
private Long userId; |
||||
|
||||
/** |
||||
* 状态 0:已过期 1:未使用 2:已使用 |
||||
*/ |
||||
private Integer status; |
||||
|
||||
/** |
||||
* 使用时间 |
||||
*/ |
||||
private Date useTime; |
||||
|
||||
/** |
||||
* 创建时间 |
||||
*/ |
||||
private Date createTime; |
||||
|
||||
/** |
||||
* 使用截止时间 |
||||
*/ |
||||
private Date useEndTime; |
||||
|
||||
private String ext1; |
||||
|
||||
private String ext2; |
||||
|
||||
private String ext3; |
||||
|
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
public Long getId() { |
||||
return id; |
||||
} |
||||
|
||||
public void setId(Long id) { |
||||
this.id = id; |
||||
} |
||||
|
||||
public Long getDiscountId() { |
||||
return discountId; |
||||
} |
||||
|
||||
public void setDiscountId(Long discountId) { |
||||
this.discountId = discountId; |
||||
} |
||||
|
||||
public String getDiscountName() { |
||||
return discountName; |
||||
} |
||||
|
||||
public void setDiscountName(String discountName) { |
||||
this.discountName = discountName; |
||||
} |
||||
|
||||
public String getDiscountImg() { |
||||
return discountImg; |
||||
} |
||||
|
||||
public void setDiscountImg(String discountImg) { |
||||
this.discountImg = discountImg; |
||||
} |
||||
|
||||
public Integer getDiscountType() { |
||||
return discountType; |
||||
} |
||||
|
||||
public void setDiscountType(Integer discountType) { |
||||
this.discountType = discountType; |
||||
} |
||||
|
||||
public BigDecimal getDiscountCondition() { |
||||
return discountCondition; |
||||
} |
||||
|
||||
public void setDiscountCondition(BigDecimal discountCondition) { |
||||
this.discountCondition = discountCondition; |
||||
} |
||||
|
||||
public BigDecimal getDiscountPrice() { |
||||
return discountPrice; |
||||
} |
||||
|
||||
public void setDiscountPrice(BigDecimal discountPrice) { |
||||
this.discountPrice = discountPrice; |
||||
} |
||||
|
||||
public BigDecimal getDiscountPercentage() { |
||||
return discountPercentage; |
||||
} |
||||
|
||||
public void setDiscountPercentage(BigDecimal discountPercentage) { |
||||
this.discountPercentage = discountPercentage; |
||||
} |
||||
|
||||
public Long getUserId() { |
||||
return userId; |
||||
} |
||||
|
||||
public void setUserId(Long userId) { |
||||
this.userId = userId; |
||||
} |
||||
|
||||
public Integer getStatus() { |
||||
return status; |
||||
} |
||||
|
||||
public void setStatus(Integer status) { |
||||
this.status = status; |
||||
} |
||||
|
||||
public Date getUseTime() { |
||||
return useTime; |
||||
} |
||||
|
||||
public void setUseTime(Date useTime) { |
||||
this.useTime = useTime; |
||||
} |
||||
|
||||
public Date getCreateTime() { |
||||
return createTime; |
||||
} |
||||
|
||||
public void setCreateTime(Date createTime) { |
||||
this.createTime = createTime; |
||||
} |
||||
|
||||
public Date getUseEndTime() { |
||||
return useEndTime; |
||||
} |
||||
|
||||
public void setUseEndTime(Date useEndTime) { |
||||
this.useEndTime = useEndTime; |
||||
} |
||||
|
||||
public String 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; |
||||
} |
||||
CouponDiscountUserRel other = (CouponDiscountUserRel) that; |
||||
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) |
||||
&& (this.getDiscountId() == null ? other.getDiscountId() == null : this.getDiscountId().equals(other.getDiscountId())) |
||||
&& (this.getDiscountName() == null ? other.getDiscountName() == null : this.getDiscountName().equals(other.getDiscountName())) |
||||
&& (this.getDiscountImg() == null ? other.getDiscountImg() == null : this.getDiscountImg().equals(other.getDiscountImg())) |
||||
&& (this.getDiscountType() == null ? other.getDiscountType() == null : this.getDiscountType().equals(other.getDiscountType())) |
||||
&& (this.getDiscountCondition() == null ? other.getDiscountCondition() == null : this.getDiscountCondition().equals(other.getDiscountCondition())) |
||||
&& (this.getDiscountPrice() == null ? other.getDiscountPrice() == null : this.getDiscountPrice().equals(other.getDiscountPrice())) |
||||
&& (this.getDiscountPercentage() == null ? other.getDiscountPercentage() == null : this.getDiscountPercentage().equals(other.getDiscountPercentage())) |
||||
&& (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId())) |
||||
&& (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) |
||||
&& (this.getUseTime() == null ? other.getUseTime() == null : this.getUseTime().equals(other.getUseTime())) |
||||
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) |
||||
&& (this.getUseEndTime() == null ? other.getUseEndTime() == null : this.getUseEndTime().equals(other.getUseEndTime())) |
||||
&& (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 + ((getDiscountId() == null) ? 0 : getDiscountId().hashCode()); |
||||
result = prime * result + ((getDiscountName() == null) ? 0 : getDiscountName().hashCode()); |
||||
result = prime * result + ((getDiscountImg() == null) ? 0 : getDiscountImg().hashCode()); |
||||
result = prime * result + ((getDiscountType() == null) ? 0 : getDiscountType().hashCode()); |
||||
result = prime * result + ((getDiscountCondition() == null) ? 0 : getDiscountCondition().hashCode()); |
||||
result = prime * result + ((getDiscountPrice() == null) ? 0 : getDiscountPrice().hashCode()); |
||||
result = prime * result + ((getDiscountPercentage() == null) ? 0 : getDiscountPercentage().hashCode()); |
||||
result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode()); |
||||
result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); |
||||
result = prime * result + ((getUseTime() == null) ? 0 : getUseTime().hashCode()); |
||||
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); |
||||
result = prime * result + ((getUseEndTime() == null) ? 0 : getUseEndTime().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(", discountId=").append(discountId); |
||||
sb.append(", discountName=").append(discountName); |
||||
sb.append(", discountImg=").append(discountImg); |
||||
sb.append(", discountType=").append(discountType); |
||||
sb.append(", discountCondition=").append(discountCondition); |
||||
sb.append(", discountPrice=").append(discountPrice); |
||||
sb.append(", discountPercentage=").append(discountPercentage); |
||||
sb.append(", userId=").append(userId); |
||||
sb.append(", status=").append(status); |
||||
sb.append(", useTime=").append(useTime); |
||||
sb.append(", createTime=").append(createTime); |
||||
sb.append(", useEndTime=").append(useEndTime); |
||||
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(); |
||||
} |
||||
} |
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,385 @@ |
||||
package com.hfkj.entity; |
||||
|
||||
import java.io.Serializable; |
||||
import java.util.Date; |
||||
|
||||
/** |
||||
* goods_logistics |
||||
* @author |
||||
*/ |
||||
/** |
||||
* |
||||
* 代码由工具生成 |
||||
* |
||||
**/ |
||||
public class GoodsLogistics implements Serializable { |
||||
/** |
||||
* 主键 |
||||
*/ |
||||
private Long id; |
||||
|
||||
/** |
||||
* 用户id |
||||
*/ |
||||
private Long userId; |
||||
|
||||
/** |
||||
* 订单ID |
||||
*/ |
||||
private Long orderId; |
||||
|
||||
/** |
||||
* 唯一业务号 |
||||
*/ |
||||
private String taskNo; |
||||
|
||||
/** |
||||
* 快递单号 |
||||
*/ |
||||
private String number; |
||||
|
||||
/** |
||||
* 物流状态描述 |
||||
*/ |
||||
private String logisticsStatus; |
||||
|
||||
/** |
||||
* 物流状态描述 |
||||
*/ |
||||
private String logisticsStatusDesc; |
||||
|
||||
/** |
||||
* 运单号物流流转当前最新描述 |
||||
*/ |
||||
private String theLastMessage; |
||||
|
||||
/** |
||||
* 运单号物流流转当前最新变更时间 |
||||
*/ |
||||
private Date theLastTime; |
||||
|
||||
/** |
||||
* 从揽收到送达所耗时间 |
||||
*/ |
||||
private String takeTime; |
||||
|
||||
/** |
||||
* 快递员 |
||||
*/ |
||||
private String courier; |
||||
|
||||
/** |
||||
* 快递员联系方式 |
||||
*/ |
||||
private String courierPhone; |
||||
|
||||
/** |
||||
* 物流明细 |
||||
*/ |
||||
private String logisticsTraceDetails; |
||||
|
||||
/** |
||||
* 快递公司名称 |
||||
*/ |
||||
private String expressCompanyName; |
||||
|
||||
/** |
||||
* 状态:0:删除 1:正常 |
||||
*/ |
||||
private Integer status; |
||||
|
||||
/** |
||||
* 创建时间 |
||||
*/ |
||||
private Date createTime; |
||||
|
||||
/** |
||||
* 操作人员id |
||||
*/ |
||||
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 Long getUserId() { |
||||
return userId; |
||||
} |
||||
|
||||
public void setUserId(Long userId) { |
||||
this.userId = userId; |
||||
} |
||||
|
||||
public Long getOrderId() { |
||||
return orderId; |
||||
} |
||||
|
||||
public void setOrderId(Long orderId) { |
||||
this.orderId = orderId; |
||||
} |
||||
|
||||
public String getTaskNo() { |
||||
return taskNo; |
||||
} |
||||
|
||||
public void setTaskNo(String taskNo) { |
||||
this.taskNo = taskNo; |
||||
} |
||||
|
||||
public String getNumber() { |
||||
return number; |
||||
} |
||||
|
||||
public void setNumber(String number) { |
||||
this.number = number; |
||||
} |
||||
|
||||
public String getLogisticsStatus() { |
||||
return logisticsStatus; |
||||
} |
||||
|
||||
public void setLogisticsStatus(String logisticsStatus) { |
||||
this.logisticsStatus = logisticsStatus; |
||||
} |
||||
|
||||
public String getLogisticsStatusDesc() { |
||||
return logisticsStatusDesc; |
||||
} |
||||
|
||||
public void setLogisticsStatusDesc(String logisticsStatusDesc) { |
||||
this.logisticsStatusDesc = logisticsStatusDesc; |
||||
} |
||||
|
||||
public String getTheLastMessage() { |
||||
return theLastMessage; |
||||
} |
||||
|
||||
public void setTheLastMessage(String theLastMessage) { |
||||
this.theLastMessage = theLastMessage; |
||||
} |
||||
|
||||
public Date getTheLastTime() { |
||||
return theLastTime; |
||||
} |
||||
|
||||
public void setTheLastTime(Date theLastTime) { |
||||
this.theLastTime = theLastTime; |
||||
} |
||||
|
||||
public String getTakeTime() { |
||||
return takeTime; |
||||
} |
||||
|
||||
public void setTakeTime(String takeTime) { |
||||
this.takeTime = takeTime; |
||||
} |
||||
|
||||
public String getCourier() { |
||||
return courier; |
||||
} |
||||
|
||||
public void setCourier(String courier) { |
||||
this.courier = courier; |
||||
} |
||||
|
||||
public String getCourierPhone() { |
||||
return courierPhone; |
||||
} |
||||
|
||||
public void setCourierPhone(String courierPhone) { |
||||
this.courierPhone = courierPhone; |
||||
} |
||||
|
||||
public String getLogisticsTraceDetails() { |
||||
return logisticsTraceDetails; |
||||
} |
||||
|
||||
public void setLogisticsTraceDetails(String logisticsTraceDetails) { |
||||
this.logisticsTraceDetails = logisticsTraceDetails; |
||||
} |
||||
|
||||
public String getExpressCompanyName() { |
||||
return expressCompanyName; |
||||
} |
||||
|
||||
public void setExpressCompanyName(String expressCompanyName) { |
||||
this.expressCompanyName = expressCompanyName; |
||||
} |
||||
|
||||
public Integer getStatus() { |
||||
return status; |
||||
} |
||||
|
||||
public void setStatus(Integer status) { |
||||
this.status = status; |
||||
} |
||||
|
||||
public Date getCreateTime() { |
||||
return createTime; |
||||
} |
||||
|
||||
public void setCreateTime(Date createTime) { |
||||
this.createTime = createTime; |
||||
} |
||||
|
||||
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; |
||||
} |
||||
GoodsLogistics other = (GoodsLogistics) that; |
||||
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) |
||||
&& (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId())) |
||||
&& (this.getOrderId() == null ? other.getOrderId() == null : this.getOrderId().equals(other.getOrderId())) |
||||
&& (this.getTaskNo() == null ? other.getTaskNo() == null : this.getTaskNo().equals(other.getTaskNo())) |
||||
&& (this.getNumber() == null ? other.getNumber() == null : this.getNumber().equals(other.getNumber())) |
||||
&& (this.getLogisticsStatus() == null ? other.getLogisticsStatus() == null : this.getLogisticsStatus().equals(other.getLogisticsStatus())) |
||||
&& (this.getLogisticsStatusDesc() == null ? other.getLogisticsStatusDesc() == null : this.getLogisticsStatusDesc().equals(other.getLogisticsStatusDesc())) |
||||
&& (this.getTheLastMessage() == null ? other.getTheLastMessage() == null : this.getTheLastMessage().equals(other.getTheLastMessage())) |
||||
&& (this.getTheLastTime() == null ? other.getTheLastTime() == null : this.getTheLastTime().equals(other.getTheLastTime())) |
||||
&& (this.getTakeTime() == null ? other.getTakeTime() == null : this.getTakeTime().equals(other.getTakeTime())) |
||||
&& (this.getCourier() == null ? other.getCourier() == null : this.getCourier().equals(other.getCourier())) |
||||
&& (this.getCourierPhone() == null ? other.getCourierPhone() == null : this.getCourierPhone().equals(other.getCourierPhone())) |
||||
&& (this.getLogisticsTraceDetails() == null ? other.getLogisticsTraceDetails() == null : this.getLogisticsTraceDetails().equals(other.getLogisticsTraceDetails())) |
||||
&& (this.getExpressCompanyName() == null ? other.getExpressCompanyName() == null : this.getExpressCompanyName().equals(other.getExpressCompanyName())) |
||||
&& (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) |
||||
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) |
||||
&& (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 + ((getUserId() == null) ? 0 : getUserId().hashCode()); |
||||
result = prime * result + ((getOrderId() == null) ? 0 : getOrderId().hashCode()); |
||||
result = prime * result + ((getTaskNo() == null) ? 0 : getTaskNo().hashCode()); |
||||
result = prime * result + ((getNumber() == null) ? 0 : getNumber().hashCode()); |
||||
result = prime * result + ((getLogisticsStatus() == null) ? 0 : getLogisticsStatus().hashCode()); |
||||
result = prime * result + ((getLogisticsStatusDesc() == null) ? 0 : getLogisticsStatusDesc().hashCode()); |
||||
result = prime * result + ((getTheLastMessage() == null) ? 0 : getTheLastMessage().hashCode()); |
||||
result = prime * result + ((getTheLastTime() == null) ? 0 : getTheLastTime().hashCode()); |
||||
result = prime * result + ((getTakeTime() == null) ? 0 : getTakeTime().hashCode()); |
||||
result = prime * result + ((getCourier() == null) ? 0 : getCourier().hashCode()); |
||||
result = prime * result + ((getCourierPhone() == null) ? 0 : getCourierPhone().hashCode()); |
||||
result = prime * result + ((getLogisticsTraceDetails() == null) ? 0 : getLogisticsTraceDetails().hashCode()); |
||||
result = prime * result + ((getExpressCompanyName() == null) ? 0 : getExpressCompanyName().hashCode()); |
||||
result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); |
||||
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().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(", userId=").append(userId); |
||||
sb.append(", orderId=").append(orderId); |
||||
sb.append(", taskNo=").append(taskNo); |
||||
sb.append(", number=").append(number); |
||||
sb.append(", logisticsStatus=").append(logisticsStatus); |
||||
sb.append(", logisticsStatusDesc=").append(logisticsStatusDesc); |
||||
sb.append(", theLastMessage=").append(theLastMessage); |
||||
sb.append(", theLastTime=").append(theLastTime); |
||||
sb.append(", takeTime=").append(takeTime); |
||||
sb.append(", courier=").append(courier); |
||||
sb.append(", courierPhone=").append(courierPhone); |
||||
sb.append(", logisticsTraceDetails=").append(logisticsTraceDetails); |
||||
sb.append(", expressCompanyName=").append(expressCompanyName); |
||||
sb.append(", status=").append(status); |
||||
sb.append(", createTime=").append(createTime); |
||||
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(); |
||||
} |
||||
} |
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,289 @@ |
||||
package com.hfkj.entity; |
||||
|
||||
import java.io.Serializable; |
||||
import java.util.Date; |
||||
|
||||
/** |
||||
* goods_user_address |
||||
* @author |
||||
*/ |
||||
/** |
||||
* |
||||
* 代码由工具生成 |
||||
* |
||||
**/ |
||||
public class GoodsUserAddress implements Serializable { |
||||
/** |
||||
* 主键 |
||||
*/ |
||||
private Long id; |
||||
|
||||
/** |
||||
* 用户编码 |
||||
*/ |
||||
private Long userId; |
||||
|
||||
/** |
||||
* 收货人 |
||||
*/ |
||||
private String consignee; |
||||
|
||||
/** |
||||
* 联系电话 |
||||
*/ |
||||
private String phone; |
||||
|
||||
/** |
||||
* 详细地址 |
||||
*/ |
||||
private String address; |
||||
|
||||
/** |
||||
* 区域编码 |
||||
*/ |
||||
private String regionId; |
||||
|
||||
/** |
||||
* 区域名称 |
||||
*/ |
||||
private String regionName; |
||||
|
||||
/** |
||||
* 是否默认地址 |
||||
*/ |
||||
private Boolean whetherDefault; |
||||
|
||||
/** |
||||
* 创建时间 |
||||
*/ |
||||
private Date createTime; |
||||
|
||||
/** |
||||
* 更新时间 |
||||
*/ |
||||
private Date updateTime; |
||||
|
||||
/** |
||||
* 操作人员id |
||||
*/ |
||||
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 Long getUserId() { |
||||
return userId; |
||||
} |
||||
|
||||
public void setUserId(Long userId) { |
||||
this.userId = userId; |
||||
} |
||||
|
||||
public String getConsignee() { |
||||
return consignee; |
||||
} |
||||
|
||||
public void setConsignee(String consignee) { |
||||
this.consignee = consignee; |
||||
} |
||||
|
||||
public String getPhone() { |
||||
return phone; |
||||
} |
||||
|
||||
public void setPhone(String phone) { |
||||
this.phone = phone; |
||||
} |
||||
|
||||
public String getAddress() { |
||||
return address; |
||||
} |
||||
|
||||
public void setAddress(String address) { |
||||
this.address = address; |
||||
} |
||||
|
||||
public String getRegionId() { |
||||
return regionId; |
||||
} |
||||
|
||||
public void setRegionId(String regionId) { |
||||
this.regionId = regionId; |
||||
} |
||||
|
||||
public String getRegionName() { |
||||
return regionName; |
||||
} |
||||
|
||||
public void setRegionName(String regionName) { |
||||
this.regionName = regionName; |
||||
} |
||||
|
||||
public Boolean getWhetherDefault() { |
||||
return whetherDefault; |
||||
} |
||||
|
||||
public void setWhetherDefault(Boolean whetherDefault) { |
||||
this.whetherDefault = whetherDefault; |
||||
} |
||||
|
||||
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 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; |
||||
} |
||||
GoodsUserAddress other = (GoodsUserAddress) that; |
||||
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) |
||||
&& (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId())) |
||||
&& (this.getConsignee() == null ? other.getConsignee() == null : this.getConsignee().equals(other.getConsignee())) |
||||
&& (this.getPhone() == null ? other.getPhone() == null : this.getPhone().equals(other.getPhone())) |
||||
&& (this.getAddress() == null ? other.getAddress() == null : this.getAddress().equals(other.getAddress())) |
||||
&& (this.getRegionId() == null ? other.getRegionId() == null : this.getRegionId().equals(other.getRegionId())) |
||||
&& (this.getRegionName() == null ? other.getRegionName() == null : this.getRegionName().equals(other.getRegionName())) |
||||
&& (this.getWhetherDefault() == null ? other.getWhetherDefault() == null : this.getWhetherDefault().equals(other.getWhetherDefault())) |
||||
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) |
||||
&& (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime())) |
||||
&& (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 + ((getUserId() == null) ? 0 : getUserId().hashCode()); |
||||
result = prime * result + ((getConsignee() == null) ? 0 : getConsignee().hashCode()); |
||||
result = prime * result + ((getPhone() == null) ? 0 : getPhone().hashCode()); |
||||
result = prime * result + ((getAddress() == null) ? 0 : getAddress().hashCode()); |
||||
result = prime * result + ((getRegionId() == null) ? 0 : getRegionId().hashCode()); |
||||
result = prime * result + ((getRegionName() == null) ? 0 : getRegionName().hashCode()); |
||||
result = prime * result + ((getWhetherDefault() == null) ? 0 : getWhetherDefault().hashCode()); |
||||
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); |
||||
result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().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(", userId=").append(userId); |
||||
sb.append(", consignee=").append(consignee); |
||||
sb.append(", phone=").append(phone); |
||||
sb.append(", address=").append(address); |
||||
sb.append(", regionId=").append(regionId); |
||||
sb.append(", regionName=").append(regionName); |
||||
sb.append(", whetherDefault=").append(whetherDefault); |
||||
sb.append(", createTime=").append(createTime); |
||||
sb.append(", updateTime=").append(updateTime); |
||||
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(); |
||||
} |
||||
} |
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,32 @@ |
||||
package com.hfkj.service; |
||||
|
||||
import com.alibaba.fastjson.JSONObject; |
||||
import com.hfkj.entity.BsCity; |
||||
|
||||
import java.util.List; |
||||
|
||||
public interface CommonService { |
||||
|
||||
/** |
||||
* @Author Sum1Dream |
||||
* @name getCityList.java |
||||
* @Description // 查询所有城市
|
||||
* @Date 10:06 2022/7/4 |
||||
* @Param [cityName] |
||||
* @return |
||||
*/ |
||||
List<BsCity> getCityList(Long parentId); |
||||
|
||||
|
||||
/** |
||||
* @Author Sum1Dream |
||||
* @Name getRegional |
||||
* @Description // 获取区域信息
|
||||
* @Date 16:56 2023/4/13 |
||||
* @Param [] |
||||
* @Return com.alibaba.fastjson.JSONObject |
||||
*/ |
||||
List<JSONObject> getCity(String code , String name , String child); |
||||
|
||||
|
||||
} |
@ -0,0 +1,71 @@ |
||||
package com.hfkj.service.discount; |
||||
|
||||
import com.hfkj.entity.CouponDiscount; |
||||
import com.hfkj.entity.CouponDiscountPackage; |
||||
|
||||
import java.util.List; |
||||
import java.util.Map; |
||||
|
||||
public interface CouponDiscountPackageService { |
||||
|
||||
/** |
||||
* @Author Sum1Dream |
||||
* @Name create |
||||
* @Description // 创建
|
||||
* @Date 15:11 2024/4/19 |
||||
* @Param CouponDiscount |
||||
* @return void |
||||
*/ |
||||
void create(CouponDiscountPackage discountPackage); |
||||
|
||||
/** |
||||
* @Author Sum1Dream |
||||
* @Name update |
||||
* @Description // 修改
|
||||
* @Date 15:12 2024/4/19 |
||||
* @Param CouponDiscount |
||||
* @return void |
||||
*/ |
||||
void update(CouponDiscountPackage discountPackage); |
||||
|
||||
/** |
||||
* @Author Sum1Dream |
||||
* @Name delete |
||||
* @Description // 修改
|
||||
* @Date 15:12 2024/4/19 |
||||
* @Param id |
||||
* @return void |
||||
*/ |
||||
void delete(Long id , Boolean fullDelete); |
||||
|
||||
/** |
||||
* @Author Sum1Dream |
||||
* @Name queryDetail |
||||
* @Description // 根据ID查询详情
|
||||
* @Date 15:12 2024/4/19 |
||||
* @Param id |
||||
* @return com.hfkj.entity.CouponDiscount |
||||
*/ |
||||
CouponDiscountPackage queryDetail(Long id); |
||||
|
||||
/** |
||||
* @Author Sum1Dream |
||||
* @Name queryDetailByMap |
||||
* @Description // 根据多条件查询
|
||||
* @Date 15:12 2024/4/19 |
||||
* @Param map |
||||
* @return com.hfkj.entity.CouponDiscount |
||||
*/ |
||||
CouponDiscountPackage queryDetailByMap(Map<String , Object> map); |
||||
|
||||
/** |
||||
* @Author Sum1Dream |
||||
* @Name getList |
||||
* @Description // 根据多条件查询列表
|
||||
* @Date 15:13 2024/4/19 |
||||
* @Param map |
||||
* @return java.util.List<com.hfkj.entity.CouponDiscount> |
||||
*/ |
||||
List<CouponDiscountPackage> getList(Map<String , Object> map); |
||||
|
||||
} |
@ -0,0 +1,77 @@ |
||||
package com.hfkj.service.goods; |
||||
import com.hfkj.entity.GoodsUserAddress; |
||||
import java.util.List; |
||||
import java.util.Map; |
||||
|
||||
public interface GoodsUserAddressService { |
||||
|
||||
/** |
||||
* @Author Sum1Dream |
||||
* @Name create |
||||
* @Description // 创建
|
||||
* @Date 15:11 2024/4/19 |
||||
* @Param GoodsBrand |
||||
* @return void |
||||
*/ |
||||
void create(GoodsUserAddress goodsUserAddress); |
||||
|
||||
/** |
||||
* @Author Sum1Dream |
||||
* @Name update |
||||
* @Description // 修改
|
||||
* @Date 15:12 2024/4/19 |
||||
* @Param GoodsBrand |
||||
* @return void |
||||
*/ |
||||
void update(GoodsUserAddress goodsUserAddress); |
||||
|
||||
/** |
||||
* @Author Sum1Dream |
||||
* @Name delete |
||||
* @Description // 修改
|
||||
* @Date 15:12 2024/4/19 |
||||
* @Param id |
||||
* @return void |
||||
*/ |
||||
void delete(Long id); |
||||
|
||||
/** |
||||
* @Author Sum1Dream |
||||
* @Name queryDetail |
||||
* @Description // 根据ID查询产品类型详情
|
||||
* @Date 15:12 2024/4/19 |
||||
* @Param id |
||||
* @return com.hfkj.entity.GoodsBrand |
||||
*/ |
||||
GoodsUserAddress queryDetail(Long id); |
||||
|
||||
/** |
||||
* @Author Sum1Dream |
||||
* @Name queryDetailByMap |
||||
* @Description // 根据多条件查询产品类型
|
||||
* @Date 15:12 2024/4/19 |
||||
* @Param map |
||||
* @return com.hfkj.entity.GoodsBrand |
||||
*/ |
||||
GoodsUserAddress queryDetailByMap(Map<String , Object> map); |
||||
|
||||
/** |
||||
* @Author Sum1Dream |
||||
* @Name getList |
||||
* @Description // 根据多条件查询列表
|
||||
* @Date 15:13 2024/4/19 |
||||
* @Param map |
||||
* @return java.util.List<com.hfkj.entity.GoodsBrand> |
||||
*/ |
||||
List<GoodsUserAddress> getList(Map<String , Object> map); |
||||
|
||||
/** |
||||
* @Author Sum1Dream |
||||
* @Name cleanDeliveryAddressDefault |
||||
* @Description // 清空所有的默认收货地址
|
||||
* @Date 10:33 2023/4/17 |
||||
* @Param [userId] |
||||
* @Return void |
||||
*/ |
||||
void cleanDeliveryAddressDefault(Long userId); |
||||
} |
@ -0,0 +1,71 @@ |
||||
package com.hfkj.service.goods.impl; |
||||
|
||||
import com.hfkj.dao.GoodsUserAddressMapper; |
||||
import com.hfkj.entity.GoodsUserAddress; |
||||
import com.hfkj.entity.GoodsUserAddressExample; |
||||
import com.hfkj.service.goods.GoodsUserAddressService; |
||||
import org.apache.commons.collections4.MapUtils; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
import javax.annotation.Resource; |
||||
import java.util.Collections; |
||||
import java.util.HashMap; |
||||
import java.util.List; |
||||
import java.util.Map; |
||||
|
||||
@Service("goodsUserAddressService") |
||||
public class GoodsUserAddressServiceImpl implements GoodsUserAddressService { |
||||
|
||||
@Resource |
||||
private GoodsUserAddressMapper goodsUserAddressMapper; |
||||
|
||||
@Override |
||||
public void create(GoodsUserAddress goodsUserAddress) { |
||||
goodsUserAddressMapper.insert(goodsUserAddress); |
||||
} |
||||
|
||||
@Override |
||||
public void update(GoodsUserAddress goodsUserAddress) { |
||||
goodsUserAddressMapper.updateByPrimaryKeySelective(goodsUserAddress); |
||||
} |
||||
|
||||
@Override |
||||
public void delete(Long id) { |
||||
goodsUserAddressMapper.deleteByPrimaryKey(id); |
||||
} |
||||
|
||||
@Override |
||||
public GoodsUserAddress queryDetail(Long id) { |
||||
return goodsUserAddressMapper.selectByPrimaryKey(id); |
||||
} |
||||
|
||||
@Override |
||||
public GoodsUserAddress queryDetailByMap(Map<String, Object> map) { |
||||
return null; |
||||
} |
||||
|
||||
@Override |
||||
public List<GoodsUserAddress> getList(Map<String, Object> map) { |
||||
GoodsUserAddressExample example = new GoodsUserAddressExample(); |
||||
GoodsUserAddressExample.Criteria criteria = example.createCriteria(); |
||||
|
||||
if (MapUtils.getLong(map, "userId") != null) { |
||||
criteria.andUserIdEqualTo(MapUtils.getLong(map, "userId")); |
||||
} |
||||
return goodsUserAddressMapper.selectByExample(example); |
||||
} |
||||
|
||||
@Override |
||||
public void cleanDeliveryAddressDefault(Long userId) { |
||||
Map<String , Object> map = new HashMap<>(); |
||||
map.put("userId" , userId); |
||||
List<GoodsUserAddress> list = getList(map); |
||||
|
||||
if (list.size()>1) { |
||||
for (GoodsUserAddress deliveryAddress : list) { |
||||
deliveryAddress.setWhetherDefault(false); |
||||
update(deliveryAddress); |
||||
} |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,83 @@ |
||||
package com.hfkj.service.impl; |
||||
|
||||
import com.alibaba.fastjson.JSONObject; |
||||
import com.hfkj.dao.BsCityMapper; |
||||
import com.hfkj.entity.BsCity; |
||||
import com.hfkj.entity.BsCityExample; |
||||
import com.hfkj.service.CommonService; |
||||
import org.apache.commons.lang3.StringUtils; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
import javax.annotation.Resource; |
||||
import java.util.ArrayList; |
||||
import java.util.Collections; |
||||
import java.util.List; |
||||
|
||||
@Service("commonService") |
||||
public class CommonServiceImpl implements CommonService { |
||||
|
||||
@Resource |
||||
private BsCityMapper bsCityMapper; |
||||
|
||||
@Override |
||||
public List<BsCity> getCityList(Long parentId) { |
||||
BsCityExample example = new BsCityExample(); |
||||
BsCityExample.Criteria criteria = example.createCriteria(); |
||||
|
||||
if (parentId != null) { |
||||
criteria.andParentIdEqualTo(parentId); |
||||
}else { |
||||
criteria.andParentIdIsNull(); |
||||
} |
||||
criteria.andStatusEqualTo(1); |
||||
|
||||
return bsCityMapper.selectByExample(example); |
||||
} |
||||
|
||||
@Override |
||||
public List<JSONObject> getCity(String code, String name, String child) { |
||||
|
||||
// 获取父类
|
||||
List<BsCity> regionListParent = getCityList(null); |
||||
|
||||
List<JSONObject> jsonProvince = new ArrayList<>(); |
||||
|
||||
for (BsCity bsCity : regionListParent) { |
||||
JSONObject provinceObject = new JSONObject(); |
||||
provinceObject.put(code , bsCity.getRegionId()); |
||||
provinceObject.put(name , bsCity.getRegionName()); |
||||
|
||||
List<BsCity> cityList = getCityList(bsCity.getRegionId()); |
||||
|
||||
if (cityList.size() > 0) { |
||||
List<JSONObject> jsonCity = new ArrayList<>(); |
||||
for (BsCity city : cityList) { |
||||
JSONObject objectCity = new JSONObject(); |
||||
objectCity.put(code , city.getRegionId()); |
||||
objectCity.put(name , city.getRegionName()); |
||||
|
||||
List<BsCity> areaList = getCityList(city.getRegionId()); |
||||
|
||||
if (areaList.size() > 0 ) { |
||||
List<JSONObject> jsonArea = new ArrayList<>(); |
||||
for (BsCity area : areaList) { |
||||
JSONObject objectArea = new JSONObject(); |
||||
objectArea.put(code , area.getRegionId()); |
||||
objectArea.put(name , area.getRegionName()); |
||||
objectArea.put("isLeaf" , true); |
||||
jsonArea.add(objectArea); |
||||
} |
||||
objectCity.put(child , jsonArea); |
||||
} |
||||
jsonCity.add(objectCity); |
||||
} |
||||
provinceObject.put(child , jsonCity); |
||||
|
||||
} |
||||
jsonProvince.add(provinceObject); |
||||
|
||||
} |
||||
|
||||
return jsonProvince; |
||||
} |
||||
} |
Loading…
Reference in new issue