完成油卡生成、充值功能

dev-discount
胡锐 3 years ago
parent eb6567bb39
commit 6b6a54e8f3
  1. 2
      hai-bweb/src/main/java/com/bweb/controller/HighCompanyAmountController.java
  2. 133
      hai-bweb/src/main/java/com/bweb/controller/HighCompanyTwoPwdController.java
  3. 211
      hai-bweb/src/main/java/com/bweb/controller/HighOilCardController.java
  4. 1
      hai-cweb/src/main/java/com/cweb/controller/HighOrderController.java
  5. 1
      hai-service/src/main/java/com/hai/common/exception/ErrorCode.java
  6. 119
      hai-service/src/main/java/com/hai/common/utils/BankNumberUtil.java
  7. 21
      hai-service/src/main/java/com/hai/dao/HighCompanyAccountMapper.java
  8. 14
      hai-service/src/main/java/com/hai/dao/HighCompanyAccountSqlProvider.java
  9. 117
      hai-service/src/main/java/com/hai/dao/HighOilCardContactRecordMapper.java
  10. 7
      hai-service/src/main/java/com/hai/dao/HighOilCardContactRecordMapperExt.java
  11. 304
      hai-service/src/main/java/com/hai/dao/HighOilCardContactRecordSqlProvider.java
  12. 51
      hai-service/src/main/java/com/hai/dao/HighOilCardMapper.java
  13. 51
      hai-service/src/main/java/com/hai/dao/HighOilCardMapperExt.java
  14. 84
      hai-service/src/main/java/com/hai/dao/HighOilCardSqlProvider.java
  15. 16
      hai-service/src/main/java/com/hai/entity/HighCompanyAccount.java
  16. 70
      hai-service/src/main/java/com/hai/entity/HighCompanyAccountExample.java
  17. 100
      hai-service/src/main/java/com/hai/entity/HighOilCard.java
  18. 197
      hai-service/src/main/java/com/hai/entity/HighOilCardContactRecord.java
  19. 873
      hai-service/src/main/java/com/hai/entity/HighOilCardContactRecordExample.java
  20. 390
      hai-service/src/main/java/com/hai/entity/HighOilCardExample.java
  21. 4
      hai-service/src/main/java/com/hai/entity/HighOilCardRecord.java
  22. 35
      hai-service/src/main/java/com/hai/enum_type/OilCardBindStatusEnum.java
  23. 35
      hai-service/src/main/java/com/hai/enum_type/OilCardRecordSourceTypeEnum.java
  24. 35
      hai-service/src/main/java/com/hai/enum_type/OilCardRecordTypeEnum.java
  25. 36
      hai-service/src/main/java/com/hai/enum_type/OilCardStatusEnum.java
  26. 24
      hai-service/src/main/java/com/hai/service/HighCompanyTwoPwdService.java
  27. 27
      hai-service/src/main/java/com/hai/service/HighOilCardContactRecordService.java
  28. 26
      hai-service/src/main/java/com/hai/service/HighOilCardRecordService.java
  29. 77
      hai-service/src/main/java/com/hai/service/HighOilCardService.java
  30. 3
      hai-service/src/main/java/com/hai/service/impl/HighCompanyAccountServiceImpl.java
  31. 42
      hai-service/src/main/java/com/hai/service/impl/HighCompanyTwoPwdServiceImpl.java
  32. 52
      hai-service/src/main/java/com/hai/service/impl/HighOilCardContactRecordServiceImpl.java
  33. 57
      hai-service/src/main/java/com/hai/service/impl/HighOilCardRecordServiceImpl.java
  34. 274
      hai-service/src/main/java/com/hai/service/impl/HighOilCardServiceImpl.java

@ -50,7 +50,7 @@ public class HighCompanyAmountController {
@RequestMapping(value = "/recharge", method = RequestMethod.POST) @RequestMapping(value = "/recharge", method = RequestMethod.POST)
@ResponseBody @ResponseBody
@ApiOperation(value = "余额充值") @ApiOperation(value = "余额充值")
public ResponseData recharge(@RequestBody JSONObject body) { public synchronized ResponseData recharge(@RequestBody JSONObject body) {
try { try {
if (body.getLong("orgId") == null if (body.getLong("orgId") == null

@ -0,0 +1,133 @@
package com.bweb.controller;
import com.alibaba.fastjson.JSONObject;
import com.hai.common.exception.ErrorCode;
import com.hai.common.exception.ErrorHelp;
import com.hai.common.exception.SysCode;
import com.hai.common.security.AESEncodeUtil;
import com.hai.common.security.UserCenter;
import com.hai.common.utils.ResponseMsgUtil;
import com.hai.entity.HighCompanyTwoPwd;
import com.hai.model.ResponseData;
import com.hai.model.UserInfoModel;
import com.hai.service.HighCompanyTwoPwdService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.dao.DeadlockLoserDataAccessException;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.annotation.Resource;
import java.math.BigDecimal;
@Controller
@RequestMapping(value = "/companyTwoPwd")
@Api(value = "代理商接口")
public class HighCompanyTwoPwdController {
private static Logger log = LoggerFactory.getLogger(HighCompanyTwoPwdController.class);
@Resource
private HighCompanyTwoPwdService companyTwoPwdService;
@Resource
private UserCenter userCenter;
@RequestMapping(value = "/setTwoPwd", method = RequestMethod.POST)
@ResponseBody
@ApiOperation(value = "设置二级密码")
public ResponseData setTwoPwd(@RequestBody JSONObject body) {
try {
if (StringUtils.isBlank(body.getString("password"))) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, "");
}
UserInfoModel userInfoModel = userCenter.getSessionModel(UserInfoModel.class);
if (userInfoModel.getBsOrganization() == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMPETENCE_INSUFFICIENT, "");
}
if (companyTwoPwdService.getTwoPwdByOrg(userInfoModel.getBsOrganization().getId()) != null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "二级密码已设置,请勿重复设置");
}
HighCompanyTwoPwd twoPwd = new HighCompanyTwoPwd();
twoPwd.setCompanyId(userInfoModel.getBsCompany().getId());
twoPwd.setOrgId(userInfoModel.getBsOrganization().getId());
twoPwd.setPassword(AESEncodeUtil.aesEncrypt(body.getString("password")));
companyTwoPwdService.editData(twoPwd);
return ResponseMsgUtil.success("操作成功");
} catch (Exception e) {
log.error("HighCompanyTwoPwdController --> setTwoPwd() error!", e);
return ResponseMsgUtil.exception(e);
}
}
@RequestMapping(value = "/updateTwoPwd", method = RequestMethod.POST)
@ResponseBody
@ApiOperation(value = "修改二级密码")
public ResponseData updateTwoPwd(@RequestBody JSONObject body) {
try {
if (StringUtils.isBlank(body.getString("oldPassword"))
|| StringUtils.isBlank(body.getString("newPassword"))) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, "");
}
UserInfoModel userInfoModel = userCenter.getSessionModel(UserInfoModel.class);
if (userInfoModel.getBsOrganization() == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMPETENCE_INSUFFICIENT, "");
}
// 二级密码
HighCompanyTwoPwd twoPwd = companyTwoPwdService.getTwoPwdByOrg(userInfoModel.getBsOrganization().getId());
if (twoPwd == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "修改密码失败,未设置二级密码");
}
if (!AESEncodeUtil.aesEncrypt(body.getString("oldPassword")).equals(twoPwd.getPassword())) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "旧密码错误");
}
twoPwd.setPassword(AESEncodeUtil.aesEncrypt(body.getString("newPassword")));
companyTwoPwdService.editData(twoPwd);
return ResponseMsgUtil.success("操作成功");
} catch (Exception e) {
log.error("HighCompanyTwoPwdController --> updateTwoPwd() error!", e);
return ResponseMsgUtil.exception(e);
}
}
@RequestMapping(value = "/isSetTwoPwd", method = RequestMethod.POST)
@ResponseBody
@ApiOperation(value = "是否设置二级码")
public ResponseData isSetTwoPwd() {
try {
UserInfoModel userInfoModel = userCenter.getSessionModel(UserInfoModel.class);
if (userInfoModel.getBsOrganization() == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMPETENCE_INSUFFICIENT, "");
}
HighCompanyTwoPwd twoPwd = companyTwoPwdService.getTwoPwdByOrg(userInfoModel.getBsOrganization().getId());
if (twoPwd == null) {
return ResponseMsgUtil.success(false);
}
return ResponseMsgUtil.success(true);
} catch (Exception e) {
log.error("HighCompanyTwoPwdController --> isSetTwoPwd() error!", e);
return ResponseMsgUtil.exception(e);
}
}
}

@ -0,0 +1,211 @@
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.AESEncodeUtil;
import com.hai.common.security.UserCenter;
import com.hai.common.utils.ResponseMsgUtil;
import com.hai.entity.HighCompanyTwoPwd;
import com.hai.model.ResponseData;
import com.hai.model.UserInfoModel;
import com.hai.service.HighCompanyTwoPwdService;
import com.hai.service.HighOilCardService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.HashMap;
import java.util.Map;
@Controller
@RequestMapping(value = "/oilCard")
@Api(value = "油卡")
public class HighOilCardController {
private static Logger log = LoggerFactory.getLogger(HighOilCardController.class);
@Resource
private UserCenter userCenter;
@Resource
private HighOilCardService oilCardService;
@Resource
private HighCompanyTwoPwdService companyTwoPwdService;
@RequestMapping(value = "/recharge", method = RequestMethod.POST)
@ResponseBody
@ApiOperation(value = "油卡充值")
public ResponseData recharge(@RequestBody JSONObject body) {
try {
if (StringUtils.isBlank(body.getString("cardNo")) ||
body.getBigDecimal("price") == null ||
StringUtils.isBlank(body.getString("twoPwd"))) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, "");
}
UserInfoModel userModel = userCenter.getSessionModel(UserInfoModel.class);
if (userModel.getBsOrganization() == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "权限不足");
}
// 查询二级密码
HighCompanyTwoPwd pwdByOrg = companyTwoPwdService.getTwoPwdByOrg(userModel.getBsOrganization().getId());
if (pwdByOrg == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.NOT_FOUND_TOW_PWD, "");
}
if (!AESEncodeUtil.aesEncrypt(body.getString("twoPwd")).equals(pwdByOrg.getPassword())) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "二级密码错误");
}
// 充值
oilCardService.recharge(body.getString("cardNo"), body.getBigDecimal("price"), userModel.getBsOrganization().getId());
return ResponseMsgUtil.success("操作成功");
} catch (Exception e) {
log.error("HighOilCardController --> recharge() error!", e);
return ResponseMsgUtil.exception(e);
}
}
@RequestMapping(value = "/generateCard", method = RequestMethod.POST)
@ResponseBody
@ApiOperation(value = "生成油卡")
public ResponseData generateCard(@RequestBody JSONObject body) {
try {
if (body.getInteger("generateNum") == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, "");
}
UserInfoModel userModel = userCenter.getSessionModel(UserInfoModel.class);
if (userModel.getBsOrganization() == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "权限不足");
}
oilCardService.generateCard(userModel.getBsOrganization().getId(), body.getInteger("generateNum"));
return ResponseMsgUtil.success("操作成功");
} catch (Exception e) {
log.error("HighOilCardController --> generateCard() error!", e);
return ResponseMsgUtil.exception(e);
}
}
@RequestMapping(value = "/setContact", method = RequestMethod.POST)
@ResponseBody
@ApiOperation(value = "设置联系人")
public ResponseData setContact(@RequestBody JSONObject body) {
try {
if (StringUtils.isBlank(body.getString("cardNo"))
|| StringUtils.isBlank(body.getString("contactName"))
|| StringUtils.isBlank(body.getString("contactPhone"))) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, "");
}
UserInfoModel userModel = userCenter.getSessionModel(UserInfoModel.class);
if (userModel.getBsOrganization() == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "权限不足");
}
oilCardService.setContact(body.getString("cardNo"),body.getString("contactName"),body.getString("contactPhone"));
return ResponseMsgUtil.success("操作成功");
} catch (Exception e) {
log.error("HighOilCardController --> setContact() error!", e);
return ResponseMsgUtil.exception(e);
}
}
@RequestMapping(value = "/disabled", method = RequestMethod.POST)
@ResponseBody
@ApiOperation(value = "禁用")
public ResponseData disabled(@RequestBody JSONObject body) {
try {
if (StringUtils.isBlank(body.getString("cardNo"))) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, "");
}
oilCardService.disabled(body.getString("cardNo"));
return ResponseMsgUtil.success("操作成功");
} catch (Exception e) {
log.error("HighOilCardController --> disabled() error!", e);
return ResponseMsgUtil.exception(e);
}
}
@RequestMapping(value = "/enable", method = RequestMethod.POST)
@ResponseBody
@ApiOperation(value = "启用")
public ResponseData enable(@RequestBody JSONObject body) {
try {
if (StringUtils.isBlank(body.getString("cardNo"))) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, "");
}
oilCardService.enable(body.getString("cardNo"));
return ResponseMsgUtil.success("操作成功");
} catch (Exception e) {
log.error("HighOilCardController --> enable() error!", e);
return ResponseMsgUtil.exception(e);
}
}
@RequestMapping(value = "/getCardList", method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "查询油卡列表")
public ResponseData getCardList(@RequestParam(name = "orgId", required = false) Long orgId,
@RequestParam(name = "cardNo", required = false) String cardNo,
@RequestParam(name = "contactName", required = false) String contactName,
@RequestParam(name = "contactPhone", required = false) String contactPhone,
@RequestParam(name = "createTimeS", required = false) Long createTimeS,
@RequestParam(name = "createTimeE", required = false) Long createTimeE,
@RequestParam(name = "bindTimeS", required = false) Long bindTimeS,
@RequestParam(name = "bindTimeE", required = false) Long bindTimeE,
@RequestParam(name = "isConfigContact", required = false) Boolean isConfigContact,
@RequestParam(name = "status", required = false) Integer status,
@RequestParam(name = "bindStatus", required = false) Integer bindStatus,
@RequestParam(name = "pageNum", required = true) Integer pageNum,
@RequestParam(name = "pageSize", required = true) Integer pageSize) {
try {
UserInfoModel userModel = userCenter.getSessionModel(UserInfoModel.class);
Map<String, Object> param = new HashMap<>();
param.put("companyId", userModel.getBsCompany().getId());
if (userModel.getSecUser().getAdminFlag() != 1) {
param.put("orgId", userModel.getBsOrganization().getId());
}
param.put("cardNo", cardNo);
param.put("contactName", contactName);
param.put("contactPhone", contactPhone);
param.put("createTimeS", createTimeS);
param.put("createTimeE", createTimeE);
param.put("bindTimeS", bindTimeS);
param.put("bindTimeE", bindTimeE);
param.put("isConfigContact", isConfigContact);
param.put("status", status);
param.put("bindStatus", bindStatus);
PageHelper.startPage(pageNum, pageSize);
return ResponseMsgUtil.success(new PageInfo<>(oilCardService.getOilCardList(param)));
} catch (Exception e) {
log.error("HighOilCardController --> getCardList() error!", e);
return ResponseMsgUtil.exception(e);
}
}
}

