commit
b77e2c82ca
@ -0,0 +1,95 @@ |
||||
package com.bweb.controller; |
||||
|
||||
import com.alibaba.fastjson.JSONObject; |
||||
import com.github.pagehelper.PageHelper; |
||||
import com.github.pagehelper.PageInfo; |
||||
import com.hai.common.exception.ErrorCode; |
||||
import com.hai.common.exception.ErrorHelp; |
||||
import com.hai.common.exception.SysCode; |
||||
import com.hai.common.security.UserCenter; |
||||
import com.hai.common.utils.ResponseMsgUtil; |
||||
import com.hai.entity.HighMerchant; |
||||
import com.hai.enum_type.MerStoreAmountSourceTypeEnum; |
||||
import com.hai.enum_type.UserObjectTypeEnum; |
||||
import com.hai.model.ResponseData; |
||||
import com.hai.model.UserInfoModel; |
||||
import com.hai.service.HighMerchantAccountRecordService; |
||||
import com.hai.service.HighMerchantService; |
||||
import io.swagger.annotations.Api; |
||||
import io.swagger.annotations.ApiOperation; |
||||
import org.slf4j.Logger; |
||||
import org.slf4j.LoggerFactory; |
||||
import org.springframework.dao.DeadlockLoserDataAccessException; |
||||
import org.springframework.stereotype.Controller; |
||||
import org.springframework.web.bind.annotation.*; |
||||
|
||||
import javax.annotation.Resource; |
||||
import java.math.BigDecimal; |
||||
import java.util.ArrayList; |
||||
import java.util.HashMap; |
||||
import java.util.List; |
||||
import java.util.Map; |
||||
|
||||
@Controller |
||||
@RequestMapping(value = "/merAccountRecord") |
||||
@Api(value = "商户门店接口") |
||||
public class HighMerchantAccountRecordController { |
||||
|
||||
private static Logger log = LoggerFactory.getLogger(HighMerchantAccountRecordController.class); |
||||
|
||||
@Resource |
||||
private HighMerchantAccountRecordService merchantAccountRecordService; |
||||
|
||||
@Resource |
||||
private HighMerchantService merchantService; |
||||
|
||||
@Resource |
||||
private UserCenter userCenter; |
||||
|
||||
@RequestMapping(value = "/getRecordList", method = RequestMethod.GET) |
||||
@ResponseBody |
||||
@ApiOperation(value = "查询记录列表") |
||||
public synchronized ResponseData getRecordList(@RequestParam(name = "merId", required = false) Long merId, |
||||
@RequestParam(name = "pageNum", required = true) Integer pageNum, |
||||
@RequestParam(name = "pageSize", required = true) Integer pageSize) { |
||||
try { |
||||
UserInfoModel userInfoModel = userCenter.getSessionModel(UserInfoModel.class); |
||||
if (userInfoModel == null) { |
||||
throw ErrorHelp.genException(SysCode.System, ErrorCode.SEC_USER_EXPIRED, ""); |
||||
} |
||||
|
||||
Map<String, Object> param = new HashMap<>(); |
||||
if (userInfoModel.getSecUser().getObjectType().equals(UserObjectTypeEnum.type0.getType())) { |
||||
param.put("merId", merId); |
||||
|
||||
} else if (userInfoModel.getSecUser().getObjectType().equals(UserObjectTypeEnum.type1.getType())) { |
||||
|
||||
if (merId == null) { |
||||
Map<String, Object> merMap = new HashMap<>(); |
||||
merMap.put("companyId", userInfoModel.getBsCompany().getId()); |
||||
List<HighMerchant> merchantList = merchantService.getMerchantList(merMap); |
||||
|
||||
List<Long> merIdList = new ArrayList<>(); |
||||
for (HighMerchant merchant : merchantList) { |
||||
merIdList.add(merchant.getId()); |
||||
} |
||||
param.put("merIdList", merIdList); |
||||
} else { |
||||
param.put("merId", merId); |
||||
} |
||||
|
||||
} else if (userInfoModel.getSecUser().getObjectType().equals(UserObjectTypeEnum.type2.getType())) { |
||||
param.put("merId", userInfoModel.getMerchant().getId()); |
||||
} else { |
||||
throw ErrorHelp.genException(SysCode.System, ErrorCode.MERCHANT_NOT_AUTHORIZED, ""); |
||||
} |
||||
param.put("type", 1); |
||||
PageHelper.startPage(pageNum,pageSize); |
||||
return ResponseMsgUtil.success(new PageInfo<>(merchantAccountRecordService.getRecordList(param))); |
||||
|
||||
} catch (Exception e) { |
||||
log.error("HighCompanyAmountController --> recharge() error!", e); |
||||
return ResponseMsgUtil.exception(e); |
||||
} |
||||
} |
||||
} |
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -0,0 +1,125 @@ |
||||
package com.hai.dao; |
||||
|
||||
import com.hai.entity.HighMerchantAccountMarketing; |
||||
import com.hai.entity.HighMerchantAccountMarketingExample; |
||||
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 HighMerchantAccountMarketingMapper extends HighMerchantAccountMarketingMapperExt { |
||||
@SelectProvider(type=HighMerchantAccountMarketingSqlProvider.class, method="countByExample") |
||||
long countByExample(HighMerchantAccountMarketingExample example); |
||||
|
||||
@DeleteProvider(type=HighMerchantAccountMarketingSqlProvider.class, method="deleteByExample") |
||||
int deleteByExample(HighMerchantAccountMarketingExample example); |
||||
|
||||
@Delete({ |
||||
"delete from high_merchant_account_marketing", |
||||
"where id = #{id,jdbcType=BIGINT}" |
||||
}) |
||||
int deleteByPrimaryKey(Long id); |
||||
|
||||
@Insert({ |
||||
"insert into high_merchant_account_marketing (`type`, mer_id, ", |
||||
"mer_account_id, price, ", |
||||
"oil_no_relief_price, `status`, ", |
||||
"create_time, update_time, ", |
||||
"ext_1, ext_2, ext_3)", |
||||
"values (#{type,jdbcType=INTEGER}, #{merId,jdbcType=BIGINT}, ", |
||||
"#{merAccountId,jdbcType=BIGINT}, #{price,jdbcType=DECIMAL}, ", |
||||
"#{oilNoReliefPrice,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, ", |
||||
"#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, ", |
||||
"#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" |
||||
}) |
||||
@Options(useGeneratedKeys=true,keyProperty="id") |
||||
int insert(HighMerchantAccountMarketing record); |
||||
|
||||
@InsertProvider(type=HighMerchantAccountMarketingSqlProvider.class, method="insertSelective") |
||||
@Options(useGeneratedKeys=true,keyProperty="id") |
||||
int insertSelective(HighMerchantAccountMarketing record); |
||||
|
||||
@SelectProvider(type=HighMerchantAccountMarketingSqlProvider.class, method="selectByExample") |
||||
@Results({ |
||||
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), |
||||
@Result(column="type", property="type", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="mer_id", property="merId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="mer_account_id", property="merAccountId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="price", property="price", jdbcType=JdbcType.DECIMAL), |
||||
@Result(column="oil_no_relief_price", property="oilNoReliefPrice", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="update_time", property="updateTime", 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<HighMerchantAccountMarketing> selectByExample(HighMerchantAccountMarketingExample example); |
||||
|
||||
@Select({ |
||||
"select", |
||||
"id, `type`, mer_id, mer_account_id, price, oil_no_relief_price, `status`, create_time, ", |
||||
"update_time, ext_1, ext_2, ext_3", |
||||
"from high_merchant_account_marketing", |
||||
"where id = #{id,jdbcType=BIGINT}" |
||||
}) |
||||
@Results({ |
||||
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), |
||||
@Result(column="type", property="type", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="mer_id", property="merId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="mer_account_id", property="merAccountId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="price", property="price", jdbcType=JdbcType.DECIMAL), |
||||
@Result(column="oil_no_relief_price", property="oilNoReliefPrice", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="update_time", property="updateTime", 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) |
||||
}) |
||||
HighMerchantAccountMarketing selectByPrimaryKey(Long id); |
||||
|
||||
@UpdateProvider(type=HighMerchantAccountMarketingSqlProvider.class, method="updateByExampleSelective") |
||||
int updateByExampleSelective(@Param("record") HighMerchantAccountMarketing record, @Param("example") HighMerchantAccountMarketingExample example); |
||||
|
||||
@UpdateProvider(type=HighMerchantAccountMarketingSqlProvider.class, method="updateByExample") |
||||
int updateByExample(@Param("record") HighMerchantAccountMarketing record, @Param("example") HighMerchantAccountMarketingExample example); |
||||
|
||||
@UpdateProvider(type=HighMerchantAccountMarketingSqlProvider.class, method="updateByPrimaryKeySelective") |
||||
int updateByPrimaryKeySelective(HighMerchantAccountMarketing record); |
||||
|
||||
@Update({ |
||||
"update high_merchant_account_marketing", |
||||
"set `type` = #{type,jdbcType=INTEGER},", |
||||
"mer_id = #{merId,jdbcType=BIGINT},", |
||||
"mer_account_id = #{merAccountId,jdbcType=BIGINT},", |
||||
"price = #{price,jdbcType=DECIMAL},", |
||||
"oil_no_relief_price = #{oilNoReliefPrice,jdbcType=VARCHAR},", |
||||
"`status` = #{status,jdbcType=INTEGER},", |
||||
"create_time = #{createTime,jdbcType=TIMESTAMP},", |
||||
"update_time = #{updateTime,jdbcType=TIMESTAMP},", |
||||
"ext_1 = #{ext1,jdbcType=VARCHAR},", |
||||
"ext_2 = #{ext2,jdbcType=VARCHAR},", |
||||
"ext_3 = #{ext3,jdbcType=VARCHAR}", |
||||
"where id = #{id,jdbcType=BIGINT}" |
||||
}) |
||||
int updateByPrimaryKey(HighMerchantAccountMarketing record); |
||||
} |
@ -0,0 +1,7 @@ |
||||
package com.hai.dao; |
||||
|
||||
/** |
||||
* mapper扩展类 |
||||
*/ |
||||
public interface HighMerchantAccountMarketingMapperExt { |
||||
} |
@ -0,0 +1,332 @@ |
||||
package com.hai.dao; |
||||
|
||||
import com.hai.entity.HighMerchantAccountMarketing; |
||||
import com.hai.entity.HighMerchantAccountMarketingExample.Criteria; |
||||
import com.hai.entity.HighMerchantAccountMarketingExample.Criterion; |
||||
import com.hai.entity.HighMerchantAccountMarketingExample; |
||||
import java.util.List; |
||||
import java.util.Map; |
||||
import org.apache.ibatis.jdbc.SQL; |
||||
|
||||
public class HighMerchantAccountMarketingSqlProvider { |
||||
|
||||
public String countByExample(HighMerchantAccountMarketingExample example) { |
||||
SQL sql = new SQL(); |
||||
sql.SELECT("count(*)").FROM("high_merchant_account_marketing"); |
||||
applyWhere(sql, example, false); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String deleteByExample(HighMerchantAccountMarketingExample example) { |
||||
SQL sql = new SQL(); |
||||
sql.DELETE_FROM("high_merchant_account_marketing"); |
||||
applyWhere(sql, example, false); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String insertSelective(HighMerchantAccountMarketing record) { |
||||
SQL sql = new SQL(); |
||||
sql.INSERT_INTO("high_merchant_account_marketing"); |
||||
|
||||
if (record.getType() != null) { |
||||
sql.VALUES("`type`", "#{type,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getMerId() != null) { |
||||
sql.VALUES("mer_id", "#{merId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getMerAccountId() != null) { |
||||
sql.VALUES("mer_account_id", "#{merAccountId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getPrice() != null) { |
||||
sql.VALUES("price", "#{price,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getOilNoReliefPrice() != null) { |
||||
sql.VALUES("oil_no_relief_price", "#{oilNoReliefPrice,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.getUpdateTime() != null) { |
||||
sql.VALUES("update_time", "#{updateTime,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(HighMerchantAccountMarketingExample example) { |
||||
SQL sql = new SQL(); |
||||
if (example != null && example.isDistinct()) { |
||||
sql.SELECT_DISTINCT("id"); |
||||
} else { |
||||
sql.SELECT("id"); |
||||
} |
||||
sql.SELECT("`type`"); |
||||
sql.SELECT("mer_id"); |
||||
sql.SELECT("mer_account_id"); |
||||
sql.SELECT("price"); |
||||
sql.SELECT("oil_no_relief_price"); |
||||
sql.SELECT("`status`"); |
||||
sql.SELECT("create_time"); |
||||
sql.SELECT("update_time"); |
||||
sql.SELECT("ext_1"); |
||||
sql.SELECT("ext_2"); |
||||
sql.SELECT("ext_3"); |
||||
sql.FROM("high_merchant_account_marketing"); |
||||
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) { |
||||
HighMerchantAccountMarketing record = (HighMerchantAccountMarketing) parameter.get("record"); |
||||
HighMerchantAccountMarketingExample example = (HighMerchantAccountMarketingExample) parameter.get("example"); |
||||
|
||||
SQL sql = new SQL(); |
||||
sql.UPDATE("high_merchant_account_marketing"); |
||||
|
||||
if (record.getId() != null) { |
||||
sql.SET("id = #{record.id,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getType() != null) { |
||||
sql.SET("`type` = #{record.type,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getMerId() != null) { |
||||
sql.SET("mer_id = #{record.merId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getMerAccountId() != null) { |
||||
sql.SET("mer_account_id = #{record.merAccountId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getPrice() != null) { |
||||
sql.SET("price = #{record.price,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getOilNoReliefPrice() != null) { |
||||
sql.SET("oil_no_relief_price = #{record.oilNoReliefPrice,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.getUpdateTime() != null) { |
||||
sql.SET("update_time = #{record.updateTime,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("high_merchant_account_marketing"); |
||||
|
||||
sql.SET("id = #{record.id,jdbcType=BIGINT}"); |
||||
sql.SET("`type` = #{record.type,jdbcType=INTEGER}"); |
||||
sql.SET("mer_id = #{record.merId,jdbcType=BIGINT}"); |
||||
sql.SET("mer_account_id = #{record.merAccountId,jdbcType=BIGINT}"); |
||||
sql.SET("price = #{record.price,jdbcType=DECIMAL}"); |
||||
sql.SET("oil_no_relief_price = #{record.oilNoReliefPrice,jdbcType=VARCHAR}"); |
||||
sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); |
||||
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); |
||||
sql.SET("update_time = #{record.updateTime,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}"); |
||||
|
||||
HighMerchantAccountMarketingExample example = (HighMerchantAccountMarketingExample) parameter.get("example"); |
||||
applyWhere(sql, example, true); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String updateByPrimaryKeySelective(HighMerchantAccountMarketing record) { |
||||
SQL sql = new SQL(); |
||||
sql.UPDATE("high_merchant_account_marketing"); |
||||
|
||||
if (record.getType() != null) { |
||||
sql.SET("`type` = #{type,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getMerId() != null) { |
||||
sql.SET("mer_id = #{merId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getMerAccountId() != null) { |
||||
sql.SET("mer_account_id = #{merAccountId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getPrice() != null) { |
||||
sql.SET("price = #{price,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getOilNoReliefPrice() != null) { |
||||
sql.SET("oil_no_relief_price = #{oilNoReliefPrice,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.getUpdateTime() != null) { |
||||
sql.SET("update_time = #{updateTime,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, HighMerchantAccountMarketingExample 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,170 @@ |
||||
package com.hai.dao; |
||||
|
||||
import com.hai.entity.HighMerchantAccountRecord; |
||||
import com.hai.entity.HighMerchantAccountRecordExample; |
||||
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 HighMerchantAccountRecordMapper extends HighMerchantAccountRecordMapperExt { |
||||
@SelectProvider(type=HighMerchantAccountRecordSqlProvider.class, method="countByExample") |
||||
long countByExample(HighMerchantAccountRecordExample example); |
||||
|
||||
@DeleteProvider(type=HighMerchantAccountRecordSqlProvider.class, method="deleteByExample") |
||||
int deleteByExample(HighMerchantAccountRecordExample example); |
||||
|
||||
@Delete({ |
||||
"delete from high_merchant_account_record", |
||||
"where id = #{id,jdbcType=BIGINT}" |
||||
}) |
||||
int deleteByPrimaryKey(Long id); |
||||
|
||||
@Insert({ |
||||
"insert into high_merchant_account_record (mer_amount_id, mer_id, ", |
||||
"mer_name, `type`, amount, ", |
||||
"marketing_status, marketing_type, ", |
||||
"marketing_price, marketing_trade_price, ", |
||||
"trade_price, before_amount, ", |
||||
"after_amount, source_type, ", |
||||
"source_id, source_content, ", |
||||
"`status`, create_time, ", |
||||
"op_user_id, op_user_name, ", |
||||
"ext_1, ext_2, ext_3)", |
||||
"values (#{merAmountId,jdbcType=BIGINT}, #{merId,jdbcType=BIGINT}, ", |
||||
"#{merName,jdbcType=VARCHAR}, #{type,jdbcType=INTEGER}, #{amount,jdbcType=DECIMAL}, ", |
||||
"#{marketingStatus,jdbcType=BIT}, #{marketingType,jdbcType=INTEGER}, ", |
||||
"#{marketingPrice,jdbcType=DECIMAL}, #{marketingTradePrice,jdbcType=DECIMAL}, ", |
||||
"#{tradePrice,jdbcType=DECIMAL}, #{beforeAmount,jdbcType=DECIMAL}, ", |
||||
"#{afterAmount,jdbcType=DECIMAL}, #{sourceType,jdbcType=INTEGER}, ", |
||||
"#{sourceId,jdbcType=BIGINT}, #{sourceContent,jdbcType=VARCHAR}, ", |
||||
"#{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, ", |
||||
"#{opUserId,jdbcType=BIGINT}, #{opUserName,jdbcType=VARCHAR}, ", |
||||
"#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" |
||||
}) |
||||
@Options(useGeneratedKeys=true,keyProperty="id") |
||||
int insert(HighMerchantAccountRecord record); |
||||
|
||||
@InsertProvider(type=HighMerchantAccountRecordSqlProvider.class, method="insertSelective") |
||||
@Options(useGeneratedKeys=true,keyProperty="id") |
||||
int insertSelective(HighMerchantAccountRecord record); |
||||
|
||||
@SelectProvider(type=HighMerchantAccountRecordSqlProvider.class, method="selectByExample") |
||||
@Results({ |
||||
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), |
||||
@Result(column="mer_amount_id", property="merAmountId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="mer_id", property="merId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="mer_name", property="merName", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="type", property="type", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="amount", property="amount", jdbcType=JdbcType.DECIMAL), |
||||
@Result(column="marketing_status", property="marketingStatus", jdbcType=JdbcType.BIT), |
||||
@Result(column="marketing_type", property="marketingType", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="marketing_price", property="marketingPrice", jdbcType=JdbcType.DECIMAL), |
||||
@Result(column="marketing_trade_price", property="marketingTradePrice", jdbcType=JdbcType.DECIMAL), |
||||
@Result(column="trade_price", property="tradePrice", jdbcType=JdbcType.DECIMAL), |
||||
@Result(column="before_amount", property="beforeAmount", jdbcType=JdbcType.DECIMAL), |
||||
@Result(column="after_amount", property="afterAmount", jdbcType=JdbcType.DECIMAL), |
||||
@Result(column="source_type", property="sourceType", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="source_id", property="sourceId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="source_content", property="sourceContent", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="op_user_id", property="opUserId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="op_user_name", property="opUserName", 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<HighMerchantAccountRecord> selectByExample(HighMerchantAccountRecordExample example); |
||||
|
||||
@Select({ |
||||
"select", |
||||
"id, mer_amount_id, mer_id, mer_name, `type`, amount, marketing_status, marketing_type, ", |
||||
"marketing_price, marketing_trade_price, trade_price, before_amount, after_amount, ", |
||||
"source_type, source_id, source_content, `status`, create_time, op_user_id, op_user_name, ", |
||||
"ext_1, ext_2, ext_3", |
||||
"from high_merchant_account_record", |
||||
"where id = #{id,jdbcType=BIGINT}" |
||||
}) |
||||
@Results({ |
||||
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), |
||||
@Result(column="mer_amount_id", property="merAmountId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="mer_id", property="merId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="mer_name", property="merName", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="type", property="type", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="amount", property="amount", jdbcType=JdbcType.DECIMAL), |
||||
@Result(column="marketing_status", property="marketingStatus", jdbcType=JdbcType.BIT), |
||||
@Result(column="marketing_type", property="marketingType", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="marketing_price", property="marketingPrice", jdbcType=JdbcType.DECIMAL), |
||||
@Result(column="marketing_trade_price", property="marketingTradePrice", jdbcType=JdbcType.DECIMAL), |
||||
@Result(column="trade_price", property="tradePrice", jdbcType=JdbcType.DECIMAL), |
||||
@Result(column="before_amount", property="beforeAmount", jdbcType=JdbcType.DECIMAL), |
||||
@Result(column="after_amount", property="afterAmount", jdbcType=JdbcType.DECIMAL), |
||||
@Result(column="source_type", property="sourceType", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="source_id", property="sourceId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="source_content", property="sourceContent", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="op_user_id", property="opUserId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="op_user_name", property="opUserName", 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) |
||||
}) |
||||
HighMerchantAccountRecord selectByPrimaryKey(Long id); |
||||
|
||||
@UpdateProvider(type=HighMerchantAccountRecordSqlProvider.class, method="updateByExampleSelective") |
||||
int updateByExampleSelective(@Param("record") HighMerchantAccountRecord record, @Param("example") HighMerchantAccountRecordExample example); |
||||
|
||||
@UpdateProvider(type=HighMerchantAccountRecordSqlProvider.class, method="updateByExample") |
||||
int updateByExample(@Param("record") HighMerchantAccountRecord record, @Param("example") HighMerchantAccountRecordExample example); |
||||
|
||||
@UpdateProvider(type=HighMerchantAccountRecordSqlProvider.class, method="updateByPrimaryKeySelective") |
||||
int updateByPrimaryKeySelective(HighMerchantAccountRecord record); |
||||
|
||||
@Update({ |
||||
"update high_merchant_account_record", |
||||
"set mer_amount_id = #{merAmountId,jdbcType=BIGINT},", |
||||
"mer_id = #{merId,jdbcType=BIGINT},", |
||||
"mer_name = #{merName,jdbcType=VARCHAR},", |
||||
"`type` = #{type,jdbcType=INTEGER},", |
||||
"amount = #{amount,jdbcType=DECIMAL},", |
||||
"marketing_status = #{marketingStatus,jdbcType=BIT},", |
||||
"marketing_type = #{marketingType,jdbcType=INTEGER},", |
||||
"marketing_price = #{marketingPrice,jdbcType=DECIMAL},", |
||||
"marketing_trade_price = #{marketingTradePrice,jdbcType=DECIMAL},", |
||||
"trade_price = #{tradePrice,jdbcType=DECIMAL},", |
||||
"before_amount = #{beforeAmount,jdbcType=DECIMAL},", |
||||
"after_amount = #{afterAmount,jdbcType=DECIMAL},", |
||||
"source_type = #{sourceType,jdbcType=INTEGER},", |
||||
"source_id = #{sourceId,jdbcType=BIGINT},", |
||||
"source_content = #{sourceContent,jdbcType=VARCHAR},", |
||||
"`status` = #{status,jdbcType=INTEGER},", |
||||
"create_time = #{createTime,jdbcType=TIMESTAMP},", |
||||
"op_user_id = #{opUserId,jdbcType=BIGINT},", |
||||
"op_user_name = #{opUserName,jdbcType=VARCHAR},", |
||||
"ext_1 = #{ext1,jdbcType=VARCHAR},", |
||||
"ext_2 = #{ext2,jdbcType=VARCHAR},", |
||||
"ext_3 = #{ext3,jdbcType=VARCHAR}", |
||||
"where id = #{id,jdbcType=BIGINT}" |
||||
}) |
||||
int updateByPrimaryKey(HighMerchantAccountRecord record); |
||||
} |
@ -0,0 +1,7 @@ |
||||
package com.hai.dao; |
||||
|
||||
/** |
||||
* mapper扩展类 |
||||
*/ |
||||
public interface HighMerchantAccountRecordMapperExt { |
||||
} |
@ -0,0 +1,486 @@ |
||||
package com.hai.dao; |
||||
|
||||
import com.hai.entity.HighMerchantAccountRecord; |
||||
import com.hai.entity.HighMerchantAccountRecordExample.Criteria; |
||||
import com.hai.entity.HighMerchantAccountRecordExample.Criterion; |
||||
import com.hai.entity.HighMerchantAccountRecordExample; |
||||
import java.util.List; |
||||
import java.util.Map; |
||||
import org.apache.ibatis.jdbc.SQL; |
||||
|
||||
public class HighMerchantAccountRecordSqlProvider { |
||||
|
||||
public String countByExample(HighMerchantAccountRecordExample example) { |
||||
SQL sql = new SQL(); |
||||
sql.SELECT("count(*)").FROM("high_merchant_account_record"); |
||||
applyWhere(sql, example, false); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String deleteByExample(HighMerchantAccountRecordExample example) { |
||||
SQL sql = new SQL(); |
||||
sql.DELETE_FROM("high_merchant_account_record"); |
||||
applyWhere(sql, example, false); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String insertSelective(HighMerchantAccountRecord record) { |
||||
SQL sql = new SQL(); |
||||
sql.INSERT_INTO("high_merchant_account_record"); |
||||
|
||||
if (record.getMerAmountId() != null) { |
||||
sql.VALUES("mer_amount_id", "#{merAmountId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getMerId() != null) { |
||||
sql.VALUES("mer_id", "#{merId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getMerName() != null) { |
||||
sql.VALUES("mer_name", "#{merName,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getType() != null) { |
||||
sql.VALUES("`type`", "#{type,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getAmount() != null) { |
||||
sql.VALUES("amount", "#{amount,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getMarketingStatus() != null) { |
||||
sql.VALUES("marketing_status", "#{marketingStatus,jdbcType=BIT}"); |
||||
} |
||||
|
||||
if (record.getMarketingType() != null) { |
||||
sql.VALUES("marketing_type", "#{marketingType,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getMarketingPrice() != null) { |
||||
sql.VALUES("marketing_price", "#{marketingPrice,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getMarketingTradePrice() != null) { |
||||
sql.VALUES("marketing_trade_price", "#{marketingTradePrice,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getTradePrice() != null) { |
||||
sql.VALUES("trade_price", "#{tradePrice,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getBeforeAmount() != null) { |
||||
sql.VALUES("before_amount", "#{beforeAmount,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getAfterAmount() != null) { |
||||
sql.VALUES("after_amount", "#{afterAmount,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getSourceType() != null) { |
||||
sql.VALUES("source_type", "#{sourceType,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getSourceId() != null) { |
||||
sql.VALUES("source_id", "#{sourceId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getSourceContent() != null) { |
||||
sql.VALUES("source_content", "#{sourceContent,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.getOpUserId() != null) { |
||||
sql.VALUES("op_user_id", "#{opUserId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getOpUserName() != null) { |
||||
sql.VALUES("op_user_name", "#{opUserName,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(HighMerchantAccountRecordExample example) { |
||||
SQL sql = new SQL(); |
||||
if (example != null && example.isDistinct()) { |
||||
sql.SELECT_DISTINCT("id"); |
||||
} else { |
||||
sql.SELECT("id"); |
||||
} |
||||
sql.SELECT("mer_amount_id"); |
||||
sql.SELECT("mer_id"); |
||||
sql.SELECT("mer_name"); |
||||
sql.SELECT("`type`"); |
||||
sql.SELECT("amount"); |
||||
sql.SELECT("marketing_status"); |
||||
sql.SELECT("marketing_type"); |
||||
sql.SELECT("marketing_price"); |
||||
sql.SELECT("marketing_trade_price"); |
||||
sql.SELECT("trade_price"); |
||||
sql.SELECT("before_amount"); |
||||
sql.SELECT("after_amount"); |
||||
sql.SELECT("source_type"); |
||||
sql.SELECT("source_id"); |
||||
sql.SELECT("source_content"); |
||||
sql.SELECT("`status`"); |
||||
sql.SELECT("create_time"); |
||||
sql.SELECT("op_user_id"); |
||||
sql.SELECT("op_user_name"); |
||||
sql.SELECT("ext_1"); |
||||
sql.SELECT("ext_2"); |
||||
sql.SELECT("ext_3"); |
||||
sql.FROM("high_merchant_account_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) { |
||||
HighMerchantAccountRecord record = (HighMerchantAccountRecord) parameter.get("record"); |
||||
HighMerchantAccountRecordExample example = (HighMerchantAccountRecordExample) parameter.get("example"); |
||||
|
||||
SQL sql = new SQL(); |
||||
sql.UPDATE("high_merchant_account_record"); |
||||
|
||||
if (record.getId() != null) { |
||||
sql.SET("id = #{record.id,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getMerAmountId() != null) { |
||||
sql.SET("mer_amount_id = #{record.merAmountId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getMerId() != null) { |
||||
sql.SET("mer_id = #{record.merId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getMerName() != null) { |
||||
sql.SET("mer_name = #{record.merName,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getType() != null) { |
||||
sql.SET("`type` = #{record.type,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getAmount() != null) { |
||||
sql.SET("amount = #{record.amount,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getMarketingStatus() != null) { |
||||
sql.SET("marketing_status = #{record.marketingStatus,jdbcType=BIT}"); |
||||
} |
||||
|
||||
if (record.getMarketingType() != null) { |
||||
sql.SET("marketing_type = #{record.marketingType,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getMarketingPrice() != null) { |
||||
sql.SET("marketing_price = #{record.marketingPrice,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getMarketingTradePrice() != null) { |
||||
sql.SET("marketing_trade_price = #{record.marketingTradePrice,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getTradePrice() != null) { |
||||
sql.SET("trade_price = #{record.tradePrice,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getBeforeAmount() != null) { |
||||
sql.SET("before_amount = #{record.beforeAmount,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getAfterAmount() != null) { |
||||
sql.SET("after_amount = #{record.afterAmount,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getSourceType() != null) { |
||||
sql.SET("source_type = #{record.sourceType,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getSourceId() != null) { |
||||
sql.SET("source_id = #{record.sourceId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getSourceContent() != null) { |
||||
sql.SET("source_content = #{record.sourceContent,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.getOpUserId() != null) { |
||||
sql.SET("op_user_id = #{record.opUserId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getOpUserName() != null) { |
||||
sql.SET("op_user_name = #{record.opUserName,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getExt1() != null) { |
||||
sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getExt2() != null) { |
||||
sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getExt3() != null) { |
||||
sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
applyWhere(sql, example, true); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String updateByExample(Map<String, Object> parameter) { |
||||
SQL sql = new SQL(); |
||||
sql.UPDATE("high_merchant_account_record"); |
||||
|
||||
sql.SET("id = #{record.id,jdbcType=BIGINT}"); |
||||
sql.SET("mer_amount_id = #{record.merAmountId,jdbcType=BIGINT}"); |
||||
sql.SET("mer_id = #{record.merId,jdbcType=BIGINT}"); |
||||
sql.SET("mer_name = #{record.merName,jdbcType=VARCHAR}"); |
||||
sql.SET("`type` = #{record.type,jdbcType=INTEGER}"); |
||||
sql.SET("amount = #{record.amount,jdbcType=DECIMAL}"); |
||||
sql.SET("marketing_status = #{record.marketingStatus,jdbcType=BIT}"); |
||||
sql.SET("marketing_type = #{record.marketingType,jdbcType=INTEGER}"); |
||||
sql.SET("marketing_price = #{record.marketingPrice,jdbcType=DECIMAL}"); |
||||
sql.SET("marketing_trade_price = #{record.marketingTradePrice,jdbcType=DECIMAL}"); |
||||
sql.SET("trade_price = #{record.tradePrice,jdbcType=DECIMAL}"); |
||||
sql.SET("before_amount = #{record.beforeAmount,jdbcType=DECIMAL}"); |
||||
sql.SET("after_amount = #{record.afterAmount,jdbcType=DECIMAL}"); |
||||
sql.SET("source_type = #{record.sourceType,jdbcType=INTEGER}"); |
||||
sql.SET("source_id = #{record.sourceId,jdbcType=BIGINT}"); |
||||
sql.SET("source_content = #{record.sourceContent,jdbcType=VARCHAR}"); |
||||
sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); |
||||
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); |
||||
sql.SET("op_user_id = #{record.opUserId,jdbcType=BIGINT}"); |
||||
sql.SET("op_user_name = #{record.opUserName,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}"); |
||||
|
||||
HighMerchantAccountRecordExample example = (HighMerchantAccountRecordExample) parameter.get("example"); |
||||
applyWhere(sql, example, true); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String updateByPrimaryKeySelective(HighMerchantAccountRecord record) { |
||||
SQL sql = new SQL(); |
||||
sql.UPDATE("high_merchant_account_record"); |
||||
|
||||
if (record.getMerAmountId() != null) { |
||||
sql.SET("mer_amount_id = #{merAmountId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getMerId() != null) { |
||||
sql.SET("mer_id = #{merId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getMerName() != null) { |
||||
sql.SET("mer_name = #{merName,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getType() != null) { |
||||
sql.SET("`type` = #{type,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getAmount() != null) { |
||||
sql.SET("amount = #{amount,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getMarketingStatus() != null) { |
||||
sql.SET("marketing_status = #{marketingStatus,jdbcType=BIT}"); |
||||
} |
||||
|
||||
if (record.getMarketingType() != null) { |
||||
sql.SET("marketing_type = #{marketingType,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getMarketingPrice() != null) { |
||||
sql.SET("marketing_price = #{marketingPrice,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getMarketingTradePrice() != null) { |
||||
sql.SET("marketing_trade_price = #{marketingTradePrice,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getTradePrice() != null) { |
||||
sql.SET("trade_price = #{tradePrice,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getBeforeAmount() != null) { |
||||
sql.SET("before_amount = #{beforeAmount,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getAfterAmount() != null) { |
||||
sql.SET("after_amount = #{afterAmount,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getSourceType() != null) { |
||||
sql.SET("source_type = #{sourceType,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getSourceId() != null) { |
||||
sql.SET("source_id = #{sourceId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getSourceContent() != null) { |
||||
sql.SET("source_content = #{sourceContent,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.getOpUserId() != null) { |
||||
sql.SET("op_user_id = #{opUserId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getOpUserName() != null) { |
||||
sql.SET("op_user_name = #{opUserName,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, HighMerchantAccountRecordExample 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,230 @@ |
||||
package com.hai.entity; |
||||
|
||||
import java.io.Serializable; |
||||
import java.math.BigDecimal; |
||||
import java.util.Date; |
||||
|
||||
/** |
||||
* high_merchant_account_marketing |
||||
* @author |
||||
*/ |
||||
/** |
||||
* |
||||
* 代码由工具生成 |
||||
* |
||||
**/ |
||||
public class HighMerchantAccountMarketing implements Serializable { |
||||
private Long id; |
||||
|
||||
/** |
||||
* 类型 1. 充值赠送 2. 充值返点 3. 加油减免 |
||||
*/ |
||||
private Integer type; |
||||
|
||||
/** |
||||
* 商户id |
||||
*/ |
||||
private Long merId; |
||||
|
||||
/** |
||||
* 商户账户id |
||||
*/ |
||||
private Long merAccountId; |
||||
|
||||
/** |
||||
* 金额 类型为 1,2才会使用此字段 |
||||
*/ |
||||
private BigDecimal price; |
||||
|
||||
/** |
||||
* 油品金额减免,JSON数据。类型为3才会使用此字段 |
||||
*/ |
||||
private String oilNoReliefPrice; |
||||
|
||||
/** |
||||
* 状态 0:删除 1:正常 |
||||
*/ |
||||
private Integer status; |
||||
|
||||
/** |
||||
* 创建时间 |
||||
*/ |
||||
private Date createTime; |
||||
|
||||
/** |
||||
* 修改时间 |
||||
*/ |
||||
private Date updateTime; |
||||
|
||||
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 Integer getType() { |
||||
return type; |
||||
} |
||||
|
||||
public void setType(Integer type) { |
||||
this.type = type; |
||||
} |
||||
|
||||
public Long getMerId() { |
||||
return merId; |
||||
} |
||||
|
||||
public void setMerId(Long merId) { |
||||
this.merId = merId; |
||||
} |
||||
|
||||
public Long getMerAccountId() { |
||||
return merAccountId; |
||||
} |
||||
|
||||
public void setMerAccountId(Long merAccountId) { |
||||
this.merAccountId = merAccountId; |
||||
} |
||||
|
||||
public BigDecimal getPrice() { |
||||
return price; |
||||
} |
||||
|
||||
public void setPrice(BigDecimal price) { |
||||
this.price = price; |
||||
} |
||||
|
||||
public String getOilNoReliefPrice() { |
||||
return oilNoReliefPrice; |
||||
} |
||||
|
||||
public void setOilNoReliefPrice(String oilNoReliefPrice) { |
||||
this.oilNoReliefPrice = oilNoReliefPrice; |
||||
} |
||||
|
||||
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 Date getUpdateTime() { |
||||
return updateTime; |
||||
} |
||||
|
||||
public void setUpdateTime(Date updateTime) { |
||||
this.updateTime = updateTime; |
||||
} |
||||
|
||||
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; |
||||
} |
||||
HighMerchantAccountMarketing other = (HighMerchantAccountMarketing) that; |
||||
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) |
||||
&& (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType())) |
||||
&& (this.getMerId() == null ? other.getMerId() == null : this.getMerId().equals(other.getMerId())) |
||||
&& (this.getMerAccountId() == null ? other.getMerAccountId() == null : this.getMerAccountId().equals(other.getMerAccountId())) |
||||
&& (this.getPrice() == null ? other.getPrice() == null : this.getPrice().equals(other.getPrice())) |
||||
&& (this.getOilNoReliefPrice() == null ? other.getOilNoReliefPrice() == null : this.getOilNoReliefPrice().equals(other.getOilNoReliefPrice())) |
||||
&& (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) |
||||
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) |
||||
&& (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime())) |
||||
&& (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 + ((getType() == null) ? 0 : getType().hashCode()); |
||||
result = prime * result + ((getMerId() == null) ? 0 : getMerId().hashCode()); |
||||
result = prime * result + ((getMerAccountId() == null) ? 0 : getMerAccountId().hashCode()); |
||||
result = prime * result + ((getPrice() == null) ? 0 : getPrice().hashCode()); |
||||
result = prime * result + ((getOilNoReliefPrice() == null) ? 0 : getOilNoReliefPrice().hashCode()); |
||||
result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); |
||||
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); |
||||
result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().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(", type=").append(type); |
||||
sb.append(", merId=").append(merId); |
||||
sb.append(", merAccountId=").append(merAccountId); |
||||
sb.append(", price=").append(price); |
||||
sb.append(", oilNoReliefPrice=").append(oilNoReliefPrice); |
||||
sb.append(", status=").append(status); |
||||
sb.append(", createTime=").append(createTime); |
||||
sb.append(", updateTime=").append(updateTime); |
||||
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,984 @@ |
||||
package com.hai.entity; |
||||
|
||||
import java.math.BigDecimal; |
||||
import java.util.ArrayList; |
||||
import java.util.Date; |
||||
import java.util.List; |
||||
|
||||
public class HighMerchantAccountMarketingExample { |
||||
protected String orderByClause; |
||||
|
||||
protected boolean distinct; |
||||
|
||||
protected List<Criteria> oredCriteria; |
||||
|
||||
private Integer limit; |
||||
|
||||
private Long offset; |
||||
|
||||
public HighMerchantAccountMarketingExample() { |
||||
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(Long value) { |
||||
addCriterion("id =", value, "id"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andIdNotEqualTo(Long value) { |
||||
addCriterion("id <>", value, "id"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andIdGreaterThan(Long value) { |
||||
addCriterion("id >", value, "id"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andIdGreaterThanOrEqualTo(Long value) { |
||||
addCriterion("id >=", value, "id"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andIdLessThan(Long value) { |
||||
addCriterion("id <", value, "id"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andIdLessThanOrEqualTo(Long value) { |
||||
addCriterion("id <=", value, "id"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andIdIn(List<Long> values) { |
||||
addCriterion("id in", values, "id"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andIdNotIn(List<Long> values) { |
||||
addCriterion("id not in", values, "id"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andIdBetween(Long value1, Long value2) { |
||||
addCriterion("id between", value1, value2, "id"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andIdNotBetween(Long value1, Long value2) { |
||||
addCriterion("id not between", value1, value2, "id"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andTypeIsNull() { |
||||
addCriterion("`type` is null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andTypeIsNotNull() { |
||||
addCriterion("`type` is not null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andTypeEqualTo(Integer value) { |
||||
addCriterion("`type` =", value, "type"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andTypeNotEqualTo(Integer value) { |
||||
addCriterion("`type` <>", value, "type"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andTypeGreaterThan(Integer value) { |
||||
addCriterion("`type` >", value, "type"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andTypeGreaterThanOrEqualTo(Integer value) { |
||||
addCriterion("`type` >=", value, "type"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andTypeLessThan(Integer value) { |
||||
addCriterion("`type` <", value, "type"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andTypeLessThanOrEqualTo(Integer value) { |
||||
addCriterion("`type` <=", value, "type"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andTypeIn(List<Integer> values) { |
||||
addCriterion("`type` in", values, "type"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andTypeNotIn(List<Integer> values) { |
||||
addCriterion("`type` not in", values, "type"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andTypeBetween(Integer value1, Integer value2) { |
||||
addCriterion("`type` between", value1, value2, "type"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andTypeNotBetween(Integer value1, Integer value2) { |
||||
addCriterion("`type` not between", value1, value2, "type"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andMerIdIsNull() { |
||||
addCriterion("mer_id is null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andMerIdIsNotNull() { |
||||
addCriterion("mer_id is not null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andMerIdEqualTo(Long value) { |
||||
addCriterion("mer_id =", value, "merId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andMerIdNotEqualTo(Long value) { |
||||
addCriterion("mer_id <>", value, "merId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andMerIdGreaterThan(Long value) { |
||||
addCriterion("mer_id >", value, "merId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andMerIdGreaterThanOrEqualTo(Long value) { |
||||
addCriterion("mer_id >=", value, "merId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andMerIdLessThan(Long value) { |
||||
addCriterion("mer_id <", value, "merId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andMerIdLessThanOrEqualTo(Long value) { |
||||
addCriterion("mer_id <=", value, "merId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andMerIdIn(List<Long> values) { |
||||
addCriterion("mer_id in", values, "merId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andMerIdNotIn(List<Long> values) { |
||||
addCriterion("mer_id not in", values, "merId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andMerIdBetween(Long value1, Long value2) { |
||||
addCriterion("mer_id between", value1, value2, "merId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andMerIdNotBetween(Long value1, Long value2) { |
||||
addCriterion("mer_id not between", value1, value2, "merId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andMerAccountIdIsNull() { |
||||
addCriterion("mer_account_id is null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andMerAccountIdIsNotNull() { |
||||
addCriterion("mer_account_id is not null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andMerAccountIdEqualTo(Long value) { |
||||
addCriterion("mer_account_id =", value, "merAccountId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andMerAccountIdNotEqualTo(Long value) { |
||||
addCriterion("mer_account_id <>", value, "merAccountId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andMerAccountIdGreaterThan(Long value) { |
||||
addCriterion("mer_account_id >", value, "merAccountId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andMerAccountIdGreaterThanOrEqualTo(Long value) { |
||||
addCriterion("mer_account_id >=", value, "merAccountId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andMerAccountIdLessThan(Long value) { |
||||
addCriterion("mer_account_id <", value, "merAccountId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andMerAccountIdLessThanOrEqualTo(Long value) { |
||||
addCriterion("mer_account_id <=", value, "merAccountId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andMerAccountIdIn(List<Long> values) { |
||||
addCriterion("mer_account_id in", values, "merAccountId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andMerAccountIdNotIn(List<Long> values) { |
||||
addCriterion("mer_account_id not in", values, "merAccountId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andMerAccountIdBetween(Long value1, Long value2) { |
||||
addCriterion("mer_account_id between", value1, value2, "merAccountId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andMerAccountIdNotBetween(Long value1, Long value2) { |
||||
addCriterion("mer_account_id not between", value1, value2, "merAccountId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andPriceIsNull() { |
||||
addCriterion("price is null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andPriceIsNotNull() { |
||||
addCriterion("price is not null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andPriceEqualTo(BigDecimal value) { |
||||
addCriterion("price =", value, "price"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andPriceNotEqualTo(BigDecimal value) { |
||||
addCriterion("price <>", value, "price"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andPriceGreaterThan(BigDecimal value) { |
||||
addCriterion("price >", value, "price"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andPriceGreaterThanOrEqualTo(BigDecimal value) { |
||||
addCriterion("price >=", value, "price"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andPriceLessThan(BigDecimal value) { |
||||
addCriterion("price <", value, "price"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andPriceLessThanOrEqualTo(BigDecimal value) { |
||||
addCriterion("price <=", value, "price"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andPriceIn(List<BigDecimal> values) { |
||||
addCriterion("price in", values, "price"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andPriceNotIn(List<BigDecimal> values) { |
||||
addCriterion("price not in", values, "price"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andPriceBetween(BigDecimal value1, BigDecimal value2) { |
||||
addCriterion("price between", value1, value2, "price"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andPriceNotBetween(BigDecimal value1, BigDecimal value2) { |
||||
addCriterion("price not between", value1, value2, "price"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andOilNoReliefPriceIsNull() { |
||||
addCriterion("oil_no_relief_price is null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andOilNoReliefPriceIsNotNull() { |
||||
addCriterion("oil_no_relief_price is not null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andOilNoReliefPriceEqualTo(String value) { |
||||
addCriterion("oil_no_relief_price =", value, "oilNoReliefPrice"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andOilNoReliefPriceNotEqualTo(String value) { |
||||
addCriterion("oil_no_relief_price <>", value, "oilNoReliefPrice"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andOilNoReliefPriceGreaterThan(String value) { |
||||
addCriterion("oil_no_relief_price >", value, "oilNoReliefPrice"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andOilNoReliefPriceGreaterThanOrEqualTo(String value) { |
||||
addCriterion("oil_no_relief_price >=", value, "oilNoReliefPrice"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andOilNoReliefPriceLessThan(String value) { |
||||
addCriterion("oil_no_relief_price <", value, "oilNoReliefPrice"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andOilNoReliefPriceLessThanOrEqualTo(String value) { |
||||
addCriterion("oil_no_relief_price <=", value, "oilNoReliefPrice"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andOilNoReliefPriceLike(String value) { |
||||
addCriterion("oil_no_relief_price like", value, "oilNoReliefPrice"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andOilNoReliefPriceNotLike(String value) { |
||||
addCriterion("oil_no_relief_price not like", value, "oilNoReliefPrice"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andOilNoReliefPriceIn(List<String> values) { |
||||
addCriterion("oil_no_relief_price in", values, "oilNoReliefPrice"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andOilNoReliefPriceNotIn(List<String> values) { |
||||
addCriterion("oil_no_relief_price not in", values, "oilNoReliefPrice"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andOilNoReliefPriceBetween(String value1, String value2) { |
||||
addCriterion("oil_no_relief_price between", value1, value2, "oilNoReliefPrice"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andOilNoReliefPriceNotBetween(String value1, String value2) { |
||||
addCriterion("oil_no_relief_price not between", value1, value2, "oilNoReliefPrice"); |
||||
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 andCreateTimeIsNull() { |
||||
addCriterion("create_time is null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCreateTimeIsNotNull() { |
||||
addCriterion("create_time is not null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCreateTimeEqualTo(Date value) { |
||||
addCriterion("create_time =", value, "createTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCreateTimeNotEqualTo(Date value) { |
||||
addCriterion("create_time <>", value, "createTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCreateTimeGreaterThan(Date value) { |
||||
addCriterion("create_time >", value, "createTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) { |
||||
addCriterion("create_time >=", value, "createTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCreateTimeLessThan(Date value) { |
||||
addCriterion("create_time <", value, "createTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCreateTimeLessThanOrEqualTo(Date value) { |
||||
addCriterion("create_time <=", value, "createTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCreateTimeIn(List<Date> values) { |
||||
addCriterion("create_time in", values, "createTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCreateTimeNotIn(List<Date> values) { |
||||
addCriterion("create_time not in", values, "createTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCreateTimeBetween(Date value1, Date value2) { |
||||
addCriterion("create_time between", value1, value2, "createTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCreateTimeNotBetween(Date value1, Date value2) { |
||||
addCriterion("create_time not between", value1, value2, "createTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUpdateTimeIsNull() { |
||||
addCriterion("update_time is null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUpdateTimeIsNotNull() { |
||||
addCriterion("update_time is not null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUpdateTimeEqualTo(Date value) { |
||||
addCriterion("update_time =", value, "updateTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUpdateTimeNotEqualTo(Date value) { |
||||
addCriterion("update_time <>", value, "updateTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUpdateTimeGreaterThan(Date value) { |
||||
addCriterion("update_time >", value, "updateTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) { |
||||
addCriterion("update_time >=", value, "updateTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUpdateTimeLessThan(Date value) { |
||||
addCriterion("update_time <", value, "updateTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUpdateTimeLessThanOrEqualTo(Date value) { |
||||
addCriterion("update_time <=", value, "updateTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUpdateTimeIn(List<Date> values) { |
||||
addCriterion("update_time in", values, "updateTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUpdateTimeNotIn(List<Date> values) { |
||||
addCriterion("update_time not in", values, "updateTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUpdateTimeBetween(Date value1, Date value2) { |
||||
addCriterion("update_time between", value1, value2, "updateTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUpdateTimeNotBetween(Date value1, Date value2) { |
||||
addCriterion("update_time not between", value1, value2, "updateTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria 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); |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,406 @@ |
||||
package com.hai.entity; |
||||
|
||||
import java.io.Serializable; |
||||
import java.math.BigDecimal; |
||||
import java.util.Date; |
||||
|
||||
/** |
||||
* high_merchant_account_record |
||||
* @author |
||||
*/ |
||||
/** |
||||
* |
||||
* 代码由工具生成 |
||||
* |
||||
**/ |
||||
public class HighMerchantAccountRecord implements Serializable { |
||||
private Long id; |
||||
|
||||
/** |
||||
* 商户账户表id |
||||
*/ |
||||
private Long merAmountId; |
||||
|
||||
/** |
||||
* 商户id |
||||
*/ |
||||
private Long merId; |
||||
|
||||
/** |
||||
* 商户名称 |
||||
*/ |
||||
private String merName; |
||||
|
||||
/** |
||||
* 类型 1:进账 2:出账 |
||||
*/ |
||||
private Integer type; |
||||
|
||||
/** |
||||
* 账户金额 |
||||
*/ |
||||
private BigDecimal amount; |
||||
|
||||
/** |
||||
* 参与营销 0:否 1:是 |
||||
*/ |
||||
private Boolean marketingStatus; |
||||
|
||||
/** |
||||
* 营销类型 1:赠送金额 2:充值返点 |
||||
*/ |
||||
private Integer marketingType; |
||||
|
||||
/** |
||||
* 营销金额 |
||||
*/ |
||||
private BigDecimal marketingPrice; |
||||
|
||||
/** |
||||
* 营销交易金额 |
||||
*/ |
||||
private BigDecimal marketingTradePrice; |
||||
|
||||
/** |
||||
* 交易金额 |
||||
*/ |
||||
private BigDecimal tradePrice; |
||||
|
||||
/** |
||||
* 变更前金额 |
||||
*/ |
||||
private BigDecimal beforeAmount; |
||||
|
||||
/** |
||||
* 变更后金额 |
||||
*/ |
||||
private BigDecimal afterAmount; |
||||
|
||||
/** |
||||
* 来源类型 1.金额充值 2. 订单消费 3.订单退款 |
||||
*/ |
||||
private Integer sourceType; |
||||
|
||||
/** |
||||
* 来源id |
||||
*/ |
||||
private Long sourceId; |
||||
|
||||
/** |
||||
* 来源内容 |
||||
*/ |
||||
private String sourceContent; |
||||
|
||||
/** |
||||
* 状态 0:删除 1:正常 |
||||
*/ |
||||
private Integer status; |
||||
|
||||
/** |
||||
* 创建时间 |
||||
*/ |
||||
private Date createTime; |
||||
|
||||
/** |
||||
* 操作人id |
||||
*/ |
||||
private Long opUserId; |
||||
|
||||
/** |
||||
* 操作人名称 |
||||
*/ |
||||
private String opUserName; |
||||
|
||||
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 getMerAmountId() { |
||||
return merAmountId; |
||||
} |
||||
|
||||
public void setMerAmountId(Long merAmountId) { |
||||
this.merAmountId = merAmountId; |
||||
} |
||||
|
||||
public Long getMerId() { |
||||
return merId; |
||||
} |
||||
|
||||
public void setMerId(Long merId) { |
||||
this.merId = merId; |
||||
} |
||||
|
||||
public String getMerName() { |
||||
return merName; |
||||
} |
||||
|
||||
public void setMerName(String merName) { |
||||
this.merName = merName; |
||||
} |
||||
|
||||
public Integer getType() { |
||||
return type; |
||||
} |
||||
|
||||
public void setType(Integer type) { |
||||
this.type = type; |
||||
} |
||||
|
||||
public BigDecimal getAmount() { |
||||
return amount; |
||||
} |
||||
|
||||
public void setAmount(BigDecimal amount) { |
||||
this.amount = amount; |
||||
} |
||||
|
||||
public Boolean getMarketingStatus() { |
||||
return marketingStatus; |
||||
} |
||||
|
||||
public void setMarketingStatus(Boolean marketingStatus) { |
||||
this.marketingStatus = marketingStatus; |
||||
} |
||||
|
||||
public Integer getMarketingType() { |
||||
return marketingType; |
||||
} |
||||
|
||||
public void setMarketingType(Integer marketingType) { |
||||
this.marketingType = marketingType; |
||||
} |
||||
|
||||
public BigDecimal getMarketingPrice() { |
||||
return marketingPrice; |
||||
} |
||||
|
||||
public void setMarketingPrice(BigDecimal marketingPrice) { |
||||
this.marketingPrice = marketingPrice; |
||||
} |
||||
|
||||
public BigDecimal getMarketingTradePrice() { |
||||
return marketingTradePrice; |
||||
} |
||||
|
||||
public void setMarketingTradePrice(BigDecimal marketingTradePrice) { |
||||
this.marketingTradePrice = marketingTradePrice; |
||||
} |
||||
|
||||
public BigDecimal getTradePrice() { |
||||
return tradePrice; |
||||
} |
||||
|
||||
public void setTradePrice(BigDecimal tradePrice) { |
||||
this.tradePrice = tradePrice; |
||||
} |
||||
|
||||
public BigDecimal getBeforeAmount() { |
||||
return beforeAmount; |
||||
} |
||||
|
||||
public void setBeforeAmount(BigDecimal beforeAmount) { |
||||
this.beforeAmount = beforeAmount; |
||||
} |
||||
|
||||
public BigDecimal getAfterAmount() { |
||||
return afterAmount; |
||||
} |
||||
|
||||
public void setAfterAmount(BigDecimal afterAmount) { |
||||
this.afterAmount = afterAmount; |
||||
} |
||||
|
||||
public Integer getSourceType() { |
||||
return sourceType; |
||||
} |
||||
|
||||
public void setSourceType(Integer sourceType) { |
||||
this.sourceType = sourceType; |
||||
} |
||||
|
||||
public Long getSourceId() { |
||||
return sourceId; |
||||
} |
||||
|
||||
public void setSourceId(Long sourceId) { |
||||
this.sourceId = sourceId; |
||||
} |
||||
|
||||
public String getSourceContent() { |
||||
return sourceContent; |
||||
} |
||||
|
||||
public void setSourceContent(String sourceContent) { |
||||
this.sourceContent = sourceContent; |
||||
} |
||||
|
||||
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 getOpUserId() { |
||||
return opUserId; |
||||
} |
||||
|
||||
public void setOpUserId(Long opUserId) { |
||||
this.opUserId = opUserId; |
||||
} |
||||
|
||||
public String getOpUserName() { |
||||
return opUserName; |
||||
} |
||||
|
||||
public void setOpUserName(String opUserName) { |
||||
this.opUserName = opUserName; |
||||
} |
||||
|
||||
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; |
||||
} |
||||
HighMerchantAccountRecord other = (HighMerchantAccountRecord) that; |
||||
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) |
||||
&& (this.getMerAmountId() == null ? other.getMerAmountId() == null : this.getMerAmountId().equals(other.getMerAmountId())) |
||||
&& (this.getMerId() == null ? other.getMerId() == null : this.getMerId().equals(other.getMerId())) |
||||
&& (this.getMerName() == null ? other.getMerName() == null : this.getMerName().equals(other.getMerName())) |
||||
&& (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType())) |
||||
&& (this.getAmount() == null ? other.getAmount() == null : this.getAmount().equals(other.getAmount())) |
||||
&& (this.getMarketingStatus() == null ? other.getMarketingStatus() == null : this.getMarketingStatus().equals(other.getMarketingStatus())) |
||||
&& (this.getMarketingType() == null ? other.getMarketingType() == null : this.getMarketingType().equals(other.getMarketingType())) |
||||
&& (this.getMarketingPrice() == null ? other.getMarketingPrice() == null : this.getMarketingPrice().equals(other.getMarketingPrice())) |
||||
&& (this.getMarketingTradePrice() == null ? other.getMarketingTradePrice() == null : this.getMarketingTradePrice().equals(other.getMarketingTradePrice())) |
||||
&& (this.getTradePrice() == null ? other.getTradePrice() == null : this.getTradePrice().equals(other.getTradePrice())) |
||||
&& (this.getBeforeAmount() == null ? other.getBeforeAmount() == null : this.getBeforeAmount().equals(other.getBeforeAmount())) |
||||
&& (this.getAfterAmount() == null ? other.getAfterAmount() == null : this.getAfterAmount().equals(other.getAfterAmount())) |
||||
&& (this.getSourceType() == null ? other.getSourceType() == null : this.getSourceType().equals(other.getSourceType())) |
||||
&& (this.getSourceId() == null ? other.getSourceId() == null : this.getSourceId().equals(other.getSourceId())) |
||||
&& (this.getSourceContent() == null ? other.getSourceContent() == null : this.getSourceContent().equals(other.getSourceContent())) |
||||
&& (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) |
||||
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) |
||||
&& (this.getOpUserId() == null ? other.getOpUserId() == null : this.getOpUserId().equals(other.getOpUserId())) |
||||
&& (this.getOpUserName() == null ? other.getOpUserName() == null : this.getOpUserName().equals(other.getOpUserName())) |
||||
&& (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 + ((getMerAmountId() == null) ? 0 : getMerAmountId().hashCode()); |
||||
result = prime * result + ((getMerId() == null) ? 0 : getMerId().hashCode()); |
||||
result = prime * result + ((getMerName() == null) ? 0 : getMerName().hashCode()); |
||||
result = prime * result + ((getType() == null) ? 0 : getType().hashCode()); |
||||
result = prime * result + ((getAmount() == null) ? 0 : getAmount().hashCode()); |
||||
result = prime * result + ((getMarketingStatus() == null) ? 0 : getMarketingStatus().hashCode()); |
||||
result = prime * result + ((getMarketingType() == null) ? 0 : getMarketingType().hashCode()); |
||||
result = prime * result + ((getMarketingPrice() == null) ? 0 : getMarketingPrice().hashCode()); |
||||
result = prime * result + ((getMarketingTradePrice() == null) ? 0 : getMarketingTradePrice().hashCode()); |
||||
result = prime * result + ((getTradePrice() == null) ? 0 : getTradePrice().hashCode()); |
||||
result = prime * result + ((getBeforeAmount() == null) ? 0 : getBeforeAmount().hashCode()); |
||||
result = prime * result + ((getAfterAmount() == null) ? 0 : getAfterAmount().hashCode()); |
||||
result = prime * result + ((getSourceType() == null) ? 0 : getSourceType().hashCode()); |
||||
result = prime * result + ((getSourceId() == null) ? 0 : getSourceId().hashCode()); |
||||
result = prime * result + ((getSourceContent() == null) ? 0 : getSourceContent().hashCode()); |
||||
result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); |
||||
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); |
||||
result = prime * result + ((getOpUserId() == null) ? 0 : getOpUserId().hashCode()); |
||||
result = prime * result + ((getOpUserName() == null) ? 0 : getOpUserName().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(", merAmountId=").append(merAmountId); |
||||
sb.append(", merId=").append(merId); |
||||
sb.append(", merName=").append(merName); |
||||
sb.append(", type=").append(type); |
||||
sb.append(", amount=").append(amount); |
||||
sb.append(", marketingStatus=").append(marketingStatus); |
||||
sb.append(", marketingType=").append(marketingType); |
||||
sb.append(", marketingPrice=").append(marketingPrice); |
||||
sb.append(", marketingTradePrice=").append(marketingTradePrice); |
||||
sb.append(", tradePrice=").append(tradePrice); |
||||
sb.append(", beforeAmount=").append(beforeAmount); |
||||
sb.append(", afterAmount=").append(afterAmount); |
||||
sb.append(", sourceType=").append(sourceType); |
||||
sb.append(", sourceId=").append(sourceId); |
||||
sb.append(", sourceContent=").append(sourceContent); |
||||
sb.append(", status=").append(status); |
||||
sb.append(", createTime=").append(createTime); |
||||
sb.append(", opUserId=").append(opUserId); |
||||
sb.append(", opUserName=").append(opUserName); |
||||
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,36 @@ |
||||
package com.hai.enum_type; |
||||
|
||||
/** |
||||
* 商户账户营销类型 |
||||
* @author hurui |
||||
*/ |
||||
public enum MerAccountMarketingType { |
||||
type1(1 , "充值赠送"), |
||||
type2(2 , "充值返点"), |
||||
type3(3 , "加油减免"), |
||||
; |
||||
|
||||
private Integer type; |
||||
private String name; |
||||
|
||||
MerAccountMarketingType(int type , String name) { |
||||
this.type = type; |
||||
this.name = name; |
||||
} |
||||
|
||||
public Integer getType() { |
||||
return type; |
||||
} |
||||
|
||||
public void setType(Integer type) { |
||||
this.type = type; |
||||
} |
||||
|
||||
public String getName() { |
||||
return name; |
||||
} |
||||
|
||||
public void setName(String name) { |
||||
this.name = name; |
||||
} |
||||
} |
@ -0,0 +1,37 @@ |
||||
package com.hai.enum_type; |
||||
|
||||
/** |
||||
* 商户账户记录来源 |
||||
* @author hurui |
||||
*/ |
||||
public enum MerAmountSourceTypeEnum { |
||||
type1(1, "金额充值"), |
||||
type2(2, "订单消费"), |
||||
type3(3, "订单退款"), |
||||
; |
||||
|
||||
private Integer type; |
||||
|
||||
private String name; |
||||
|
||||
MerAmountSourceTypeEnum(int type, String name) { |
||||
this.type = type; |
||||
this.name = name; |
||||
} |
||||
|
||||
public Integer getType() { |
||||
return type; |
||||
} |
||||
|
||||
public void setType(Integer type) { |
||||
this.type = type; |
||||
} |
||||
|
||||
public String getName() { |
||||
return name; |
||||
} |
||||
|
||||
public void setName(String name) { |
||||
this.name = name; |
||||
} |
||||
} |
@ -0,0 +1,36 @@ |
||||
package com.hai.enum_type; |
||||
|
||||
/** |
||||
* 商户账户记录类型 |
||||
* @author hurui |
||||
*/ |
||||
public enum MerAmountTypeEnum { |
||||
type1(1, "进账"), |
||||
type2(2, "出账") |
||||
; |
||||
|
||||
private Integer type; |
||||
|
||||
private String name; |
||||
|
||||
MerAmountTypeEnum(int type, String name) { |
||||
this.type = type; |
||||
this.name = name; |
||||
} |
||||
|
||||
public Integer getType() { |
||||
return type; |
||||
} |
||||
|
||||
public void setType(Integer type) { |
||||
this.type = type; |
||||
} |
||||
|
||||
public String getName() { |
||||
return name; |
||||
} |
||||
|
||||
public void setName(String name) { |
||||
this.name = name; |
||||
} |
||||
} |
@ -0,0 +1,40 @@ |
||||
package com.hai.service; |
||||
|
||||
import com.hai.entity.HighMerchantAccountMarketing; |
||||
|
||||
import java.math.BigDecimal; |
||||
|
||||
/** |
||||
* 商户账户营销配置 |
||||
*/ |
||||
public interface HighMerchantAccountMarketingService { |
||||
|
||||
/** |
||||
* 增加 |
||||
* @param merchantAccountMarketing |
||||
*/ |
||||
void insert(HighMerchantAccountMarketing merchantAccountMarketing); |
||||
|
||||
/** |
||||
* 修改 |
||||
* @param merchantAccountMarketing |
||||
*/ |
||||
void update(HighMerchantAccountMarketing merchantAccountMarketing); |
||||
|
||||
/** |
||||
* 查询详情 |
||||
* @param merId |
||||
* @param type |
||||
* @return |
||||
*/ |
||||
HighMerchantAccountMarketing getDetailByMerAndType(Long merId,Integer type); |
||||
|
||||
/** |
||||
* 查询价格 |
||||
* @param merId |
||||
* @param type |
||||
* @param oilNo |
||||
* @return |
||||
*/ |
||||
BigDecimal getPrice(Long merId,Integer type,Integer oilNo); |
||||
} |
@ -0,0 +1,25 @@ |
||||
package com.hai.service; |
||||
|
||||
import com.hai.entity.HighMerchantAccountRecord; |
||||
|
||||
import java.util.List; |
||||
import java.util.Map; |
||||
|
||||
/** |
||||
* 商户账户变更记录 |
||||
*/ |
||||
public interface HighMerchantAccountRecordService { |
||||
|
||||
/** |
||||
* 增加记录 |
||||
* @param record |
||||
*/ |
||||
void insert(HighMerchantAccountRecord record); |
||||
|
||||
/** |
||||
* 查询记录列表 |
||||
* @param param |
||||
* @return |
||||
*/ |
||||
List<HighMerchantAccountRecord> getRecordList(Map<String, Object> param); |
||||
} |
@ -0,0 +1,65 @@ |
||||
package com.hai.service.impl; |
||||
|
||||
import com.alibaba.fastjson.JSONArray; |
||||
import com.alibaba.fastjson.JSONObject; |
||||
import com.hai.dao.HighMerchantAccountMarketingMapper; |
||||
import com.hai.entity.HighMerchantAccountMarketing; |
||||
import com.hai.entity.HighMerchantAccountMarketingExample; |
||||
import com.hai.enum_type.MerAccountMarketingType; |
||||
import com.hai.service.HighMerchantAccountMarketingService; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
import javax.annotation.Resource; |
||||
import java.math.BigDecimal; |
||||
import java.util.Date; |
||||
import java.util.List; |
||||
|
||||
@Service("merchantAccountMarketingService") |
||||
public class HighMerchantAccountMarketingServiceImpl implements HighMerchantAccountMarketingService { |
||||
|
||||
@Resource |
||||
private HighMerchantAccountMarketingMapper marketingMapper; |
||||
|
||||
@Override |
||||
public void insert(HighMerchantAccountMarketing merchantAccountMarketing) { |
||||
merchantAccountMarketing.setStatus(1); |
||||
merchantAccountMarketing.setCreateTime(new Date()); |
||||
merchantAccountMarketing.setUpdateTime(new Date()); |
||||
marketingMapper.insert(merchantAccountMarketing); |
||||
} |
||||
|
||||
@Override |
||||
public void update(HighMerchantAccountMarketing merchantAccountMarketing) { |
||||
merchantAccountMarketing.setUpdateTime(new Date()); |
||||
marketingMapper.updateByPrimaryKeySelective(merchantAccountMarketing); |
||||
} |
||||
|
||||
@Override |
||||
public HighMerchantAccountMarketing getDetailByMerAndType(Long merId, Integer type) { |
||||
HighMerchantAccountMarketingExample example = new HighMerchantAccountMarketingExample(); |
||||
example.createCriteria().andMerIdEqualTo(merId).andTypeEqualTo(type).andStatusNotEqualTo(0); |
||||
List<HighMerchantAccountMarketing> list = marketingMapper.selectByExample(example); |
||||
if (list.size() > 0) { |
||||
return list.get(0); |
||||
} |
||||
return null; |
||||
} |
||||
|
||||
@Override |
||||
public BigDecimal getPrice(Long merId, Integer type, Integer oilNo) { |
||||
HighMerchantAccountMarketing marketing = getDetailByMerAndType(merId, type); |
||||
if (marketing == null) { |
||||
return new BigDecimal("0"); |
||||
} |
||||
if (type.equals(MerAccountMarketingType.type3.getType())) { |
||||
JSONArray oilNoArray = JSONArray.parseArray(marketing.getOilNoReliefPrice()); |
||||
for (Object obj : oilNoArray) { |
||||
JSONObject oilNoData = (JSONObject) obj; |
||||
if (oilNo.equals(oilNoData.getInteger("oilNo"))) { |
||||
return oilNoData.getBigDecimal("price"); |
||||
} |
||||
} |
||||
} |
||||
return new BigDecimal("0"); |
||||
} |
||||
} |
@ -0,0 +1,52 @@ |
||||
package com.hai.service.impl; |
||||
|
||||
import com.alibaba.fastjson.JSONObject; |
||||
import com.hai.dao.HighMerchantAccountRecordMapper; |
||||
import com.hai.entity.HighMerchantAccountRecord; |
||||
import com.hai.entity.HighMerchantAccountRecordExample; |
||||
import com.hai.service.HighMerchantAccountRecordService; |
||||
import org.apache.commons.collections4.MapUtils; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
import javax.annotation.Resource; |
||||
import java.util.ArrayList; |
||||
import java.util.Date; |
||||
import java.util.List; |
||||
import java.util.Map; |
||||
|
||||
@Service("merchantAccountRecordService") |
||||
public class HighMerchantAccountRecordServiceImpl implements HighMerchantAccountRecordService { |
||||
|
||||
@Resource |
||||
private HighMerchantAccountRecordMapper merchantAccountRecordMapper; |
||||
|
||||
@Override |
||||
public void insert(HighMerchantAccountRecord record) { |
||||
record.setCreateTime(new Date()); |
||||
record.setStatus(1); |
||||
merchantAccountRecordMapper.insert(record); |
||||
} |
||||
|
||||
@Override |
||||
public List<HighMerchantAccountRecord> getRecordList(Map<String, Object> param) { |
||||
HighMerchantAccountRecordExample example = new HighMerchantAccountRecordExample(); |
||||
HighMerchantAccountRecordExample.Criteria criteria = example.createCriteria().andStatusNotEqualTo(0); |
||||
|
||||
if (MapUtils.getLong(param, "merId") != null) { |
||||
criteria.andMerIdEqualTo(MapUtils.getLong(param, "merId")); |
||||
} |
||||
|
||||
if (MapUtils.getObject(param, "merIdList") != null) { |
||||
JSONObject.toJSONString(MapUtils.getObject(param, "merIdList")); |
||||
List<Long> merList = (List<Long>) MapUtils.getObject(param, "merIdList"); |
||||
criteria.andMerIdIn(merList); |
||||
} |
||||
|
||||
if (MapUtils.getInteger(param, "type") != null) { |
||||
criteria.andTypeEqualTo(MapUtils.getInteger(param, "type")); |
||||
} |
||||
|
||||
example.setOrderByClause("create_time desc"); |
||||
return merchantAccountRecordMapper.selectByExample(example); |
||||
} |
||||
} |
Loading…
Reference in new issue