@ -296,7 +296,6 @@ public class HighOrderController {
childOrder.setGoodsActualPrice(discountPackage.getPrice()); childOrder.setGoodsActualPrice(discountPackage.getPrice());
childOrder.setGoodsSpecName("默认"); childOrder.setGoodsSpecName("默认");
} }
// 汇联通充值 // 汇联通充值
if (childOrder.getGoodsType() == 8) { if (childOrder.getGoodsType() == 8) {
if (childOrder.getGoodsPrice() == null) { if (childOrder.getGoodsPrice() == null) {

@ -117,6 +117,7 @@ public enum ErrorCode {
NO_BIND_PHONE("2133","未绑定手机号"), NO_BIND_PHONE("2133","未绑定手机号"),
title_("2134","名称已存在"), title_("2134","名称已存在"),
ADD_REPEATEDLY("2135","重复添加"), ADD_REPEATEDLY("2135","重复添加"),
NOT_FOUND_TOW_PWD("2136","未设置二级密码"),
STATUS_ERROR("3000","状态错误"), STATUS_ERROR("3000","状态错误"),

@ -0,0 +1,119 @@
package com.hai.common.utils;
import com.hai.common.exception.AppException;
import org.apache.commons.lang3.StringUtils;
public class BankNumberUtil {
private static int i = 0;
/**
* 需要传入一个前缀689中的一个
* 其中6类型18类型29类型3 根据自己的业务定义
* 其他则会返回异常
* @param prefix
* @return
*/
public synchronized static String getBrankNumber(String prefix) {
if(StringUtils.isNotBlank(prefix)){
if("6".indexOf(prefix)>=0&&prefix.length()==1){
String st = "610"+prefix+getUnixTime();
return st+getBankCardCheckCode(st);
} else if("8".indexOf(prefix)>=0&&prefix.length()==1){
String st = "810"+prefix+getUnixTime();
return st+getBankCardCheckCode(st);
}else{
System.out.println("银行卡号前缀有误");
}
} else {
System.out.println("银行卡号去前缀不能是空");
}
return null;
}
/***
* 获取当前系统时间戳 并截取
* @return
*/
private synchronized static String getUnixTime(){
try {
Thread.sleep(10);//线程同步执行,休眠10毫秒 防止卡号重复
} catch (InterruptedException e) {
e.printStackTrace();
}
i++;i=i>100?i%10:i;
return ((System.currentTimeMillis()/100)+"").substring(1)+(i%10);
}
/**
* 校验银行卡卡号
* @param cardId
* @return
*/
public static boolean checkBankCard(String cardId) {
char bit = getBankCardCheckCode(cardId.substring(0, cardId.length() - 1));
if(bit == 'N'){
return false;
}
return cardId.charAt(cardId.length() - 1) == bit;
}
/**
* 从不含校验位的银行卡卡号采用 Luhm 校验算法获得校验位
* @param nonCheckCodeCardId
* @return
*/
public static char getBankCardCheckCode(String nonCheckCodeCardId){
if(nonCheckCodeCardId == null || nonCheckCodeCardId.trim().length() == 0
|| !nonCheckCodeCardId.matches("\\d+")) {
//如果传的不是数据返回N
return 'N';
}
char[] chs = nonCheckCodeCardId.trim().toCharArray();
int luhmSum = 0;
for(int i = chs.length - 1, j = 0; i >= 0; i--, j++) {
int k = chs[i] - '0';
if(j % 2 == 0) {
k *= 2;
k = k / 10 + k % 10;
}
luhmSum += k;
}
return (luhmSum % 10 == 0) ? '0' : (char)((10 - luhmSum % 10) + '0');
}
public static void main(String[] args) {
try {
for (int i = 0; i <= 1;i++) {
System.out.println(getBrankNumber("6"));
}
} catch (AppException e) {
e.printStackTrace();
}
}
}

@ -40,13 +40,15 @@ public interface HighCompanyAccountMapper extends HighCompanyAccountMapperExt {
@Insert({ @Insert({
"insert into high_company_account (company_id, org_id, ", "insert into high_company_account (company_id, org_id, ",
"amounts, `status`, ", "account_no, amounts, ",
"create_time, update_time, ", "`status`, create_time, ",
"ext_1, ext_2, ext_3)", "update_time, ext_1, ",
"ext_2, ext_3)",
"values (#{companyId,jdbcType=BIGINT}, #{orgId,jdbcType=BIGINT}, ", "values (#{companyId,jdbcType=BIGINT}, #{orgId,jdbcType=BIGINT}, ",
"#{amounts,jdbcType=DECIMAL}, #{status,jdbcType=INTEGER}, ", "#{accountNo,jdbcType=VARCHAR}, #{amounts,jdbcType=DECIMAL}, ",
"#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, ", "#{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, ",
"#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" "#{updateTime,jdbcType=TIMESTAMP}, #{ext1,jdbcType=VARCHAR}, ",
"#{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})"
}) })
@Options(useGeneratedKeys=true,keyProperty="id") @Options(useGeneratedKeys=true,keyProperty="id")
int insert(HighCompanyAccount record); int insert(HighCompanyAccount record);
@ -60,6 +62,7 @@ public interface HighCompanyAccountMapper extends HighCompanyAccountMapperExt {
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="company_id", property="companyId", jdbcType=JdbcType.BIGINT), @Result(column="company_id", property="companyId", jdbcType=JdbcType.BIGINT),
@Result(column="org_id", property="orgId", jdbcType=JdbcType.BIGINT), @Result(column="org_id", property="orgId", jdbcType=JdbcType.BIGINT),
@Result(column="account_no", property="accountNo", jdbcType=JdbcType.VARCHAR),
@Result(column="amounts", property="amounts", jdbcType=JdbcType.DECIMAL), @Result(column="amounts", property="amounts", jdbcType=JdbcType.DECIMAL),
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER), @Result(column="status", property="status", jdbcType=JdbcType.INTEGER),
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
@ -72,8 +75,8 @@ public interface HighCompanyAccountMapper extends HighCompanyAccountMapperExt {
@Select({ @Select({
"select", "select",
"id, company_id, org_id, amounts, `status`, create_time, update_time, ext_1, ", "id, company_id, org_id, account_no, amounts, `status`, create_time, update_time, ",
"ext_2, ext_3", "ext_1, ext_2, ext_3",
"from high_company_account", "from high_company_account",
"where id = #{id,jdbcType=BIGINT}" "where id = #{id,jdbcType=BIGINT}"
}) })
@ -81,6 +84,7 @@ public interface HighCompanyAccountMapper extends HighCompanyAccountMapperExt {
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="company_id", property="companyId", jdbcType=JdbcType.BIGINT), @Result(column="company_id", property="companyId", jdbcType=JdbcType.BIGINT),
@Result(column="org_id", property="orgId", jdbcType=JdbcType.BIGINT), @Result(column="org_id", property="orgId", jdbcType=JdbcType.BIGINT),
@Result(column="account_no", property="accountNo", jdbcType=JdbcType.VARCHAR),
@Result(column="amounts", property="amounts", jdbcType=JdbcType.DECIMAL), @Result(column="amounts", property="amounts", jdbcType=JdbcType.DECIMAL),
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER), @Result(column="status", property="status", jdbcType=JdbcType.INTEGER),
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
@ -104,6 +108,7 @@ public interface HighCompanyAccountMapper extends HighCompanyAccountMapperExt {
"update high_company_account", "update high_company_account",
"set company_id = #{companyId,jdbcType=BIGINT},", "set company_id = #{companyId,jdbcType=BIGINT},",
"org_id = #{orgId,jdbcType=BIGINT},", "org_id = #{orgId,jdbcType=BIGINT},",
"account_no = #{accountNo,jdbcType=VARCHAR},",
"amounts = #{amounts,jdbcType=DECIMAL},", "amounts = #{amounts,jdbcType=DECIMAL},",
"`status` = #{status,jdbcType=INTEGER},", "`status` = #{status,jdbcType=INTEGER},",
"create_time = #{createTime,jdbcType=TIMESTAMP},", "create_time = #{createTime,jdbcType=TIMESTAMP},",

@ -36,6 +36,10 @@ public class HighCompanyAccountSqlProvider {
sql.VALUES("org_id", "#{orgId,jdbcType=BIGINT}"); sql.VALUES("org_id", "#{orgId,jdbcType=BIGINT}");
} }
if (record.getAccountNo() != null) {
sql.VALUES("account_no", "#{accountNo,jdbcType=VARCHAR}");
}
if (record.getAmounts() != null) { if (record.getAmounts() != null) {
sql.VALUES("amounts", "#{amounts,jdbcType=DECIMAL}"); sql.VALUES("amounts", "#{amounts,jdbcType=DECIMAL}");
} }
@ -76,6 +80,7 @@ public class HighCompanyAccountSqlProvider {
} }
sql.SELECT("company_id"); sql.SELECT("company_id");
sql.SELECT("org_id"); sql.SELECT("org_id");
sql.SELECT("account_no");
sql.SELECT("amounts"); sql.SELECT("amounts");
sql.SELECT("`status`"); sql.SELECT("`status`");
sql.SELECT("create_time"); sql.SELECT("create_time");
@ -112,6 +117,10 @@ public class HighCompanyAccountSqlProvider {
sql.SET("org_id = #{record.orgId,jdbcType=BIGINT}"); sql.SET("org_id = #{record.orgId,jdbcType=BIGINT}");
} }
if (record.getAccountNo() != null) {
sql.SET("account_no = #{record.accountNo,jdbcType=VARCHAR}");
}
if (record.getAmounts() != null) { if (record.getAmounts() != null) {
sql.SET("amounts = #{record.amounts,jdbcType=DECIMAL}"); sql.SET("amounts = #{record.amounts,jdbcType=DECIMAL}");
} }
@ -151,6 +160,7 @@ public class HighCompanyAccountSqlProvider {
sql.SET("id = #{record.id,jdbcType=BIGINT}"); sql.SET("id = #{record.id,jdbcType=BIGINT}");
sql.SET("company_id = #{record.companyId,jdbcType=BIGINT}"); sql.SET("company_id = #{record.companyId,jdbcType=BIGINT}");
sql.SET("org_id = #{record.orgId,jdbcType=BIGINT}"); sql.SET("org_id = #{record.orgId,jdbcType=BIGINT}");
sql.SET("account_no = #{record.accountNo,jdbcType=VARCHAR}");
sql.SET("amounts = #{record.amounts,jdbcType=DECIMAL}"); sql.SET("amounts = #{record.amounts,jdbcType=DECIMAL}");
sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); sql.SET("`status` = #{record.status,jdbcType=INTEGER}");
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}");
@ -176,6 +186,10 @@ public class HighCompanyAccountSqlProvider {
sql.SET("org_id = #{orgId,jdbcType=BIGINT}"); sql.SET("org_id = #{orgId,jdbcType=BIGINT}");
} }
if (record.getAccountNo() != null) {
sql.SET("account_no = #{accountNo,jdbcType=VARCHAR}");
}
if (record.getAmounts() != null) { if (record.getAmounts() != null) {
sql.SET("amounts = #{amounts,jdbcType=DECIMAL}"); sql.SET("amounts = #{amounts,jdbcType=DECIMAL}");
} }

@ -0,0 +1,117 @@
package com.hai.dao;
import com.hai.entity.HighOilCardContactRecord;
import com.hai.entity.HighOilCardContactRecordExample;
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 HighOilCardContactRecordMapper extends HighOilCardContactRecordMapperExt {
@SelectProvider(type=HighOilCardContactRecordSqlProvider.class, method="countByExample")
long countByExample(HighOilCardContactRecordExample example);
@DeleteProvider(type=HighOilCardContactRecordSqlProvider.class, method="deleteByExample")
int deleteByExample(HighOilCardContactRecordExample example);
@Delete({
"delete from high_oil_card_contact_record",
"where id = #{id,jdbcType=BIGINT}"
})
int deleteByPrimaryKey(Long id);
@Insert({
"insert into high_oil_card_contact_record (oil_card_id, content, ",
"`status`, create_time, ",
"op_user_id, op_user_name, ",
"ext_1, ext_2, ext_3)",
"values (#{oilCardId,jdbcType=BIGINT}, #{content,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(HighOilCardContactRecord record);
@InsertProvider(type=HighOilCardContactRecordSqlProvider.class, method="insertSelective")
@Options(useGeneratedKeys=true,keyProperty="id")
int insertSelective(HighOilCardContactRecord record);
@SelectProvider(type=HighOilCardContactRecordSqlProvider.class, method="selectByExample")
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="oil_card_id", property="oilCardId", jdbcType=JdbcType.BIGINT),
@Result(column="content", property="content", 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<HighOilCardContactRecord> selectByExample(HighOilCardContactRecordExample example);
@Select({
"select",
"id, oil_card_id, content, `status`, create_time, op_user_id, op_user_name, ext_1, ",
"ext_2, ext_3",
"from high_oil_card_contact_record",
"where id = #{id,jdbcType=BIGINT}"
})
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="oil_card_id", property="oilCardId", jdbcType=JdbcType.BIGINT),
@Result(column="content", property="content", 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)
})
HighOilCardContactRecord selectByPrimaryKey(Long id);
@UpdateProvider(type=HighOilCardContactRecordSqlProvider.class, method="updateByExampleSelective")
int updateByExampleSelective(@Param("record") HighOilCardContactRecord record, @Param("example") HighOilCardContactRecordExample example);
@UpdateProvider(type=HighOilCardContactRecordSqlProvider.class, method="updateByExample")
int updateByExample(@Param("record") HighOilCardContactRecord record, @Param("example") HighOilCardContactRecordExample example);
@UpdateProvider(type=HighOilCardContactRecordSqlProvider.class, method="updateByPrimaryKeySelective")
int updateByPrimaryKeySelective(HighOilCardContactRecord record);
@Update({
"update high_oil_card_contact_record",
"set oil_card_id = #{oilCardId,jdbcType=BIGINT},",
"content = #{content,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(HighOilCardContactRecord record);
}

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

@ -0,0 +1,304 @@
package com.hai.dao;
import com.hai.entity.HighOilCardContactRecord;
import com.hai.entity.HighOilCardContactRecordExample.Criteria;
import com.hai.entity.HighOilCardContactRecordExample.Criterion;
import com.hai.entity.HighOilCardContactRecordExample;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.jdbc.SQL;
public class HighOilCardContactRecordSqlProvider {
public String countByExample(HighOilCardContactRecordExample example) {
SQL sql = new SQL();
sql.SELECT("count(*)").FROM("high_oil_card_contact_record");
applyWhere(sql, example, false);
return sql.toString();
}
public String deleteByExample(HighOilCardContactRecordExample example) {
SQL sql = new SQL();
sql.DELETE_FROM("high_oil_card_contact_record");
applyWhere(sql, example, false);
return sql.toString();
}
public String insertSelective(HighOilCardContactRecord record) {
SQL sql = new SQL();
sql.INSERT_INTO("high_oil_card_contact_record");
if (record.getOilCardId() != null) {
sql.VALUES("oil_card_id", "#{oilCardId,jdbcType=BIGINT}");
}
if (record.getContent() != null) {
sql.VALUES("content", "#{content,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(HighOilCardContactRecordExample example) {
SQL sql = new SQL();
if (example != null && example.isDistinct()) {
sql.SELECT_DISTINCT("id");
} else {
sql.SELECT("id");
}
sql.SELECT("oil_card_id");
sql.SELECT("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_oil_card_contact_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) {
HighOilCardContactRecord record = (HighOilCardContactRecord) parameter.get("record");
HighOilCardContactRecordExample example = (HighOilCardContactRecordExample) parameter.get("example");
SQL sql = new SQL();
sql.UPDATE("high_oil_card_contact_record");
if (record.getId() != null) {
sql.SET("id = #{record.id,jdbcType=BIGINT}");
}
if (record.getOilCardId() != null) {
sql.SET("oil_card_id = #{record.oilCardId,jdbcType=BIGINT}");
}
if (record.getContent() != null) {
sql.SET("content = #{record.content,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_oil_card_contact_record");
sql.SET("id = #{record.id,jdbcType=BIGINT}");
sql.SET("oil_card_id = #{record.oilCardId,jdbcType=BIGINT}");
sql.SET("content = #{record.content,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}");
HighOilCardContactRecordExample example = (HighOilCardContactRecordExample) parameter.get("example");
applyWhere(sql, example, true);
return sql.toString();
}
public String updateByPrimaryKeySelective(HighOilCardContactRecord record) {
SQL sql = new SQL();
sql.UPDATE("high_oil_card_contact_record");
if (record.getOilCardId() != null) {
sql.SET("oil_card_id = #{oilCardId,jdbcType=BIGINT}");
}
if (record.getContent() != null) {
sql.SET("content = #{content,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, HighOilCardContactRecordExample example, boolean includeExamplePhrase) {
if (example == null) {
return;
}
String parmPhrase1;
String parmPhrase1_th;
String parmPhrase2;
String parmPhrase2_th;
String parmPhrase3;
String parmPhrase3_th;
if (includeExamplePhrase) {
parmPhrase1 = "%s #{example.oredCriteria[%d].allCriteria[%d].value}";
parmPhrase1_th = "%s #{example.oredCriteria[%d].allCriteria[%d].value,typeHandler=%s}";
parmPhrase2 = "%s #{example.oredCriteria[%d].allCriteria[%d].value} and #{example.oredCriteria[%d].criteria[%d].secondValue}";
parmPhrase2_th = "%s #{example.oredCriteria[%d].allCriteria[%d].value,typeHandler=%s} and #{example.oredCriteria[%d].criteria[%d].secondValue,typeHandler=%s}";
parmPhrase3 = "#{example.oredCriteria[%d].allCriteria[%d].value[%d]}";
parmPhrase3_th = "#{example.oredCriteria[%d].allCriteria[%d].value[%d],typeHandler=%s}";
} else {
parmPhrase1 = "%s #{oredCriteria[%d].allCriteria[%d].value}";
parmPhrase1_th = "%s #{oredCriteria[%d].allCriteria[%d].value,typeHandler=%s}";
parmPhrase2 = "%s #{oredCriteria[%d].allCriteria[%d].value} and #{oredCriteria[%d].criteria[%d].secondValue}";
parmPhrase2_th = "%s #{oredCriteria[%d].allCriteria[%d].value,typeHandler=%s} and #{oredCriteria[%d].criteria[%d].secondValue,typeHandler=%s}";
parmPhrase3 = "#{oredCriteria[%d].allCriteria[%d].value[%d]}";
parmPhrase3_th = "#{oredCriteria[%d].allCriteria[%d].value[%d],typeHandler=%s}";
}
StringBuilder sb = new StringBuilder();
List<Criteria> oredCriteria = example.getOredCriteria();
boolean firstCriteria = true;
for (int i = 0; i < oredCriteria.size(); i++) {
Criteria criteria = oredCriteria.get(i);
if (criteria.isValid()) {
if (firstCriteria) {
firstCriteria = false;
} else {
sb.append(" or ");
}
sb.append('(');
List<Criterion> criterions = criteria.getAllCriteria();
boolean firstCriterion = true;
for (int j = 0; j < criterions.size(); j++) {
Criterion criterion = criterions.get(j);
if (firstCriterion) {
firstCriterion = false;
} else {
sb.append(" and ");
}
if (criterion.isNoValue()) {
sb.append(criterion.getCondition());
} else if (criterion.isSingleValue()) {
if (criterion.getTypeHandler() == null) {
sb.append(String.format(parmPhrase1, criterion.getCondition(), i, j));
} else {
sb.append(String.format(parmPhrase1_th, criterion.getCondition(), i, j,criterion.getTypeHandler()));
}
} else if (criterion.isBetweenValue()) {
if (criterion.getTypeHandler() == null) {
sb.append(String.format(parmPhrase2, criterion.getCondition(), i, j, i, j));
} else {
sb.append(String.format(parmPhrase2_th, criterion.getCondition(), i, j, criterion.getTypeHandler(), i, j, criterion.getTypeHandler()));
}
} else if (criterion.isListValue()) {
sb.append(criterion.getCondition());
sb.append(" (");
List<?> listItems = (List<?>) criterion.getValue();
boolean comma = false;
for (int k = 0; k < listItems.size(); k++) {
if (comma) {
sb.append(", ");
} else {
comma = true;
}
if (criterion.getTypeHandler() == null) {
sb.append(String.format(parmPhrase3, i, j, k));
} else {
sb.append(String.format(parmPhrase3_th, i, j, k, criterion.getTypeHandler()));
}
}
sb.append(')');
}
}
sb.append(')');
}
}
if (sb.length() > 0) {
sql.WHERE(sb.toString());
}
}
}

@ -39,18 +39,22 @@ public interface HighOilCardMapper extends HighOilCardMapperExt {
int deleteByPrimaryKey(Long id); int deleteByPrimaryKey(Long id);
@Insert({ @Insert({
"insert into high_oil_card (company_id, org_id, ", "insert into high_oil_card (company_id, company_name, ",
"card_no, amount, ", "org_id, org_name, card_no, ",
"contact_name, contact_phone, ", "amount, contact_name, ",
"`status`, create_time, ", "contact_phone, `status`, ",
"update_time, ext_1, ", "bind_status, bind_time, ",
"ext_2, ext_3)", "create_time, update_time, ",
"values (#{companyId,jdbcType=BIGINT}, #{orgId,jdbcType=BIGINT}, ", "op_user_id, op_user_name, ",
"#{cardNo,jdbcType=VARCHAR}, #{amount,jdbcType=DECIMAL}, ", "ext_1, ext_2, ext_3)",
"#{contactName,jdbcType=VARCHAR}, #{contactPhone,jdbcType=VARCHAR}, ", "values (#{companyId,jdbcType=BIGINT}, #{companyName,jdbcType=VARCHAR}, ",
"#{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, ", "#{orgId,jdbcType=BIGINT}, #{orgName,jdbcType=VARCHAR}, #{cardNo,jdbcType=VARCHAR}, ",
"#{updateTime,jdbcType=TIMESTAMP}, #{ext1,jdbcType=VARCHAR}, ", "#{amount,jdbcType=DECIMAL}, #{contactName,jdbcType=VARCHAR}, ",
"#{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" "#{contactPhone,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, ",
"#{bindStatus,jdbcType=INTEGER}, #{bindTime,jdbcType=TIMESTAMP}, ",
"#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, ",
"#{opUserId,jdbcType=BIGINT}, #{opUserName,jdbcType=VARCHAR}, ",
"#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})"
}) })
@Options(useGeneratedKeys=true,keyProperty="id") @Options(useGeneratedKeys=true,keyProperty="id")
int insert(HighOilCard record); int insert(HighOilCard record);
@ -63,14 +67,20 @@ public interface HighOilCardMapper extends HighOilCardMapperExt {
@Results({ @Results({
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="company_id", property="companyId", jdbcType=JdbcType.BIGINT), @Result(column="company_id", property="companyId", jdbcType=JdbcType.BIGINT),
@Result(column="company_name", property="companyName", jdbcType=JdbcType.VARCHAR),
@Result(column="org_id", property="orgId", jdbcType=JdbcType.BIGINT), @Result(column="org_id", property="orgId", jdbcType=JdbcType.BIGINT),
@Result(column="org_name", property="orgName", jdbcType=JdbcType.VARCHAR),
@Result(column="card_no", property="cardNo", jdbcType=JdbcType.VARCHAR), @Result(column="card_no", property="cardNo", jdbcType=JdbcType.VARCHAR),
@Result(column="amount", property="amount", jdbcType=JdbcType.DECIMAL), @Result(column="amount", property="amount", jdbcType=JdbcType.DECIMAL),
@Result(column="contact_name", property="contactName", jdbcType=JdbcType.VARCHAR), @Result(column="contact_name", property="contactName", jdbcType=JdbcType.VARCHAR),
@Result(column="contact_phone", property="contactPhone", jdbcType=JdbcType.VARCHAR), @Result(column="contact_phone", property="contactPhone", jdbcType=JdbcType.VARCHAR),
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER), @Result(column="status", property="status", jdbcType=JdbcType.INTEGER),
@Result(column="bind_status", property="bindStatus", jdbcType=JdbcType.INTEGER),
@Result(column="bind_time", property="bindTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="update_time", property="updateTime", 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_1", property="ext1", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR), @Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR) @Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR)
@ -79,22 +89,29 @@ public interface HighOilCardMapper extends HighOilCardMapperExt {
@Select({ @Select({
"select", "select",
"id, company_id, org_id, card_no, amount, contact_name, contact_phone, `status`, ", "id, company_id, company_name, org_id, org_name, card_no, amount, contact_name, ",
"create_time, update_time, ext_1, ext_2, ext_3", "contact_phone, `status`, bind_status, bind_time, create_time, update_time, op_user_id, ",
"op_user_name, ext_1, ext_2, ext_3",
"from high_oil_card", "from high_oil_card",
"where id = #{id,jdbcType=BIGINT}" "where id = #{id,jdbcType=BIGINT}"
}) })
@Results({ @Results({
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="company_id", property="companyId", jdbcType=JdbcType.BIGINT), @Result(column="company_id", property="companyId", jdbcType=JdbcType.BIGINT),
@Result(column="company_name", property="companyName", jdbcType=JdbcType.VARCHAR),
@Result(column="org_id", property="orgId", jdbcType=JdbcType.BIGINT), @Result(column="org_id", property="orgId", jdbcType=JdbcType.BIGINT),
@Result(column="org_name", property="orgName", jdbcType=JdbcType.VARCHAR),
@Result(column="card_no", property="cardNo", jdbcType=JdbcType.VARCHAR), @Result(column="card_no", property="cardNo", jdbcType=JdbcType.VARCHAR),
@Result(column="amount", property="amount", jdbcType=JdbcType.DECIMAL), @Result(column="amount", property="amount", jdbcType=JdbcType.DECIMAL),
@Result(column="contact_name", property="contactName", jdbcType=JdbcType.VARCHAR), @Result(column="contact_name", property="contactName", jdbcType=JdbcType.VARCHAR),
@Result(column="contact_phone", property="contactPhone", jdbcType=JdbcType.VARCHAR), @Result(column="contact_phone", property="contactPhone", jdbcType=JdbcType.VARCHAR),
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER), @Result(column="status", property="status", jdbcType=JdbcType.INTEGER),
@Result(column="bind_status", property="bindStatus", jdbcType=JdbcType.INTEGER),
@Result(column="bind_time", property="bindTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="update_time", property="updateTime", 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_1", property="ext1", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR), @Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR) @Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR)
@ -113,14 +130,20 @@ public interface HighOilCardMapper extends HighOilCardMapperExt {
@Update({ @Update({
"update high_oil_card", "update high_oil_card",
"set company_id = #{companyId,jdbcType=BIGINT},", "set company_id = #{companyId,jdbcType=BIGINT},",
"company_name = #{companyName,jdbcType=VARCHAR},",
"org_id = #{orgId,jdbcType=BIGINT},", "org_id = #{orgId,jdbcType=BIGINT},",
"org_name = #{orgName,jdbcType=VARCHAR},",
"card_no = #{cardNo,jdbcType=VARCHAR},", "card_no = #{cardNo,jdbcType=VARCHAR},",
"amount = #{amount,jdbcType=DECIMAL},", "amount = #{amount,jdbcType=DECIMAL},",
"contact_name = #{contactName,jdbcType=VARCHAR},", "contact_name = #{contactName,jdbcType=VARCHAR},",
"contact_phone = #{contactPhone,jdbcType=VARCHAR},", "contact_phone = #{contactPhone,jdbcType=VARCHAR},",
"`status` = #{status,jdbcType=INTEGER},", "`status` = #{status,jdbcType=INTEGER},",
"bind_status = #{bindStatus,jdbcType=INTEGER},",
"bind_time = #{bindTime,jdbcType=TIMESTAMP},",
"create_time = #{createTime,jdbcType=TIMESTAMP},", "create_time = #{createTime,jdbcType=TIMESTAMP},",
"update_time = #{updateTime,jdbcType=TIMESTAMP},", "update_time = #{updateTime,jdbcType=TIMESTAMP},",
"op_user_id = #{opUserId,jdbcType=BIGINT},",
"op_user_name = #{opUserName,jdbcType=VARCHAR},",
"ext_1 = #{ext1,jdbcType=VARCHAR},", "ext_1 = #{ext1,jdbcType=VARCHAR},",
"ext_2 = #{ext2,jdbcType=VARCHAR},", "ext_2 = #{ext2,jdbcType=VARCHAR},",
"ext_3 = #{ext3,jdbcType=VARCHAR}", "ext_3 = #{ext3,jdbcType=VARCHAR}",

@ -1,7 +1,58 @@
package com.hai.dao; package com.hai.dao;
import com.hai.entity.HighOilCard;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/** /**
* mapper扩展类 * mapper扩展类
*/ */
public interface HighOilCardMapperExt { public interface HighOilCardMapperExt {
@Insert({
"<script>" +
"insert into high_oil_card (" +
"company_id, " +
"company_name, " +
"org_id," +
"org_name, " +
"card_no, " +
"amount," +
"contact_name, " +
"contact_phone," +
"status," +
"bind_status, " +
"create_time," +
"update_time, " +
"op_user_id, " +
"op_user_name, " +
"ext_1, " +
"ext_2, " +
"ext_3) " +
"values " +
"<foreach collection='list' item='item' index='index' separator=','>",
"(#{item.companyId,jdbcType=BIGINT}, " +
" #{item.companyName,jdbcType=VARCHAR}, " +
" #{item.orgId,jdbcType=BIGINT}, " +
" #{item.orgName,jdbcType=VARCHAR}," +
" #{item.cardNo,jdbcType=VARCHAR}," +
" #{item.amount,jdbcType=DECIMAL}, " +
" #{item.contactName,jdbcType=VARCHAR}," +
" #{item.contactPhone,jdbcType=VARCHAR}, " +
" #{item.status,jdbcType=INTEGER}," +
" #{item.bindStatus,jdbcType=INTEGER}," +
" #{item.createTime,jdbcType=TIMESTAMP}," +
" #{item.updateTime,jdbcType=TIMESTAMP}, " +
" #{item.opUserId,jdbcType=BIGINT}," +
" #{item.opUserName,jdbcType=VARCHAR}, " +
" #{item.ext1,jdbcType=VARCHAR}," +
" #{item.ext2,jdbcType=VARCHAR}, " +
" #{item.ext3,jdbcType=VARCHAR})",
"</foreach>",
"</script>"
})
void insertList(@Param(value = "list") List<HighOilCard> oilCardList);
} }

@ -32,10 +32,18 @@ public class HighOilCardSqlProvider {
sql.VALUES("company_id", "#{companyId,jdbcType=BIGINT}"); sql.VALUES("company_id", "#{companyId,jdbcType=BIGINT}");
} }
if (record.getCompanyName() != null) {
sql.VALUES("company_name", "#{companyName,jdbcType=VARCHAR}");
}
if (record.getOrgId() != null) { if (record.getOrgId() != null) {
sql.VALUES("org_id", "#{orgId,jdbcType=BIGINT}"); sql.VALUES("org_id", "#{orgId,jdbcType=BIGINT}");
} }
if (record.getOrgName() != null) {
sql.VALUES("org_name", "#{orgName,jdbcType=VARCHAR}");
}
if (record.getCardNo() != null) { if (record.getCardNo() != null) {
sql.VALUES("card_no", "#{cardNo,jdbcType=VARCHAR}"); sql.VALUES("card_no", "#{cardNo,jdbcType=VARCHAR}");
} }
@ -56,6 +64,14 @@ public class HighOilCardSqlProvider {
sql.VALUES("`status`", "#{status,jdbcType=INTEGER}"); sql.VALUES("`status`", "#{status,jdbcType=INTEGER}");
} }
if (record.getBindStatus() != null) {
sql.VALUES("bind_status", "#{bindStatus,jdbcType=INTEGER}");
}
if (record.getBindTime() != null) {
sql.VALUES("bind_time", "#{bindTime,jdbcType=TIMESTAMP}");
}
if (record.getCreateTime() != null) { if (record.getCreateTime() != null) {
sql.VALUES("create_time", "#{createTime,jdbcType=TIMESTAMP}"); sql.VALUES("create_time", "#{createTime,jdbcType=TIMESTAMP}");
} }
@ -64,6 +80,14 @@ public class HighOilCardSqlProvider {
sql.VALUES("update_time", "#{updateTime,jdbcType=TIMESTAMP}"); sql.VALUES("update_time", "#{updateTime,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) { if (record.getExt1() != null) {
sql.VALUES("ext_1", "#{ext1,jdbcType=VARCHAR}"); sql.VALUES("ext_1", "#{ext1,jdbcType=VARCHAR}");
} }
@ -87,14 +111,20 @@ public class HighOilCardSqlProvider {
sql.SELECT("id"); sql.SELECT("id");
} }
sql.SELECT("company_id"); sql.SELECT("company_id");
sql.SELECT("company_name");
sql.SELECT("org_id"); sql.SELECT("org_id");
sql.SELECT("org_name");
sql.SELECT("card_no"); sql.SELECT("card_no");
sql.SELECT("amount"); sql.SELECT("amount");
sql.SELECT("contact_name"); sql.SELECT("contact_name");
sql.SELECT("contact_phone"); sql.SELECT("contact_phone");
sql.SELECT("`status`"); sql.SELECT("`status`");
sql.SELECT("bind_status");
sql.SELECT("bind_time");
sql.SELECT("create_time"); sql.SELECT("create_time");
sql.SELECT("update_time"); sql.SELECT("update_time");
sql.SELECT("op_user_id");
sql.SELECT("op_user_name");
sql.SELECT("ext_1"); sql.SELECT("ext_1");
sql.SELECT("ext_2"); sql.SELECT("ext_2");
sql.SELECT("ext_3"); sql.SELECT("ext_3");
@ -123,10 +153,18 @@ public class HighOilCardSqlProvider {
sql.SET("company_id = #{record.companyId,jdbcType=BIGINT}"); sql.SET("company_id = #{record.companyId,jdbcType=BIGINT}");
} }
if (record.getCompanyName() != null) {
sql.SET("company_name = #{record.companyName,jdbcType=VARCHAR}");
}
if (record.getOrgId() != null) { if (record.getOrgId() != null) {
sql.SET("org_id = #{record.orgId,jdbcType=BIGINT}"); sql.SET("org_id = #{record.orgId,jdbcType=BIGINT}");
} }
if (record.getOrgName() != null) {
sql.SET("org_name = #{record.orgName,jdbcType=VARCHAR}");
}
if (record.getCardNo() != null) { if (record.getCardNo() != null) {
sql.SET("card_no = #{record.cardNo,jdbcType=VARCHAR}"); sql.SET("card_no = #{record.cardNo,jdbcType=VARCHAR}");
} }
@ -147,6 +185,14 @@ public class HighOilCardSqlProvider {
sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); sql.SET("`status` = #{record.status,jdbcType=INTEGER}");
} }
if (record.getBindStatus() != null) {
sql.SET("bind_status = #{record.bindStatus,jdbcType=INTEGER}");
}
if (record.getBindTime() != null) {
sql.SET("bind_time = #{record.bindTime,jdbcType=TIMESTAMP}");
}
if (record.getCreateTime() != null) { if (record.getCreateTime() != null) {
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}");
} }
@ -155,6 +201,14 @@ public class HighOilCardSqlProvider {
sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}"); sql.SET("update_time = #{record.updateTime,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) { if (record.getExt1() != null) {
sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}"); sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}");
} }
@ -177,14 +231,20 @@ public class HighOilCardSqlProvider {
sql.SET("id = #{record.id,jdbcType=BIGINT}"); sql.SET("id = #{record.id,jdbcType=BIGINT}");
sql.SET("company_id = #{record.companyId,jdbcType=BIGINT}"); sql.SET("company_id = #{record.companyId,jdbcType=BIGINT}");
sql.SET("company_name = #{record.companyName,jdbcType=VARCHAR}");
sql.SET("org_id = #{record.orgId,jdbcType=BIGINT}"); sql.SET("org_id = #{record.orgId,jdbcType=BIGINT}");
sql.SET("org_name = #{record.orgName,jdbcType=VARCHAR}");
sql.SET("card_no = #{record.cardNo,jdbcType=VARCHAR}"); sql.SET("card_no = #{record.cardNo,jdbcType=VARCHAR}");
sql.SET("amount = #{record.amount,jdbcType=DECIMAL}"); sql.SET("amount = #{record.amount,jdbcType=DECIMAL}");
sql.SET("contact_name = #{record.contactName,jdbcType=VARCHAR}"); sql.SET("contact_name = #{record.contactName,jdbcType=VARCHAR}");
sql.SET("contact_phone = #{record.contactPhone,jdbcType=VARCHAR}"); sql.SET("contact_phone = #{record.contactPhone,jdbcType=VARCHAR}");
sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); sql.SET("`status` = #{record.status,jdbcType=INTEGER}");
sql.SET("bind_status = #{record.bindStatus,jdbcType=INTEGER}");
sql.SET("bind_time = #{record.bindTime,jdbcType=TIMESTAMP}");
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}");
sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}"); sql.SET("update_time = #{record.updateTime,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_1 = #{record.ext1,jdbcType=VARCHAR}");
sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}"); sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}");
sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}"); sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}");
@ -202,10 +262,18 @@ public class HighOilCardSqlProvider {
sql.SET("company_id = #{companyId,jdbcType=BIGINT}"); sql.SET("company_id = #{companyId,jdbcType=BIGINT}");
} }
if (record.getCompanyName() != null) {
sql.SET("company_name = #{companyName,jdbcType=VARCHAR}");
}
if (record.getOrgId() != null) { if (record.getOrgId() != null) {
sql.SET("org_id = #{orgId,jdbcType=BIGINT}"); sql.SET("org_id = #{orgId,jdbcType=BIGINT}");
} }
if (record.getOrgName() != null) {
sql.SET("org_name = #{orgName,jdbcType=VARCHAR}");
}
if (record.getCardNo() != null) { if (record.getCardNo() != null) {
sql.SET("card_no = #{cardNo,jdbcType=VARCHAR}"); sql.SET("card_no = #{cardNo,jdbcType=VARCHAR}");
} }
@ -226,6 +294,14 @@ public class HighOilCardSqlProvider {
sql.SET("`status` = #{status,jdbcType=INTEGER}"); sql.SET("`status` = #{status,jdbcType=INTEGER}");
} }
if (record.getBindStatus() != null) {
sql.SET("bind_status = #{bindStatus,jdbcType=INTEGER}");
}
if (record.getBindTime() != null) {
sql.SET("bind_time = #{bindTime,jdbcType=TIMESTAMP}");
}
if (record.getCreateTime() != null) { if (record.getCreateTime() != null) {
sql.SET("create_time = #{createTime,jdbcType=TIMESTAMP}"); sql.SET("create_time = #{createTime,jdbcType=TIMESTAMP}");
} }
@ -234,6 +310,14 @@ public class HighOilCardSqlProvider {
sql.SET("update_time = #{updateTime,jdbcType=TIMESTAMP}"); sql.SET("update_time = #{updateTime,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) { if (record.getExt1() != null) {
sql.SET("ext_1 = #{ext1,jdbcType=VARCHAR}"); sql.SET("ext_1 = #{ext1,jdbcType=VARCHAR}");
} }

@ -26,6 +26,11 @@ public class HighCompanyAccount implements Serializable {
*/ */
private Long orgId; private Long orgId;
/**
* 账户号码
*/
private String accountNo;
/** /**
* 金额额度 * 金额额度
*/ */
@ -78,6 +83,14 @@ public class HighCompanyAccount implements Serializable {
this.orgId = orgId; this.orgId = orgId;
} }
public String getAccountNo() {
return accountNo;
}
public void setAccountNo(String accountNo) {
this.accountNo = accountNo;
}
public BigDecimal getAmounts() { public BigDecimal getAmounts() {
return amounts; return amounts;
} }
@ -149,6 +162,7 @@ public class HighCompanyAccount implements Serializable {
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getCompanyId() == null ? other.getCompanyId() == null : this.getCompanyId().equals(other.getCompanyId())) && (this.getCompanyId() == null ? other.getCompanyId() == null : this.getCompanyId().equals(other.getCompanyId()))
&& (this.getOrgId() == null ? other.getOrgId() == null : this.getOrgId().equals(other.getOrgId())) && (this.getOrgId() == null ? other.getOrgId() == null : this.getOrgId().equals(other.getOrgId()))
&& (this.getAccountNo() == null ? other.getAccountNo() == null : this.getAccountNo().equals(other.getAccountNo()))
&& (this.getAmounts() == null ? other.getAmounts() == null : this.getAmounts().equals(other.getAmounts())) && (this.getAmounts() == null ? other.getAmounts() == null : this.getAmounts().equals(other.getAmounts()))
&& (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
@ -165,6 +179,7 @@ public class HighCompanyAccount implements Serializable {
result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
result = prime * result + ((getCompanyId() == null) ? 0 : getCompanyId().hashCode()); result = prime * result + ((getCompanyId() == null) ? 0 : getCompanyId().hashCode());
result = prime * result + ((getOrgId() == null) ? 0 : getOrgId().hashCode()); result = prime * result + ((getOrgId() == null) ? 0 : getOrgId().hashCode());
result = prime * result + ((getAccountNo() == null) ? 0 : getAccountNo().hashCode());
result = prime * result + ((getAmounts() == null) ? 0 : getAmounts().hashCode()); result = prime * result + ((getAmounts() == null) ? 0 : getAmounts().hashCode());
result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
@ -184,6 +199,7 @@ public class HighCompanyAccount implements Serializable {
sb.append(", id=").append(id); sb.append(", id=").append(id);
sb.append(", companyId=").append(companyId); sb.append(", companyId=").append(companyId);
sb.append(", orgId=").append(orgId); sb.append(", orgId=").append(orgId);
sb.append(", accountNo=").append(accountNo);
sb.append(", amounts=").append(amounts); sb.append(", amounts=").append(amounts);
sb.append(", status=").append(status); sb.append(", status=").append(status);
sb.append(", createTime=").append(createTime); sb.append(", createTime=").append(createTime);

@ -306,6 +306,76 @@ public class HighCompanyAccountExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andAccountNoIsNull() {
addCriterion("account_no is null");
return (Criteria) this;
}
public Criteria andAccountNoIsNotNull() {
addCriterion("account_no is not null");
return (Criteria) this;
}
public Criteria andAccountNoEqualTo(String value) {
addCriterion("account_no =", value, "accountNo");
return (Criteria) this;
}
public Criteria andAccountNoNotEqualTo(String value) {
addCriterion("account_no <>", value, "accountNo");
return (Criteria) this;
}
public Criteria andAccountNoGreaterThan(String value) {
addCriterion("account_no >", value, "accountNo");
return (Criteria) this;
}
public Criteria andAccountNoGreaterThanOrEqualTo(String value) {
addCriterion("account_no >=", value, "accountNo");
return (Criteria) this;
}
public Criteria andAccountNoLessThan(String value) {
addCriterion("account_no <", value, "accountNo");
return (Criteria) this;
}
public Criteria andAccountNoLessThanOrEqualTo(String value) {
addCriterion("account_no <=", value, "accountNo");
return (Criteria) this;
}
public Criteria andAccountNoLike(String value) {
addCriterion("account_no like", value, "accountNo");
return (Criteria) this;
}
public Criteria andAccountNoNotLike(String value) {
addCriterion("account_no not like", value, "accountNo");
return (Criteria) this;
}
public Criteria andAccountNoIn(List<String> values) {
addCriterion("account_no in", values, "accountNo");
return (Criteria) this;
}
public Criteria andAccountNoNotIn(List<String> values) {
addCriterion("account_no not in", values, "accountNo");
return (Criteria) this;
}
public Criteria andAccountNoBetween(String value1, String value2) {
addCriterion("account_no between", value1, value2, "accountNo");
return (Criteria) this;
}
public Criteria andAccountNoNotBetween(String value1, String value2) {
addCriterion("account_no not between", value1, value2, "accountNo");
return (Criteria) this;
}
public Criteria andAmountsIsNull() { public Criteria andAmountsIsNull() {
addCriterion("amounts is null"); addCriterion("amounts is null");
return (Criteria) this; return (Criteria) this;

@ -22,10 +22,20 @@ public class HighOilCard implements Serializable {
private Long companyId; private Long companyId;
/** /**
* 部门id * 公司名称
*/
private String companyName;
/**
* 单位id
*/ */
private Long orgId; private Long orgId;
/**
* 单位名称
*/
private String orgName;
/** /**
* 卡号 * 卡号
*/ */
@ -47,10 +57,20 @@ public class HighOilCard implements Serializable {
private String contactPhone; private String contactPhone;
/** /**
* 状态 0删除 1正常 2禁用 * 油卡状态 0删除 1正常 2禁用
*/ */
private Integer status; private Integer status;
/**
* 绑定状态 0未绑定 1已绑定
*/
private Integer bindStatus;
/**
* 绑定时间
*/
private Date bindTime;
/** /**
* 创建时间 * 创建时间
*/ */
@ -61,6 +81,16 @@ public class HighOilCard implements Serializable {
*/ */
private Date updateTime; private Date updateTime;
/**
* 操作人id
*/
private Long opUserId;
/**
* 操作人名称
*/
private String opUserName;
private String ext1; private String ext1;
private String ext2; private String ext2;
@ -85,6 +115,14 @@ public class HighOilCard implements Serializable {
this.companyId = companyId; this.companyId = companyId;
} }
public String getCompanyName() {
return companyName;
}
public void setCompanyName(String companyName) {
this.companyName = companyName;
}
public Long getOrgId() { public Long getOrgId() {
return orgId; return orgId;
} }
@ -93,6 +131,14 @@ public class HighOilCard implements Serializable {
this.orgId = orgId; this.orgId = orgId;
} }
public String getOrgName() {
return orgName;
}
public void setOrgName(String orgName) {
this.orgName = orgName;
}
public String getCardNo() { public String getCardNo() {
return cardNo; return cardNo;
} }
@ -133,6 +179,22 @@ public class HighOilCard implements Serializable {
this.status = status; this.status = status;
} }
public Integer getBindStatus() {
return bindStatus;
}
public void setBindStatus(Integer bindStatus) {
this.bindStatus = bindStatus;
}
public Date getBindTime() {
return bindTime;
}
public void setBindTime(Date bindTime) {
this.bindTime = bindTime;
}
public Date getCreateTime() { public Date getCreateTime() {
return createTime; return createTime;
} }
@ -149,6 +211,22 @@ public class HighOilCard implements Serializable {
this.updateTime = updateTime; this.updateTime = updateTime;
} }
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() { public String getExt1() {
return ext1; return ext1;
} }
@ -187,14 +265,20 @@ public class HighOilCard implements Serializable {
HighOilCard other = (HighOilCard) that; HighOilCard other = (HighOilCard) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getCompanyId() == null ? other.getCompanyId() == null : this.getCompanyId().equals(other.getCompanyId())) && (this.getCompanyId() == null ? other.getCompanyId() == null : this.getCompanyId().equals(other.getCompanyId()))
&& (this.getCompanyName() == null ? other.getCompanyName() == null : this.getCompanyName().equals(other.getCompanyName()))
&& (this.getOrgId() == null ? other.getOrgId() == null : this.getOrgId().equals(other.getOrgId())) && (this.getOrgId() == null ? other.getOrgId() == null : this.getOrgId().equals(other.getOrgId()))
&& (this.getOrgName() == null ? other.getOrgName() == null : this.getOrgName().equals(other.getOrgName()))
&& (this.getCardNo() == null ? other.getCardNo() == null : this.getCardNo().equals(other.getCardNo())) && (this.getCardNo() == null ? other.getCardNo() == null : this.getCardNo().equals(other.getCardNo()))
&& (this.getAmount() == null ? other.getAmount() == null : this.getAmount().equals(other.getAmount())) && (this.getAmount() == null ? other.getAmount() == null : this.getAmount().equals(other.getAmount()))
&& (this.getContactName() == null ? other.getContactName() == null : this.getContactName().equals(other.getContactName())) && (this.getContactName() == null ? other.getContactName() == null : this.getContactName().equals(other.getContactName()))
&& (this.getContactPhone() == null ? other.getContactPhone() == null : this.getContactPhone().equals(other.getContactPhone())) && (this.getContactPhone() == null ? other.getContactPhone() == null : this.getContactPhone().equals(other.getContactPhone()))
&& (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
&& (this.getBindStatus() == null ? other.getBindStatus() == null : this.getBindStatus().equals(other.getBindStatus()))
&& (this.getBindTime() == null ? other.getBindTime() == null : this.getBindTime().equals(other.getBindTime()))
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
&& (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime())) && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
&& (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.getExt1() == null ? other.getExt1() == null : this.getExt1().equals(other.getExt1()))
&& (this.getExt2() == null ? other.getExt2() == null : this.getExt2().equals(other.getExt2())) && (this.getExt2() == null ? other.getExt2() == null : this.getExt2().equals(other.getExt2()))
&& (this.getExt3() == null ? other.getExt3() == null : this.getExt3().equals(other.getExt3())); && (this.getExt3() == null ? other.getExt3() == null : this.getExt3().equals(other.getExt3()));
@ -206,14 +290,20 @@ public class HighOilCard implements Serializable {
int result = 1; int result = 1;
result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
result = prime * result + ((getCompanyId() == null) ? 0 : getCompanyId().hashCode()); result = prime * result + ((getCompanyId() == null) ? 0 : getCompanyId().hashCode());
result = prime * result + ((getCompanyName() == null) ? 0 : getCompanyName().hashCode());
result = prime * result + ((getOrgId() == null) ? 0 : getOrgId().hashCode()); result = prime * result + ((getOrgId() == null) ? 0 : getOrgId().hashCode());
result = prime * result + ((getOrgName() == null) ? 0 : getOrgName().hashCode());
result = prime * result + ((getCardNo() == null) ? 0 : getCardNo().hashCode()); result = prime * result + ((getCardNo() == null) ? 0 : getCardNo().hashCode());
result = prime * result + ((getAmount() == null) ? 0 : getAmount().hashCode()); result = prime * result + ((getAmount() == null) ? 0 : getAmount().hashCode());
result = prime * result + ((getContactName() == null) ? 0 : getContactName().hashCode()); result = prime * result + ((getContactName() == null) ? 0 : getContactName().hashCode());
result = prime * result + ((getContactPhone() == null) ? 0 : getContactPhone().hashCode()); result = prime * result + ((getContactPhone() == null) ? 0 : getContactPhone().hashCode());
result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
result = prime * result + ((getBindStatus() == null) ? 0 : getBindStatus().hashCode());
result = prime * result + ((getBindTime() == null) ? 0 : getBindTime().hashCode());
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode()); result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().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 + ((getExt1() == null) ? 0 : getExt1().hashCode());
result = prime * result + ((getExt2() == null) ? 0 : getExt2().hashCode()); result = prime * result + ((getExt2() == null) ? 0 : getExt2().hashCode());
result = prime * result + ((getExt3() == null) ? 0 : getExt3().hashCode()); result = prime * result + ((getExt3() == null) ? 0 : getExt3().hashCode());
@ -228,14 +318,20 @@ public class HighOilCard implements Serializable {
sb.append("Hash = ").append(hashCode()); sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id); sb.append(", id=").append(id);
sb.append(", companyId=").append(companyId); sb.append(", companyId=").append(companyId);
sb.append(", companyName=").append(companyName);
sb.append(", orgId=").append(orgId); sb.append(", orgId=").append(orgId);
sb.append(", orgName=").append(orgName);
sb.append(", cardNo=").append(cardNo); sb.append(", cardNo=").append(cardNo);
sb.append(", amount=").append(amount); sb.append(", amount=").append(amount);
sb.append(", contactName=").append(contactName); sb.append(", contactName=").append(contactName);
sb.append(", contactPhone=").append(contactPhone); sb.append(", contactPhone=").append(contactPhone);
sb.append(", status=").append(status); sb.append(", status=").append(status);
sb.append(", bindStatus=").append(bindStatus);
sb.append(", bindTime=").append(bindTime);
sb.append(", createTime=").append(createTime); sb.append(", createTime=").append(createTime);
sb.append(", updateTime=").append(updateTime); sb.append(", updateTime=").append(updateTime);
sb.append(", opUserId=").append(opUserId);
sb.append(", opUserName=").append(opUserName);
sb.append(", ext1=").append(ext1); sb.append(", ext1=").append(ext1);
sb.append(", ext2=").append(ext2); sb.append(", ext2=").append(ext2);
sb.append(", ext3=").append(ext3); sb.append(", ext3=").append(ext3);

@ -0,0 +1,197 @@
package com.hai.entity;
import java.io.Serializable;
import java.util.Date;
/**
* high_oil_card_contact_record
* @author
*/
/**
*
* 代码由工具生成
*
**/
public class HighOilCardContactRecord implements Serializable {
private Long id;
/**
* 油卡id
*/
private Long oilCardId;
/**
* 内容
*/
private String content;
/**
* 状态 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 getOilCardId() {
return oilCardId;
}
public void setOilCardId(Long oilCardId) {
this.oilCardId = oilCardId;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
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;
}
HighOilCardContactRecord other = (HighOilCardContactRecord) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getOilCardId() == null ? other.getOilCardId() == null : this.getOilCardId().equals(other.getOilCardId()))
&& (this.getContent() == null ? other.getContent() == null : this.getContent().equals(other.getContent()))
&& (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 + ((getOilCardId() == null) ? 0 : getOilCardId().hashCode());
result = prime * result + ((getContent() == null) ? 0 : getContent().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(", oilCardId=").append(oilCardId);
sb.append(", content=").append(content);
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();
}
}

@ -0,0 +1,873 @@
package com.hai.entity;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class HighOilCardContactRecordExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
private Integer limit;
private Long offset;
public HighOilCardContactRecordExample() {
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 andOilCardIdIsNull() {
addCriterion("oil_card_id is null");
return (Criteria) this;
}
public Criteria andOilCardIdIsNotNull() {
addCriterion("oil_card_id is not null");
return (Criteria) this;
}
public Criteria andOilCardIdEqualTo(Long value) {
addCriterion("oil_card_id =", value, "oilCardId");
return (Criteria) this;
}
public Criteria andOilCardIdNotEqualTo(Long value) {
addCriterion("oil_card_id <>", value, "oilCardId");
return (Criteria) this;
}
public Criteria andOilCardIdGreaterThan(Long value) {
addCriterion("oil_card_id >", value, "oilCardId");
return (Criteria) this;
}
public Criteria andOilCardIdGreaterThanOrEqualTo(Long value) {
addCriterion("oil_card_id >=", value, "oilCardId");
return (Criteria) this;
}
public Criteria andOilCardIdLessThan(Long value) {
addCriterion("oil_card_id <", value, "oilCardId");
return (Criteria) this;
}
public Criteria andOilCardIdLessThanOrEqualTo(Long value) {
addCriterion("oil_card_id <=", value, "oilCardId");
return (Criteria) this;
}
public Criteria andOilCardIdIn(List<Long> values) {
addCriterion("oil_card_id in", values, "oilCardId");
return (Criteria) this;
}
public Criteria andOilCardIdNotIn(List<Long> values) {
addCriterion("oil_card_id not in", values, "oilCardId");
return (Criteria) this;
}
public Criteria andOilCardIdBetween(Long value1, Long value2) {
addCriterion("oil_card_id between", value1, value2, "oilCardId");
return (Criteria) this;
}
public Criteria andOilCardIdNotBetween(Long value1, Long value2) {
addCriterion("oil_card_id not between", value1, value2, "oilCardId");
return (Criteria) this;
}
public Criteria andContentIsNull() {
addCriterion("content is null");
return (Criteria) this;
}
public Criteria andContentIsNotNull() {
addCriterion("content is not null");
return (Criteria) this;
}
public Criteria andContentEqualTo(String value) {
addCriterion("content =", value, "content");
return (Criteria) this;
}
public Criteria andContentNotEqualTo(String value) {
addCriterion("content <>", value, "content");
return (Criteria) this;
}
public Criteria andContentGreaterThan(String value) {
addCriterion("content >", value, "content");
return (Criteria) this;
}
public Criteria andContentGreaterThanOrEqualTo(String value) {
addCriterion("content >=", value, "content");
return (Criteria) this;
}
public Criteria andContentLessThan(String value) {
addCriterion("content <", value, "content");
return (Criteria) this;
}
public Criteria andContentLessThanOrEqualTo(String value) {
addCriterion("content <=", value, "content");
return (Criteria) this;
}
public Criteria andContentLike(String value) {
addCriterion("content like", value, "content");
return (Criteria) this;
}
public Criteria andContentNotLike(String value) {
addCriterion("content not like", value, "content");
return (Criteria) this;
}
public Criteria andContentIn(List<String> values) {
addCriterion("content in", values, "content");
return (Criteria) this;
}
public Criteria andContentNotIn(List<String> values) {
addCriterion("content not in", values, "content");
return (Criteria) this;
}
public Criteria andContentBetween(String value1, String value2) {
addCriterion("content between", value1, value2, "content");
return (Criteria) this;
}
public Criteria andContentNotBetween(String value1, String value2) {
addCriterion("content not between", value1, value2, "content");
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 andOpUserIdIsNull() {
addCriterion("op_user_id is null");
return (Criteria) this;
}
public Criteria andOpUserIdIsNotNull() {
addCriterion("op_user_id is not null");
return (Criteria) this;
}
public Criteria andOpUserIdEqualTo(Long value) {
addCriterion("op_user_id =", value, "opUserId");
return (Criteria) this;
}
public Criteria andOpUserIdNotEqualTo(Long value) {
addCriterion("op_user_id <>", value, "opUserId");
return (Criteria) this;
}
public Criteria andOpUserIdGreaterThan(Long value) {
addCriterion("op_user_id >", value, "opUserId");
return (Criteria) this;
}
public Criteria andOpUserIdGreaterThanOrEqualTo(Long value) {
addCriterion("op_user_id >=", value, "opUserId");
return (Criteria) this;
}
public Criteria andOpUserIdLessThan(Long value) {
addCriterion("op_user_id <", value, "opUserId");
return (Criteria) this;
}
public Criteria andOpUserIdLessThanOrEqualTo(Long value) {
addCriterion("op_user_id <=", value, "opUserId");
return (Criteria) this;
}
public Criteria andOpUserIdIn(List<Long> values) {
addCriterion("op_user_id in", values, "opUserId");
return (Criteria) this;
}
public Criteria andOpUserIdNotIn(List<Long> values) {
addCriterion("op_user_id not in", values, "opUserId");
return (Criteria) this;
}
public Criteria andOpUserIdBetween(Long value1, Long value2) {
addCriterion("op_user_id between", value1, value2, "opUserId");
return (Criteria) this;
}
public Criteria andOpUserIdNotBetween(Long value1, Long value2) {
addCriterion("op_user_id not between", value1, value2, "opUserId");
return (Criteria) this;
}
public Criteria andOpUserNameIsNull() {
addCriterion("op_user_name is null");
return (Criteria) this;
}
public Criteria andOpUserNameIsNotNull() {
addCriterion("op_user_name is not null");
return (Criteria) this;
}
public Criteria andOpUserNameEqualTo(String value) {
addCriterion("op_user_name =", value, "opUserName");
return (Criteria) this;
}
public Criteria andOpUserNameNotEqualTo(String value) {
addCriterion("op_user_name <>", value, "opUserName");
return (Criteria) this;
}
public Criteria andOpUserNameGreaterThan(String value) {
addCriterion("op_user_name >", value, "opUserName");
return (Criteria) this;
}
public Criteria andOpUserNameGreaterThanOrEqualTo(String value) {
addCriterion("op_user_name >=", value, "opUserName");
return (Criteria) this;
}
public Criteria andOpUserNameLessThan(String value) {
addCriterion("op_user_name <", value, "opUserName");
return (Criteria) this;
}
public Criteria andOpUserNameLessThanOrEqualTo(String value) {
addCriterion("op_user_name <=", value, "opUserName");
return (Criteria) this;
}
public Criteria andOpUserNameLike(String value) {
addCriterion("op_user_name like", value, "opUserName");
return (Criteria) this;
}
public Criteria andOpUserNameNotLike(String value) {
addCriterion("op_user_name not like", value, "opUserName");
return (Criteria) this;
}
public Criteria andOpUserNameIn(List<String> values) {
addCriterion("op_user_name in", values, "opUserName");
return (Criteria) this;
}
public Criteria andOpUserNameNotIn(List<String> values) {
addCriterion("op_user_name not in", values, "opUserName");
return (Criteria) this;
}
public Criteria andOpUserNameBetween(String value1, String value2) {
addCriterion("op_user_name between", value1, value2, "opUserName");
return (Criteria) this;
}
public Criteria andOpUserNameNotBetween(String value1, String value2) {
addCriterion("op_user_name not between", value1, value2, "opUserName");
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);
}
}
}

@ -246,6 +246,76 @@ public class HighOilCardExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andCompanyNameIsNull() {
addCriterion("company_name is null");
return (Criteria) this;
}
public Criteria andCompanyNameIsNotNull() {
addCriterion("company_name is not null");
return (Criteria) this;
}
public Criteria andCompanyNameEqualTo(String value) {
addCriterion("company_name =", value, "companyName");
return (Criteria) this;
}
public Criteria andCompanyNameNotEqualTo(String value) {
addCriterion("company_name <>", value, "companyName");
return (Criteria) this;
}
public Criteria andCompanyNameGreaterThan(String value) {
addCriterion("company_name >", value, "companyName");
return (Criteria) this;
}
public Criteria andCompanyNameGreaterThanOrEqualTo(String value) {
addCriterion("company_name >=", value, "companyName");
return (Criteria) this;
}
public Criteria andCompanyNameLessThan(String value) {
addCriterion("company_name <", value, "companyName");
return (Criteria) this;
}
public Criteria andCompanyNameLessThanOrEqualTo(String value) {
addCriterion("company_name <=", value, "companyName");
return (Criteria) this;
}
public Criteria andCompanyNameLike(String value) {
addCriterion("company_name like", value, "companyName");
return (Criteria) this;
}
public Criteria andCompanyNameNotLike(String value) {
addCriterion("company_name not like", value, "companyName");
return (Criteria) this;
}
public Criteria andCompanyNameIn(List<String> values) {
addCriterion("company_name in", values, "companyName");
return (Criteria) this;
}
public Criteria andCompanyNameNotIn(List<String> values) {
addCriterion("company_name not in", values, "companyName");
return (Criteria) this;
}
public Criteria andCompanyNameBetween(String value1, String value2) {
addCriterion("company_name between", value1, value2, "companyName");
return (Criteria) this;
}
public Criteria andCompanyNameNotBetween(String value1, String value2) {
addCriterion("company_name not between", value1, value2, "companyName");
return (Criteria) this;
}
public Criteria andOrgIdIsNull() { public Criteria andOrgIdIsNull() {
addCriterion("org_id is null"); addCriterion("org_id is null");
return (Criteria) this; return (Criteria) this;
@ -306,6 +376,76 @@ public class HighOilCardExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andOrgNameIsNull() {
addCriterion("org_name is null");
return (Criteria) this;
}
public Criteria andOrgNameIsNotNull() {
addCriterion("org_name is not null");
return (Criteria) this;
}
public Criteria andOrgNameEqualTo(String value) {
addCriterion("org_name =", value, "orgName");
return (Criteria) this;
}
public Criteria andOrgNameNotEqualTo(String value) {
addCriterion("org_name <>", value, "orgName");
return (Criteria) this;
}
public Criteria andOrgNameGreaterThan(String value) {
addCriterion("org_name >", value, "orgName");
return (Criteria) this;
}
public Criteria andOrgNameGreaterThanOrEqualTo(String value) {
addCriterion("org_name >=", value, "orgName");
return (Criteria) this;
}
public Criteria andOrgNameLessThan(String value) {
addCriterion("org_name <", value, "orgName");
return (Criteria) this;
}
public Criteria andOrgNameLessThanOrEqualTo(String value) {
addCriterion("org_name <=", value, "orgName");
return (Criteria) this;
}
public Criteria andOrgNameLike(String value) {
addCriterion("org_name like", value, "orgName");
return (Criteria) this;
}
public Criteria andOrgNameNotLike(String value) {
addCriterion("org_name not like", value, "orgName");
return (Criteria) this;
}
public Criteria andOrgNameIn(List<String> values) {
addCriterion("org_name in", values, "orgName");
return (Criteria) this;
}
public Criteria andOrgNameNotIn(List<String> values) {
addCriterion("org_name not in", values, "orgName");
return (Criteria) this;
}
public Criteria andOrgNameBetween(String value1, String value2) {
addCriterion("org_name between", value1, value2, "orgName");
return (Criteria) this;
}
public Criteria andOrgNameNotBetween(String value1, String value2) {
addCriterion("org_name not between", value1, value2, "orgName");
return (Criteria) this;
}
public Criteria andCardNoIsNull() { public Criteria andCardNoIsNull() {
addCriterion("card_no is null"); addCriterion("card_no is null");
return (Criteria) this; return (Criteria) this;
@ -636,6 +776,126 @@ public class HighOilCardExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andBindStatusIsNull() {
addCriterion("bind_status is null");
return (Criteria) this;
}
public Criteria andBindStatusIsNotNull() {
addCriterion("bind_status is not null");
return (Criteria) this;
}
public Criteria andBindStatusEqualTo(Integer value) {
addCriterion("bind_status =", value, "bindStatus");
return (Criteria) this;
}
public Criteria andBindStatusNotEqualTo(Integer value) {
addCriterion("bind_status <>", value, "bindStatus");
return (Criteria) this;
}
public Criteria andBindStatusGreaterThan(Integer value) {
addCriterion("bind_status >", value, "bindStatus");
return (Criteria) this;
}
public Criteria andBindStatusGreaterThanOrEqualTo(Integer value) {
addCriterion("bind_status >=", value, "bindStatus");
return (Criteria) this;
}
public Criteria andBindStatusLessThan(Integer value) {
addCriterion("bind_status <", value, "bindStatus");
return (Criteria) this;
}
public Criteria andBindStatusLessThanOrEqualTo(Integer value) {
addCriterion("bind_status <=", value, "bindStatus");
return (Criteria) this;
}
public Criteria andBindStatusIn(List<Integer> values) {
addCriterion("bind_status in", values, "bindStatus");
return (Criteria) this;
}
public Criteria andBindStatusNotIn(List<Integer> values) {
addCriterion("bind_status not in", values, "bindStatus");
return (Criteria) this;
}
public Criteria andBindStatusBetween(Integer value1, Integer value2) {
addCriterion("bind_status between", value1, value2, "bindStatus");
return (Criteria) this;
}
public Criteria andBindStatusNotBetween(Integer value1, Integer value2) {
addCriterion("bind_status not between", value1, value2, "bindStatus");
return (Criteria) this;
}
public Criteria andBindTimeIsNull() {
addCriterion("bind_time is null");
return (Criteria) this;
}
public Criteria andBindTimeIsNotNull() {
addCriterion("bind_time is not null");
return (Criteria) this;
}
public Criteria andBindTimeEqualTo(Date value) {
addCriterion("bind_time =", value, "bindTime");
return (Criteria) this;
}
public Criteria andBindTimeNotEqualTo(Date value) {
addCriterion("bind_time <>", value, "bindTime");
return (Criteria) this;
}
public Criteria andBindTimeGreaterThan(Date value) {
addCriterion("bind_time >", value, "bindTime");
return (Criteria) this;
}
public Criteria andBindTimeGreaterThanOrEqualTo(Date value) {
addCriterion("bind_time >=", value, "bindTime");
return (Criteria) this;
}
public Criteria andBindTimeLessThan(Date value) {
addCriterion("bind_time <", value, "bindTime");
return (Criteria) this;
}
public Criteria andBindTimeLessThanOrEqualTo(Date value) {
addCriterion("bind_time <=", value, "bindTime");
return (Criteria) this;
}
public Criteria andBindTimeIn(List<Date> values) {
addCriterion("bind_time in", values, "bindTime");
return (Criteria) this;
}
public Criteria andBindTimeNotIn(List<Date> values) {
addCriterion("bind_time not in", values, "bindTime");
return (Criteria) this;
}
public Criteria andBindTimeBetween(Date value1, Date value2) {
addCriterion("bind_time between", value1, value2, "bindTime");
return (Criteria) this;
}
public Criteria andBindTimeNotBetween(Date value1, Date value2) {
addCriterion("bind_time not between", value1, value2, "bindTime");
return (Criteria) this;
}
public Criteria andCreateTimeIsNull() { public Criteria andCreateTimeIsNull() {
addCriterion("create_time is null"); addCriterion("create_time is null");
return (Criteria) this; return (Criteria) this;
@ -756,6 +1016,136 @@ public class HighOilCardExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andOpUserIdIsNull() {
addCriterion("op_user_id is null");
return (Criteria) this;
}
public Criteria andOpUserIdIsNotNull() {
addCriterion("op_user_id is not null");
return (Criteria) this;
}
public Criteria andOpUserIdEqualTo(Long value) {
addCriterion("op_user_id =", value, "opUserId");
return (Criteria) this;
}
public Criteria andOpUserIdNotEqualTo(Long value) {
addCriterion("op_user_id <>", value, "opUserId");
return (Criteria) this;
}
public Criteria andOpUserIdGreaterThan(Long value) {
addCriterion("op_user_id >", value, "opUserId");
return (Criteria) this;
}
public Criteria andOpUserIdGreaterThanOrEqualTo(Long value) {
addCriterion("op_user_id >=", value, "opUserId");
return (Criteria) this;
}
public Criteria andOpUserIdLessThan(Long value) {
addCriterion("op_user_id <", value, "opUserId");
return (Criteria) this;
}
public Criteria andOpUserIdLessThanOrEqualTo(Long value) {
addCriterion("op_user_id <=", value, "opUserId");
return (Criteria) this;
}
public Criteria andOpUserIdIn(List<Long> values) {
addCriterion("op_user_id in", values, "opUserId");
return (Criteria) this;
}
public Criteria andOpUserIdNotIn(List<Long> values) {
addCriterion("op_user_id not in", values, "opUserId");
return (Criteria) this;
}
public Criteria andOpUserIdBetween(Long value1, Long value2) {
addCriterion("op_user_id between", value1, value2, "opUserId");
return (Criteria) this;
}
public Criteria andOpUserIdNotBetween(Long value1, Long value2) {
addCriterion("op_user_id not between", value1, value2, "opUserId");
return (Criteria) this;
}
public Criteria andOpUserNameIsNull() {
addCriterion("op_user_name is null");
return (Criteria) this;
}
public Criteria andOpUserNameIsNotNull() {
addCriterion("op_user_name is not null");
return (Criteria) this;
}
public Criteria andOpUserNameEqualTo(String value) {
addCriterion("op_user_name =", value, "opUserName");
return (Criteria) this;
}
public Criteria andOpUserNameNotEqualTo(String value) {
addCriterion("op_user_name <>", value, "opUserName");
return (Criteria) this;
}
public Criteria andOpUserNameGreaterThan(String value) {
addCriterion("op_user_name >", value, "opUserName");
return (Criteria) this;
}
public Criteria andOpUserNameGreaterThanOrEqualTo(String value) {
addCriterion("op_user_name >=", value, "opUserName");
return (Criteria) this;
}
public Criteria andOpUserNameLessThan(String value) {
addCriterion("op_user_name <", value, "opUserName");
return (Criteria) this;
}
public Criteria andOpUserNameLessThanOrEqualTo(String value) {
addCriterion("op_user_name <=", value, "opUserName");
return (Criteria) this;
}
public Criteria andOpUserNameLike(String value) {
addCriterion("op_user_name like", value, "opUserName");
return (Criteria) this;
}
public Criteria andOpUserNameNotLike(String value) {
addCriterion("op_user_name not like", value, "opUserName");
return (Criteria) this;
}
public Criteria andOpUserNameIn(List<String> values) {
addCriterion("op_user_name in", values, "opUserName");
return (Criteria) this;
}
public Criteria andOpUserNameNotIn(List<String> values) {
addCriterion("op_user_name not in", values, "opUserName");
return (Criteria) this;
}
public Criteria andOpUserNameBetween(String value1, String value2) {
addCriterion("op_user_name between", value1, value2, "opUserName");
return (Criteria) this;
}
public Criteria andOpUserNameNotBetween(String value1, String value2) {
addCriterion("op_user_name not between", value1, value2, "opUserName");
return (Criteria) this;
}
public Criteria andExt1IsNull() { public Criteria andExt1IsNull() {
addCriterion("ext_1 is null"); addCriterion("ext_1 is null");
return (Criteria) this; return (Criteria) this;

@ -22,7 +22,7 @@ public class HighOilCardRecord implements Serializable {
private Long oilCardId; private Long oilCardId;
/** /**
* 类型 1进账 2出账 3变更手机号 * 类型 1进账 2出账
*/ */
private Integer type; private Integer type;
@ -42,7 +42,7 @@ public class HighOilCardRecord implements Serializable {
private BigDecimal afterAmount; private BigDecimal afterAmount;
/** /**
* 来源类型 1. 金额充值 2.绑定手机号 3. 变更手机号 4. 消费订单 * 来源类型 1. 金额充值 2. 消费订单
*/ */
private Integer sourceType; private Integer sourceType;

@ -0,0 +1,35 @@
package com.hai.enum_type;
/**
* 油卡绑定状态
* @author hurui
*/
public enum OilCardBindStatusEnum {
status0(0 , "未绑定"),
status1(1 , "已绑定"),
;
private Integer status;
private String name;
OilCardBindStatusEnum(int status , String name) {
this.status = status;
this.name = name;
}
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}

@ -0,0 +1,35 @@
package com.hai.enum_type;
/**
* 油卡记录
* @author hurui
*/
public enum OilCardRecordSourceTypeEnum {
type1(1 , "充值金额"),
type2(2 , "订单消费"),
;
private Integer type;
private String name;
OilCardRecordSourceTypeEnum(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,35 @@
package com.hai.enum_type;
/**
* 油卡记录
* @author hurui
*/
public enum OilCardRecordTypeEnum {
type1(1 , "进账"),
type2(2 , "出账"),
;
private Integer type;
private String name;
OilCardRecordTypeEnum(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 OilCardStatusEnum {
status0(0 , "删除"),
status1(1 , "正常"),
status2(2 , "禁用"),
;
private Integer status;
private String name;
OilCardStatusEnum(int status , String name) {
this.status = status;
this.name = name;
}
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}

@ -0,0 +1,24 @@
package com.hai.service;
import com.hai.entity.HighCompanyTwoPwd;
/**
* 公司二级密码
* @author hurui
*/
public interface HighCompanyTwoPwdService {
/**
* 编辑二级密码
* @param companyTwoPwd
*/
void editData(HighCompanyTwoPwd companyTwoPwd);
/**
* 根据部门查询二级密码
* @param orgId
* @return
*/
HighCompanyTwoPwd getTwoPwdByOrg(Long orgId);
}

@ -0,0 +1,27 @@
package com.hai.service;
import com.hai.entity.HighOilCardContactRecord;
import java.util.List;
import java.util.Map;
/**
* 油卡联系人变更记录
* @author hurui
*/
public interface HighOilCardContactRecordService {
/**
* 增加
* @param oilCardId
* @param content
*/
void insert(Long oilCardId,String content);
/**
* 查询记录列表
* @param param
* @return
*/
List<HighOilCardContactRecord> getRecordList(Map<String,Object> param);
}

@ -0,0 +1,26 @@
package com.hai.service;
import com.hai.entity.HighOilCardRecord;
import java.util.List;
import java.util.Map;
/**
* 油卡进账出账记录
* @author hurui
*/
public interface HighOilCardRecordService {
/**
* 增加记录
* @param oilCardRecord
*/
void insertRecord(HighOilCardRecord oilCardRecord);
/**
* 查询记录列表
* @param map
* @return
*/
List<HighOilCardRecord> getRecordList(Map<String, Object> map);
}

@ -0,0 +1,77 @@
package com.hai.service;
import com.hai.entity.HighOilCard;
import java.math.BigDecimal;
import java.util.List;
import java.util.Map;
/**
* 油卡
* @author hurui
*/
public interface HighOilCardService {
/**
* 编辑数据
* @param oilCard
*/
void editData(HighOilCard oilCard);
/**
* 油卡充值
* @param cardNo 油卡卡号
* @param price 充值金额
* @param orgId 部门id
*/
void recharge(String cardNo, BigDecimal price, Long orgId);
/**
* 生成油卡
* @param orgId 部门id
* @param generateNum 生成数量
*/
void generateCard(Long orgId, Integer generateNum);
/**
* 绑定联系人
* @param cardNo 卡号
* @param contactName 联系人名称
* @param contactPhone 联系人手机号
*/
void setContact(String cardNo,String contactName, String contactPhone);
/**
* 禁用
* @param cardNo 卡号
*/
void disabled(String cardNo);
/**
* 启用
* @param cardNo 卡号
*/
void enable(String cardNo);
/**
* 根据手机号查询油卡
* @param phone 手机号
* @return
*/
HighOilCard getOilCardByPhone(String phone);
/**
* 根据卡号查询油卡
* @param cardNo 卡号
* @return
*/
HighOilCard getOilCardByCardNo(String cardNo);
/**
* 查询油卡列表
* @param param 参数
* @return
*/
List<HighOilCard> getOilCardList(Map<String,Object> param);
}

@ -4,6 +4,7 @@ import com.hai.common.exception.ErrorCode;
import com.hai.common.exception.ErrorHelp; import com.hai.common.exception.ErrorHelp;
import com.hai.common.exception.SysCode; import com.hai.common.exception.SysCode;
import com.hai.common.security.UserCenter; import com.hai.common.security.UserCenter;
import com.hai.common.utils.BankNumberUtil;
import com.hai.common.utils.RedisUtil; import com.hai.common.utils.RedisUtil;
import com.hai.dao.HighCompanyAccountMapper; import com.hai.dao.HighCompanyAccountMapper;
import com.hai.entity.*; import com.hai.entity.*;
@ -90,6 +91,7 @@ public class HighCompanyAccountServiceImpl implements HighCompanyAccountService
companyAccount.setCompanyId(organization.getCompanyId()); companyAccount.setCompanyId(organization.getCompanyId());
companyAccount.setOrgId(organization.getId()); companyAccount.setOrgId(organization.getId());
companyAccount.setAmounts(new BigDecimal("0")); companyAccount.setAmounts(new BigDecimal("0"));
companyAccount.setAccountNo(BankNumberUtil.getBrankNumber("6"));
} }
// 变更前金额 // 变更前金额
BigDecimal beforeAmount = companyAccount.getAmounts(); BigDecimal beforeAmount = companyAccount.getAmounts();
@ -144,7 +146,6 @@ public class HighCompanyAccountServiceImpl implements HighCompanyAccountService
if (companyAccount.getAmounts().compareTo(amount) == -1) { if (companyAccount.getAmounts().compareTo(amount) == -1) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "余额不足"); throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "余额不足");
} }
// 变更前金额 // 变更前金额
BigDecimal beforeAmount = companyAccount.getAmounts(); BigDecimal beforeAmount = companyAccount.getAmounts();
// 计算金额 // 计算金额

@ -0,0 +1,42 @@
package com.hai.service.impl;
import com.hai.dao.HighCompanyTwoPwdMapper;
import com.hai.entity.HighCompanyTwoPwd;
import com.hai.entity.HighCompanyTwoPwdExample;
import com.hai.service.HighCompanyTwoPwdService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.Date;
import java.util.List;
@Service("companyTwoPwdService")
public class HighCompanyTwoPwdServiceImpl implements HighCompanyTwoPwdService {
@Resource
private HighCompanyTwoPwdMapper companyTwoPwdMapper;
@Override
public void editData(HighCompanyTwoPwd companyTwoPwd) {
if (companyTwoPwd.getId() == null) {
companyTwoPwd.setCreateTime(new Date());
companyTwoPwd.setUpdateTime(new Date());
companyTwoPwd.setStatus(1);
companyTwoPwdMapper.insert(companyTwoPwd);
} else {
companyTwoPwd.setUpdateTime(new Date());
companyTwoPwdMapper.updateByPrimaryKey(companyTwoPwd);
}
}
@Override
public HighCompanyTwoPwd getTwoPwdByOrg(Long orgId) {
HighCompanyTwoPwdExample example = new HighCompanyTwoPwdExample();
example.createCriteria().andStatusEqualTo(1).andOrgIdEqualTo(orgId);
List<HighCompanyTwoPwd> list = companyTwoPwdMapper.selectByExample(example);
if (list.size() > 0) {
return list.get(0);
}
return null;
}
}

@ -0,0 +1,52 @@
package com.hai.service.impl;
import com.hai.common.security.UserCenter;
import com.hai.dao.HighOilCardContactRecordMapper;
import com.hai.entity.HighOilCardContactRecord;
import com.hai.entity.HighOilCardContactRecordExample;
import com.hai.model.UserInfoModel;
import com.hai.service.HighOilCardContactRecordService;
import org.apache.commons.collections4.MapUtils;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.Date;
import java.util.List;
import java.util.Map;
@Service("oilCardContactRecordService")
public class HighOilCardContactRecordServiceImpl implements HighOilCardContactRecordService {
@Resource
private HighOilCardContactRecordMapper oilCardContactRecordMapper;
@Resource
private UserCenter userCenter;
@Override
public void insert(Long oilCardId, String content) {
UserInfoModel userInfoModel = userCenter.getSessionModel(UserInfoModel.class);
HighOilCardContactRecord record = new HighOilCardContactRecord();
record.setOilCardId(oilCardId);
record.setContent(content);
record.setCreateTime(new Date());
record.setStatus(1);
record.setOpUserId(userInfoModel.getSecUser().getId());
record.setOpUserName(userInfoModel.getSecUser().getUserName());
oilCardContactRecordMapper.insert(record);
}
@Override
public List<HighOilCardContactRecord> getRecordList(Map<String, Object> param) {
HighOilCardContactRecordExample example = new HighOilCardContactRecordExample();
HighOilCardContactRecordExample.Criteria criteria = example.createCriteria().andStatusEqualTo(1);
if (MapUtils.getLong(param, "oilCardId") != null) {
criteria.andOilCardIdEqualTo(MapUtils.getLong(param, "oilCardId"));
}
example.setOrderByClause("create_time desc");
return oilCardContactRecordMapper.selectByExample(example);
}
}

@ -0,0 +1,57 @@
package com.hai.service.impl;
import com.hai.common.security.UserCenter;
import com.hai.dao.HighOilCardRecordMapper;
import com.hai.entity.HighOilCardRecord;
import com.hai.entity.HighOilCardRecordExample;
import com.hai.model.UserInfoModel;
import com.hai.service.HighOilCardRecordService;
import org.apache.commons.collections4.MapUtils;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.Date;
import java.util.List;
import java.util.Map;
@Service("oilCardRecordService")
public class HighOilCardRecordServiceImpl implements HighOilCardRecordService {
@Resource
private HighOilCardRecordMapper oilCardRecordMapper;
@Resource
private UserCenter userCenter;
@Override
public void insertRecord(HighOilCardRecord oilCardRecord) {
UserInfoModel userInfoModel = userCenter.getSessionModel(UserInfoModel.class);
oilCardRecord.setCreateTime(new Date());
oilCardRecord.setStatus(1);
oilCardRecord.setOpUserId(userInfoModel.getSecUser().getId());
oilCardRecord.setOpUserName(userInfoModel.getSecUser().getUserName());
oilCardRecordMapper.insert(oilCardRecord);
}
@Override
public List<HighOilCardRecord> getRecordList(Map<String, Object> map) {
HighOilCardRecordExample example = new HighOilCardRecordExample();
HighOilCardRecordExample.Criteria criteria = example.createCriteria().andStatusEqualTo(1);
if (MapUtils.getLong(map, "oilCardId") == null) {
criteria.andOilCardIdEqualTo(MapUtils.getLong(map, "oilCardId"));
}
if (MapUtils.getInteger(map, "type") == null) {
criteria.andTypeEqualTo(MapUtils.getInteger(map, "type"));
}
if (MapUtils.getInteger(map, "sourceType") == null) {
criteria.andSourceTypeEqualTo(MapUtils.getInteger(map, "sourceType"));
}
example.setOrderByClause("create_time desc");
return oilCardRecordMapper.selectByExample(example);
}
}

@ -0,0 +1,274 @@
package com.hai.service.impl;
import com.hai.common.exception.ErrorCode;
import com.hai.common.exception.ErrorHelp;
import com.hai.common.exception.SysCode;
import com.hai.common.security.AESEncodeUtil;
import com.hai.common.security.UserCenter;
import com.hai.common.utils.BankNumberUtil;
import com.hai.dao.HighOilCardMapper;
import com.hai.entity.*;
import com.hai.enum_type.OilCardBindStatusEnum;
import com.hai.enum_type.OilCardRecordTypeEnum;
import com.hai.enum_type.OilCardStatusEnum;
import com.hai.model.UserInfoModel;
import com.hai.service.*;
import org.apache.commons.collections4.MapUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Isolation;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.util.*;
@Service("oilCardService")
public class HighOilCardServiceImpl implements HighOilCardService {
@Resource
private HighOilCardMapper oilCardMapper;
@Resource
private HighOilCardContactRecordService oilCardContactRecordService;
@Resource
private HighOilCardRecordService oilCardRecordService;
@Resource
private BsOrganizationService organizationService;
@Resource
private BsCompanyService companyService;
@Resource
private HighCompanyAccountService companyAccountService;
@Resource
private UserCenter userCenter;
@Override
public void editData(HighOilCard oilCard) {
if (oilCard.getId() == null) {
oilCard.setCreateTime(new Date());
oilCard.setUpdateTime(new Date());
oilCard.setStatus(OilCardStatusEnum.status1.getStatus());
oilCard.setBindStatus(OilCardBindStatusEnum.status0.getStatus());
oilCardMapper.insert(oilCard);
} else {
oilCard.setUpdateTime(new Date());
oilCardMapper.updateByPrimaryKey(oilCard);
}
}
@Override
@Transactional(rollbackFor=Exception.class,isolation = Isolation.SERIALIZABLE,propagation= Propagation.REQUIRES_NEW)
public synchronized void recharge(String cardNo, BigDecimal price, Long orgId) {
HighOilCard oilCard = getOilCardByCardNo(cardNo);
if (oilCard == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到部门");
}
if (!oilCard.getStatus().equals(OilCardStatusEnum.status1.getStatus())) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "油卡不处于正常状态");
}
// 账户扣款
Map<String, Object> consumeType = new HashMap<>();
consumeType.put("sourceType", "2");
consumeType.put("sourceId", oilCard.getId());
consumeType.put("sourceContent", "油卡:"+oilCard.getCardNo()+",充值:"+price.toString());
companyAccountService.consume(orgId, price, consumeType);
// 变更前金额
BigDecimal beforeAmount = oilCard.getAmount();
// 计算金额
oilCard.setAmount(oilCard.getAmount().add(price));
editData(oilCard);
// 变更后金额
BigDecimal afterAmount = oilCard.getAmount();
HighOilCardRecord record = new HighOilCardRecord();
record.setOilCardId(oilCard.getId());
record.setType(OilCardRecordTypeEnum.type1.getType());
record.setAmount(price);
record.setBeforeAmount(beforeAmount);
record.setAfterAmount(afterAmount);
record.setSourceContent("充值油卡金额:" + record.getAmount());
oilCardRecordService.insertRecord(record);
}
@Override
@Transactional(propagation= Propagation.REQUIRES_NEW, rollbackFor = Exception.class)
public void generateCard(Long orgId, Integer generateNum) {
UserInfoModel userInfoModel = userCenter.getSessionModel(UserInfoModel.class);
// 查询部门信息
BsOrganization organization = organizationService.findById(orgId);
if (organization == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到部门");
}
BsCompany company = companyService.getCompanyById(organization.getCompanyId());
List<HighOilCard> oilCardList = new ArrayList<>();
HighOilCard oilCard;
for (int i = 0; i < generateNum; i++) {
oilCard = new HighOilCard();
oilCard.setCompanyId(organization.getCompanyId());
oilCard.setCompanyName(company.getName());
oilCard.setOrgId(organization.getId());
oilCard.setOrgName(organization.getName());
oilCard.setAmount(new BigDecimal("0"));
oilCard.setCardNo(BankNumberUtil.getBrankNumber("8"));
oilCard.setOpUserId(userInfoModel.getSecUser().getId());
oilCard.setOpUserName(userInfoModel.getSecUser().getUserName());
oilCard.setCreateTime(new Date());
oilCard.setUpdateTime(new Date());
oilCard.setStatus(OilCardStatusEnum.status1.getStatus());
oilCard.setBindStatus(OilCardBindStatusEnum.status0.getStatus());
oilCardList.add(oilCard);
}
oilCardMapper.insertList(oilCardList);
}
@Override
@Transactional(propagation= Propagation.REQUIRES_NEW, rollbackFor = Exception.class)
public void setContact(String cardNo, String contactName, String contactPhone) {
// 查询油卡
HighOilCard oilCard = getOilCardByCardNo(cardNo);
if (oilCard == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到油卡");
}
// 查询手机号是否绑定油卡
HighOilCard phone = getOilCardByPhone(contactPhone);
if (phone != null && !phone.getId().equals(oilCard.getId())) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "联系电话已绑定其他油卡");
}
oilCard.setContactName(contactName);
oilCard.setContactPhone(contactPhone);
editData(oilCard);
// 绑定状态 0:未绑定 1:已绑定
if (oilCard.getBindStatus() == 1) {
oilCardContactRecordService.insert(oilCard.getId(), "新设置:联系人【"+oilCard.getContactName()+"】,联系电话【"+oilCard.getContactPhone()+"】");
} else {
oilCardContactRecordService.insert(oilCard.getId(), "联系信息变更:原来联系人【"+oilCard.getContactName()+"】,联系电话【"+oilCard.getContactPhone()+"】。" +
"变跟后联系人【"+oilCard.getContactName()+ "】,联系电话【"+oilCard.getContactPhone()+"】");
}
}
@Override
public void disabled(String cardNo) {
// 查询油卡
HighOilCard oilCard = getOilCardByCardNo(cardNo);
if (oilCard == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到油卡");
}
if (!oilCard.getStatus().equals(OilCardStatusEnum.status1.getStatus())) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "油卡状态错误");
}
oilCard.setStatus(OilCardStatusEnum.status2.getStatus());
editData(oilCard);
oilCardContactRecordService.insert(oilCard.getId(), "禁用油卡");
}
@Override
public void enable(String cardNo) {
// 查询油卡
HighOilCard oilCard = getOilCardByCardNo(cardNo);
if (oilCard == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到油卡");
}
if (!oilCard.getStatus().equals(OilCardStatusEnum.status2.getStatus())) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "油卡状态错误");
}
oilCard.setStatus(OilCardStatusEnum.status1.getStatus());
editData(oilCard);
oilCardContactRecordService.insert(oilCard.getId(), "启用油卡");
}
@Override
public HighOilCard getOilCardByPhone(String phone) {
HighOilCardExample example = new HighOilCardExample();
example.createCriteria().andStatusNotEqualTo(0).andContactPhoneEqualTo(phone);
List<HighOilCard> list = oilCardMapper.selectByExample(example);
if (list.size() > 0) {
return list.get(0);
}
return null;
}
@Override
public HighOilCard getOilCardByCardNo(String cardNo) {
HighOilCardExample example = new HighOilCardExample();
example.createCriteria().andStatusNotEqualTo(0).andCardNoEqualTo(cardNo);
List<HighOilCard> list = oilCardMapper.selectByExample(example);
if (list.size() > 0) {
return list.get(0);
}
return null;
}
@Override
public List<HighOilCard> getOilCardList(Map<String, Object> param) {
HighOilCardExample example = new HighOilCardExample();
HighOilCardExample.Criteria criteria = example.createCriteria().andStatusNotEqualTo(0);
if (MapUtils.getLong(param, "companyId") != null) {
criteria.andCompanyIdEqualTo(MapUtils.getLong(param, "companyId"));
}
if (MapUtils.getLong(param, "orgId") != null) {
criteria.andOrgIdEqualTo(MapUtils.getLong(param, "orgId"));
}
if (StringUtils.isNotBlank(MapUtils.getString(param, "cardNo"))) {
criteria.andCardNoLike("%" + MapUtils.getString(param, "cardNo") + "%");
}
if (StringUtils.isNotBlank(MapUtils.getString(param, "contactName"))) {
criteria.andContactNameLike("%" + MapUtils.getString(param, "contactName") + "%");
}
if (StringUtils.isNotBlank(MapUtils.getString(param, "contactPhone"))) {
criteria.andContactPhoneLike("%" + MapUtils.getString(param, "contactPhone") + "%");
}
if (MapUtils.getLong(param, "createTimeS") != null) {
criteria.andCreateTimeGreaterThanOrEqualTo(new Date(MapUtils.getLong(param, "createTimeS")));
}
if (MapUtils.getLong(param, "createTimeE") != null) {
criteria.andCreateTimeLessThanOrEqualTo(new Date(MapUtils.getLong(param, "createTimeE")));
}
if (MapUtils.getLong(param, "bindTimeS") != null) {
criteria.andBindTimeGreaterThanOrEqualTo(new Date(MapUtils.getLong(param, "bindTimeS")));
}
if (MapUtils.getLong(param, "bindTimeE") != null) {
criteria.andBindTimeLessThanOrEqualTo(new Date(MapUtils.getLong(param, "bindTimeE")));
}
if (MapUtils.getBoolean(param, "isConfigContact") != null) {
if (MapUtils.getBoolean(param, "isConfigContact") == true) {
criteria.andContactPhoneIsNotNull();
}
if (MapUtils.getBoolean(param, "isConfigContact") == false) {
criteria.andContactPhoneIsNull();
}
}
if (MapUtils.getInteger(param, "status") != null) {
criteria.andStatusEqualTo(MapUtils.getInteger(param, "status"));
}
if (MapUtils.getInteger(param, "bindStatus") != null) {
criteria.andBindStatusEqualTo(MapUtils.getInteger(param, "bindStatus"));
}
example.setOrderByClause("create_time desc");
return oilCardMapper.selectByExample(example);
}
}
Loading…
Cancel
Save