提交代码

dev-discount
胡锐 3 years ago
parent 6b6a54e8f3
commit 3339f4d680
  1. 59
      hai-bweb/src/main/java/com/bweb/controller/HighOilCardContactRecordController.java
  2. 115
      hai-bweb/src/main/java/com/bweb/controller/HighOilCardController.java
  3. 57
      hai-bweb/src/main/java/com/bweb/controller/HighOilCardRecordController.java
  4. 25
      hai-service/src/main/java/com/hai/dao/HighOilCardContactRecordMapper.java
  5. 14
      hai-service/src/main/java/com/hai/dao/HighOilCardContactRecordSqlProvider.java
  6. 35
      hai-service/src/main/java/com/hai/dao/HighOilCardMapper.java
  7. 2
      hai-service/src/main/java/com/hai/dao/HighOilCardMapperExt.java
  8. 17
      hai-service/src/main/java/com/hai/dao/HighOilCardRecordMapper.java
  9. 14
      hai-service/src/main/java/com/hai/dao/HighOilCardRecordSqlProvider.java
  10. 14
      hai-service/src/main/java/com/hai/dao/HighOilCardSqlProvider.java
  11. 16
      hai-service/src/main/java/com/hai/entity/HighOilCard.java
  12. 16
      hai-service/src/main/java/com/hai/entity/HighOilCardContactRecord.java
  13. 70
      hai-service/src/main/java/com/hai/entity/HighOilCardContactRecordExample.java
  14. 60
      hai-service/src/main/java/com/hai/entity/HighOilCardExample.java
  15. 18
      hai-service/src/main/java/com/hai/entity/HighOilCardRecord.java
  16. 70
      hai-service/src/main/java/com/hai/entity/HighOilCardRecordExample.java
  17. 2
      hai-service/src/main/java/com/hai/service/HighOilCardContactRecordService.java
  18. 16
      hai-service/src/main/java/com/hai/service/impl/HighOilCardContactRecordServiceImpl.java
  19. 19
      hai-service/src/main/java/com/hai/service/impl/HighOilCardRecordServiceImpl.java
  20. 10
      hai-service/src/main/java/com/hai/service/impl/HighOilCardServiceImpl.java

@ -0,0 +1,59 @@
package com.bweb.controller;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.hai.common.utils.ResponseMsgUtil;
import com.hai.model.ResponseData;
import com.hai.service.HighOilCardContactRecordService;
import com.hai.service.HighOilCardRecordService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Controller
@RequestMapping(value = "/oilCardContactRecord")
@Api(value = "油卡变更记录")
public class HighOilCardContactRecordController {
private static Logger log = LoggerFactory.getLogger(HighOilCardContactRecordController.class);
@Resource
private HighOilCardContactRecordService oilCardContactRecordService;
@RequestMapping(value = "/getOilCardContactRecordList", method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "查询油卡记录列表")
public ResponseData getOilCardContactRecordList(
@RequestParam(name = "cardNo", required = true) String cardNo,
@RequestParam(name = "createTimeS", required = false) Long createTimeS,
@RequestParam(name = "createTimeE", required = false) Long createTimeE,
@RequestParam(name = "pageNum", required = true) Integer pageNum,
@RequestParam(name = "pageSize", required = true) Integer pageSize) {
try {
Map<String, Object> param = new HashMap<>();
param.put("cardNo", cardNo);
param.put("createTimeS", createTimeS);
param.put("createTimeE", createTimeE);
PageHelper.startPage(pageNum, pageSize);
return ResponseMsgUtil.success(new PageInfo<>(oilCardContactRecordService.getRecordList(param)));
} catch (Exception e) {
log.error("HighOilCardRecordController --> getOilCardContactRecordList() error!", e);
return ResponseMsgUtil.exception(e);
}
}
}

@ -1,6 +1,8 @@
package com.bweb.controller; package com.bweb.controller;
import com.alibaba.excel.EasyExcel;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.bweb.config.SysConst;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import com.hai.common.exception.ErrorCode; import com.hai.common.exception.ErrorCode;
@ -10,7 +12,11 @@ import com.hai.common.security.AESEncodeUtil;
import com.hai.common.security.UserCenter; import com.hai.common.security.UserCenter;
import com.hai.common.utils.ResponseMsgUtil; import com.hai.common.utils.ResponseMsgUtil;
import com.hai.entity.HighCompanyTwoPwd; import com.hai.entity.HighCompanyTwoPwd;
import com.hai.entity.HighOilCard;
import com.hai.enum_type.OilCardStatusEnum;
import com.hai.enum_type.UserObjectTypeEnum;
import com.hai.model.ResponseData; import com.hai.model.ResponseData;
import com.hai.model.TyOrderModel;
import com.hai.model.UserInfoModel; import com.hai.model.UserInfoModel;
import com.hai.service.HighCompanyTwoPwdService; import com.hai.service.HighCompanyTwoPwdService;
import com.hai.service.HighOilCardService; import com.hai.service.HighOilCardService;
@ -23,7 +29,10 @@ import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.io.File;
import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.List;
import java.util.Map; import java.util.Map;
@Controller @Controller
@ -208,4 +217,110 @@ public class HighOilCardController {
return ResponseMsgUtil.exception(e); return ResponseMsgUtil.exception(e);
} }
} }
@RequestMapping(value = "/exportCard", method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "导出油卡")
public ResponseData exportCard(@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) {
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);
List<HighOilCard> cardList = oilCardService.getOilCardList(param);
List<String> headList = new ArrayList<>();
headList.add("卡号");
headList.add("余额");
headList.add("消费金额");
headList.add("联系人");
headList.add("联系电话");
headList.add("状态");
List<List<Object>> dataList = new ArrayList<>();
List<Object> data;
for (HighOilCard card: cardList) {
data = new ArrayList<>();
data.add(card.getCardNo());
data.add(card.getAmount());
data.add(card.getAmountConsume());
if (StringUtils.isNotBlank(card.getContactName())) {
data.add(card.getContactName());
} else {
data.add("未设置");
}
if (StringUtils.isNotBlank(card.getContactPhone())) {
data.add(card.getContactName());
} else {
data.add("未设置");
}
if (card.getStatus().equals(OilCardStatusEnum.status1.getStatus())) {
data.add("正常");
} else if (card.getStatus().equals(OilCardStatusEnum.status2.getStatus())) {
data.add("禁用");
}
dataList.add(data);
}
String fileUrl = SysConst.getSysConfig().getFileUrl() + "/temporary/";
String pathName = System.currentTimeMillis()+".xlsx";
File file = new File(fileUrl);
if (!file.exists()) {
file.mkdirs();
}
EasyExcel.write(fileUrl+pathName).head(generationHead(headList)).sheet("油卡").doWrite(dataList);
return ResponseMsgUtil.success(pathName);
} catch (Exception e) {
log.error("HighOilCardController --> exportCard() error!", e);
return ResponseMsgUtil.exception(e);
}
}
/**
* 生成头部
* @param headList
* @return
*/
private static List<List<String>> generationHead(List<String> headList) {
List<List<String>> list = new ArrayList<>();
List<String> head;
for (String headStr : headList) {
head = new ArrayList<>();
head.add(headStr);
list.add(head);
}
return list;
}
} }

@ -0,0 +1,57 @@
package com.bweb.controller;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.hai.common.utils.ResponseMsgUtil;
import com.hai.model.ResponseData;
import com.hai.service.HighOilCardRecordService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.HashMap;
import java.util.Map;
@Controller
@RequestMapping(value = "/oilCardRecord")
@Api(value = "油卡记录")
public class HighOilCardRecordController {
private static Logger log = LoggerFactory.getLogger(HighOilCardRecordController.class);
@Resource
private HighOilCardRecordService oilCardRecordService;
@RequestMapping(value = "/getOilCardRecordList", method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "查询油卡记录列表")
public ResponseData getOilCardRecordList(@RequestParam(name = "cardNo", required = true) String cardNo,
@RequestParam(name = "type", required = false) Integer type,
@RequestParam(name = "sourceType", required = false) String sourceType,
@RequestParam(name = "createTimeS", required = false) Long createTimeS,
@RequestParam(name = "createTimeE", required = false) Long createTimeE,
@RequestParam(name = "pageNum", required = true) Integer pageNum,
@RequestParam(name = "pageSize", required = true) Integer pageSize) {
try {
Map<String, Object> param = new HashMap<>();
param.put("cardNo", cardNo);
param.put("type", type);
param.put("sourceType", sourceType);
param.put("createTimeS", createTimeS);
param.put("createTimeE", createTimeE);
PageHelper.startPage(pageNum, pageSize);
return ResponseMsgUtil.success(new PageInfo<>(oilCardRecordService.getRecordList(param)));
} catch (Exception e) {
log.error("HighOilCardRecordController --> getOilCardRecordList() error!", e);
return ResponseMsgUtil.exception(e);
}
}
}

@ -39,14 +39,16 @@ public interface HighOilCardContactRecordMapper extends HighOilCardContactRecord
int deleteByPrimaryKey(Long id); int deleteByPrimaryKey(Long id);
@Insert({ @Insert({
"insert into high_oil_card_contact_record (oil_card_id, content, ", "insert into high_oil_card_contact_record (oil_card_id, card_no, ",
"`status`, create_time, ", "content, `status`, ",
"op_user_id, op_user_name, ", "create_time, op_user_id, ",
"ext_1, ext_2, ext_3)", "op_user_name, ext_1, ",
"values (#{oilCardId,jdbcType=BIGINT}, #{content,jdbcType=VARCHAR}, ", "ext_2, ext_3)",
"#{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, ", "values (#{oilCardId,jdbcType=BIGINT}, #{cardNo,jdbcType=VARCHAR}, ",
"#{opUserId,jdbcType=BIGINT}, #{opUserName,jdbcType=VARCHAR}, ", "#{content,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, ",
"#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" "#{createTime,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(HighOilCardContactRecord record); int insert(HighOilCardContactRecord record);
@ -59,6 +61,7 @@ public interface HighOilCardContactRecordMapper extends HighOilCardContactRecord
@Results({ @Results({
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="oil_card_id", property="oilCardId", jdbcType=JdbcType.BIGINT), @Result(column="oil_card_id", property="oilCardId", jdbcType=JdbcType.BIGINT),
@Result(column="card_no", property="cardNo", jdbcType=JdbcType.VARCHAR),
@Result(column="content", property="content", jdbcType=JdbcType.VARCHAR), @Result(column="content", property="content", jdbcType=JdbcType.VARCHAR),
@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,14 +75,15 @@ public interface HighOilCardContactRecordMapper extends HighOilCardContactRecord
@Select({ @Select({
"select", "select",
"id, oil_card_id, content, `status`, create_time, op_user_id, op_user_name, ext_1, ", "id, oil_card_id, card_no, content, `status`, create_time, op_user_id, op_user_name, ",
"ext_2, ext_3", "ext_1, ext_2, ext_3",
"from high_oil_card_contact_record", "from high_oil_card_contact_record",
"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="oil_card_id", property="oilCardId", jdbcType=JdbcType.BIGINT), @Result(column="oil_card_id", property="oilCardId", jdbcType=JdbcType.BIGINT),
@Result(column="card_no", property="cardNo", jdbcType=JdbcType.VARCHAR),
@Result(column="content", property="content", jdbcType=JdbcType.VARCHAR), @Result(column="content", property="content", jdbcType=JdbcType.VARCHAR),
@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),
@ -103,6 +107,7 @@ public interface HighOilCardContactRecordMapper extends HighOilCardContactRecord
@Update({ @Update({
"update high_oil_card_contact_record", "update high_oil_card_contact_record",
"set oil_card_id = #{oilCardId,jdbcType=BIGINT},", "set oil_card_id = #{oilCardId,jdbcType=BIGINT},",
"card_no = #{cardNo,jdbcType=VARCHAR},",
"content = #{content,jdbcType=VARCHAR},", "content = #{content,jdbcType=VARCHAR},",
"`status` = #{status,jdbcType=INTEGER},", "`status` = #{status,jdbcType=INTEGER},",
"create_time = #{createTime,jdbcType=TIMESTAMP},", "create_time = #{createTime,jdbcType=TIMESTAMP},",

@ -32,6 +32,10 @@ public class HighOilCardContactRecordSqlProvider {
sql.VALUES("oil_card_id", "#{oilCardId,jdbcType=BIGINT}"); sql.VALUES("oil_card_id", "#{oilCardId,jdbcType=BIGINT}");
} }
if (record.getCardNo() != null) {
sql.VALUES("card_no", "#{cardNo,jdbcType=VARCHAR}");
}
if (record.getContent() != null) { if (record.getContent() != null) {
sql.VALUES("content", "#{content,jdbcType=VARCHAR}"); sql.VALUES("content", "#{content,jdbcType=VARCHAR}");
} }
@ -75,6 +79,7 @@ public class HighOilCardContactRecordSqlProvider {
sql.SELECT("id"); sql.SELECT("id");
} }
sql.SELECT("oil_card_id"); sql.SELECT("oil_card_id");
sql.SELECT("card_no");
sql.SELECT("content"); sql.SELECT("content");
sql.SELECT("`status`"); sql.SELECT("`status`");
sql.SELECT("create_time"); sql.SELECT("create_time");
@ -108,6 +113,10 @@ public class HighOilCardContactRecordSqlProvider {
sql.SET("oil_card_id = #{record.oilCardId,jdbcType=BIGINT}"); sql.SET("oil_card_id = #{record.oilCardId,jdbcType=BIGINT}");
} }
if (record.getCardNo() != null) {
sql.SET("card_no = #{record.cardNo,jdbcType=VARCHAR}");
}
if (record.getContent() != null) { if (record.getContent() != null) {
sql.SET("content = #{record.content,jdbcType=VARCHAR}"); sql.SET("content = #{record.content,jdbcType=VARCHAR}");
} }
@ -150,6 +159,7 @@ public class HighOilCardContactRecordSqlProvider {
sql.SET("id = #{record.id,jdbcType=BIGINT}"); sql.SET("id = #{record.id,jdbcType=BIGINT}");
sql.SET("oil_card_id = #{record.oilCardId,jdbcType=BIGINT}"); sql.SET("oil_card_id = #{record.oilCardId,jdbcType=BIGINT}");
sql.SET("card_no = #{record.cardNo,jdbcType=VARCHAR}");
sql.SET("content = #{record.content,jdbcType=VARCHAR}"); sql.SET("content = #{record.content,jdbcType=VARCHAR}");
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}");
@ -172,6 +182,10 @@ public class HighOilCardContactRecordSqlProvider {
sql.SET("oil_card_id = #{oilCardId,jdbcType=BIGINT}"); sql.SET("oil_card_id = #{oilCardId,jdbcType=BIGINT}");
} }
if (record.getCardNo() != null) {
sql.SET("card_no = #{cardNo,jdbcType=VARCHAR}");
}
if (record.getContent() != null) { if (record.getContent() != null) {
sql.SET("content = #{content,jdbcType=VARCHAR}"); sql.SET("content = #{content,jdbcType=VARCHAR}");
} }

@ -41,20 +41,22 @@ public interface HighOilCardMapper extends HighOilCardMapperExt {
@Insert({ @Insert({
"insert into high_oil_card (company_id, company_name, ", "insert into high_oil_card (company_id, company_name, ",
"org_id, org_name, card_no, ", "org_id, org_name, card_no, ",
"amount, contact_name, ", "amount, amount_consume, ",
"contact_phone, `status`, ", "contact_name, contact_phone, ",
"bind_status, bind_time, ", "`status`, bind_status, ",
"create_time, update_time, ", "bind_time, create_time, ",
"op_user_id, op_user_name, ", "update_time, op_user_id, ",
"ext_1, ext_2, ext_3)", "op_user_name, ext_1, ",
"ext_2, ext_3)",
"values (#{companyId,jdbcType=BIGINT}, #{companyName,jdbcType=VARCHAR}, ", "values (#{companyId,jdbcType=BIGINT}, #{companyName,jdbcType=VARCHAR}, ",
"#{orgId,jdbcType=BIGINT}, #{orgName,jdbcType=VARCHAR}, #{cardNo,jdbcType=VARCHAR}, ", "#{orgId,jdbcType=BIGINT}, #{orgName,jdbcType=VARCHAR}, #{cardNo,jdbcType=VARCHAR}, ",
"#{amount,jdbcType=DECIMAL}, #{contactName,jdbcType=VARCHAR}, ", "#{amount,jdbcType=DECIMAL}, #{amountConsume,jdbcType=DECIMAL}, ",
"#{contactPhone,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, ", "#{contactName,jdbcType=VARCHAR}, #{contactPhone,jdbcType=VARCHAR}, ",
"#{bindStatus,jdbcType=INTEGER}, #{bindTime,jdbcType=TIMESTAMP}, ", "#{status,jdbcType=INTEGER}, #{bindStatus,jdbcType=INTEGER}, ",
"#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, ", "#{bindTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP}, ",
"#{opUserId,jdbcType=BIGINT}, #{opUserName,jdbcType=VARCHAR}, ", "#{updateTime,jdbcType=TIMESTAMP}, #{opUserId,jdbcType=BIGINT}, ",
"#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" "#{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);
@ -72,6 +74,7 @@ public interface HighOilCardMapper extends HighOilCardMapperExt {
@Result(column="org_name", property="orgName", jdbcType=JdbcType.VARCHAR), @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="amount_consume", property="amountConsume", 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),
@ -89,9 +92,9 @@ public interface HighOilCardMapper extends HighOilCardMapperExt {
@Select({ @Select({
"select", "select",
"id, company_id, company_name, org_id, org_name, card_no, amount, contact_name, ", "id, company_id, company_name, org_id, org_name, card_no, amount, amount_consume, ",
"contact_phone, `status`, bind_status, bind_time, create_time, update_time, op_user_id, ", "contact_name, contact_phone, `status`, bind_status, bind_time, create_time, ",
"op_user_name, ext_1, ext_2, ext_3", "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}"
}) })
@ -103,6 +106,7 @@ public interface HighOilCardMapper extends HighOilCardMapperExt {
@Result(column="org_name", property="orgName", jdbcType=JdbcType.VARCHAR), @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="amount_consume", property="amountConsume", 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),
@ -135,6 +139,7 @@ public interface HighOilCardMapper extends HighOilCardMapperExt {
"org_name = #{orgName,jdbcType=VARCHAR},", "org_name = #{orgName,jdbcType=VARCHAR},",
"card_no = #{cardNo,jdbcType=VARCHAR},", "card_no = #{cardNo,jdbcType=VARCHAR},",
"amount = #{amount,jdbcType=DECIMAL},", "amount = #{amount,jdbcType=DECIMAL},",
"amount_consume = #{amountConsume,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},",

@ -20,6 +20,7 @@ public interface HighOilCardMapperExt {
"org_name, " + "org_name, " +
"card_no, " + "card_no, " +
"amount," + "amount," +
"amount_consume," +
"contact_name, " + "contact_name, " +
"contact_phone," + "contact_phone," +
"status," + "status," +
@ -39,6 +40,7 @@ public interface HighOilCardMapperExt {
" #{item.orgName,jdbcType=VARCHAR}," + " #{item.orgName,jdbcType=VARCHAR}," +
" #{item.cardNo,jdbcType=VARCHAR}," + " #{item.cardNo,jdbcType=VARCHAR}," +
" #{item.amount,jdbcType=DECIMAL}, " + " #{item.amount,jdbcType=DECIMAL}, " +
" #{item.amountConsume,jdbcType=DECIMAL}, " +
" #{item.contactName,jdbcType=VARCHAR}," + " #{item.contactName,jdbcType=VARCHAR}," +
" #{item.contactPhone,jdbcType=VARCHAR}, " + " #{item.contactPhone,jdbcType=VARCHAR}, " +
" #{item.status,jdbcType=INTEGER}," + " #{item.status,jdbcType=INTEGER}," +

@ -39,15 +39,15 @@ public interface HighOilCardRecordMapper extends HighOilCardRecordMapperExt {
int deleteByPrimaryKey(Long id); int deleteByPrimaryKey(Long id);
@Insert({ @Insert({
"insert into high_oil_card_record (oil_card_id, `type`, ", "insert into high_oil_card_record (oil_card_id, card_no, ",
"amount, before_amount, ", "`type`, amount, before_amount, ",
"after_amount, source_type, ", "after_amount, source_type, ",
"source_id, source_content, ", "source_id, source_content, ",
"`status`, create_time, ", "`status`, create_time, ",
"op_user_id, op_user_name, ", "op_user_id, op_user_name, ",
"ext_1, ext_2, ext_3)", "ext_1, ext_2, ext_3)",
"values (#{oilCardId,jdbcType=BIGINT}, #{type,jdbcType=INTEGER}, ", "values (#{oilCardId,jdbcType=BIGINT}, #{cardNo,jdbcType=VARCHAR}, ",
"#{amount,jdbcType=DECIMAL}, #{beforeAmount,jdbcType=DECIMAL}, ", "#{type,jdbcType=INTEGER}, #{amount,jdbcType=DECIMAL}, #{beforeAmount,jdbcType=DECIMAL}, ",
"#{afterAmount,jdbcType=DECIMAL}, #{sourceType,jdbcType=INTEGER}, ", "#{afterAmount,jdbcType=DECIMAL}, #{sourceType,jdbcType=INTEGER}, ",
"#{sourceId,jdbcType=BIGINT}, #{sourceContent,jdbcType=VARCHAR}, ", "#{sourceId,jdbcType=BIGINT}, #{sourceContent,jdbcType=VARCHAR}, ",
"#{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, ", "#{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, ",
@ -65,6 +65,7 @@ public interface HighOilCardRecordMapper extends HighOilCardRecordMapperExt {
@Results({ @Results({
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="oil_card_id", property="oilCardId", jdbcType=JdbcType.BIGINT), @Result(column="oil_card_id", property="oilCardId", jdbcType=JdbcType.BIGINT),
@Result(column="card_no", property="cardNo", jdbcType=JdbcType.VARCHAR),
@Result(column="type", property="type", jdbcType=JdbcType.INTEGER), @Result(column="type", property="type", jdbcType=JdbcType.INTEGER),
@Result(column="amount", property="amount", jdbcType=JdbcType.DECIMAL), @Result(column="amount", property="amount", jdbcType=JdbcType.DECIMAL),
@Result(column="before_amount", property="beforeAmount", jdbcType=JdbcType.DECIMAL), @Result(column="before_amount", property="beforeAmount", jdbcType=JdbcType.DECIMAL),
@ -84,15 +85,16 @@ public interface HighOilCardRecordMapper extends HighOilCardRecordMapperExt {
@Select({ @Select({
"select", "select",
"id, oil_card_id, `type`, amount, before_amount, after_amount, source_type, source_id, ", "id, oil_card_id, card_no, `type`, amount, before_amount, after_amount, source_type, ",
"source_content, `status`, create_time, op_user_id, op_user_name, ext_1, ext_2, ", "source_id, source_content, `status`, create_time, op_user_id, op_user_name, ",
"ext_3", "ext_1, ext_2, ext_3",
"from high_oil_card_record", "from high_oil_card_record",
"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="oil_card_id", property="oilCardId", jdbcType=JdbcType.BIGINT), @Result(column="oil_card_id", property="oilCardId", jdbcType=JdbcType.BIGINT),
@Result(column="card_no", property="cardNo", jdbcType=JdbcType.VARCHAR),
@Result(column="type", property="type", jdbcType=JdbcType.INTEGER), @Result(column="type", property="type", jdbcType=JdbcType.INTEGER),
@Result(column="amount", property="amount", jdbcType=JdbcType.DECIMAL), @Result(column="amount", property="amount", jdbcType=JdbcType.DECIMAL),
@Result(column="before_amount", property="beforeAmount", jdbcType=JdbcType.DECIMAL), @Result(column="before_amount", property="beforeAmount", jdbcType=JdbcType.DECIMAL),
@ -122,6 +124,7 @@ public interface HighOilCardRecordMapper extends HighOilCardRecordMapperExt {
@Update({ @Update({
"update high_oil_card_record", "update high_oil_card_record",
"set oil_card_id = #{oilCardId,jdbcType=BIGINT},", "set oil_card_id = #{oilCardId,jdbcType=BIGINT},",
"card_no = #{cardNo,jdbcType=VARCHAR},",
"`type` = #{type,jdbcType=INTEGER},", "`type` = #{type,jdbcType=INTEGER},",
"amount = #{amount,jdbcType=DECIMAL},", "amount = #{amount,jdbcType=DECIMAL},",
"before_amount = #{beforeAmount,jdbcType=DECIMAL},", "before_amount = #{beforeAmount,jdbcType=DECIMAL},",

@ -32,6 +32,10 @@ public class HighOilCardRecordSqlProvider {
sql.VALUES("oil_card_id", "#{oilCardId,jdbcType=BIGINT}"); sql.VALUES("oil_card_id", "#{oilCardId,jdbcType=BIGINT}");
} }
if (record.getCardNo() != null) {
sql.VALUES("card_no", "#{cardNo,jdbcType=VARCHAR}");
}
if (record.getType() != null) { if (record.getType() != null) {
sql.VALUES("`type`", "#{type,jdbcType=INTEGER}"); sql.VALUES("`type`", "#{type,jdbcType=INTEGER}");
} }
@ -99,6 +103,7 @@ public class HighOilCardRecordSqlProvider {
sql.SELECT("id"); sql.SELECT("id");
} }
sql.SELECT("oil_card_id"); sql.SELECT("oil_card_id");
sql.SELECT("card_no");
sql.SELECT("`type`"); sql.SELECT("`type`");
sql.SELECT("amount"); sql.SELECT("amount");
sql.SELECT("before_amount"); sql.SELECT("before_amount");
@ -138,6 +143,10 @@ public class HighOilCardRecordSqlProvider {
sql.SET("oil_card_id = #{record.oilCardId,jdbcType=BIGINT}"); sql.SET("oil_card_id = #{record.oilCardId,jdbcType=BIGINT}");
} }
if (record.getCardNo() != null) {
sql.SET("card_no = #{record.cardNo,jdbcType=VARCHAR}");
}
if (record.getType() != null) { if (record.getType() != null) {
sql.SET("`type` = #{record.type,jdbcType=INTEGER}"); sql.SET("`type` = #{record.type,jdbcType=INTEGER}");
} }
@ -204,6 +213,7 @@ public class HighOilCardRecordSqlProvider {
sql.SET("id = #{record.id,jdbcType=BIGINT}"); sql.SET("id = #{record.id,jdbcType=BIGINT}");
sql.SET("oil_card_id = #{record.oilCardId,jdbcType=BIGINT}"); sql.SET("oil_card_id = #{record.oilCardId,jdbcType=BIGINT}");
sql.SET("card_no = #{record.cardNo,jdbcType=VARCHAR}");
sql.SET("`type` = #{record.type,jdbcType=INTEGER}"); sql.SET("`type` = #{record.type,jdbcType=INTEGER}");
sql.SET("amount = #{record.amount,jdbcType=DECIMAL}"); sql.SET("amount = #{record.amount,jdbcType=DECIMAL}");
sql.SET("before_amount = #{record.beforeAmount,jdbcType=DECIMAL}"); sql.SET("before_amount = #{record.beforeAmount,jdbcType=DECIMAL}");
@ -232,6 +242,10 @@ public class HighOilCardRecordSqlProvider {
sql.SET("oil_card_id = #{oilCardId,jdbcType=BIGINT}"); sql.SET("oil_card_id = #{oilCardId,jdbcType=BIGINT}");
} }
if (record.getCardNo() != null) {
sql.SET("card_no = #{cardNo,jdbcType=VARCHAR}");
}
if (record.getType() != null) { if (record.getType() != null) {
sql.SET("`type` = #{type,jdbcType=INTEGER}"); sql.SET("`type` = #{type,jdbcType=INTEGER}");
} }

@ -52,6 +52,10 @@ public class HighOilCardSqlProvider {
sql.VALUES("amount", "#{amount,jdbcType=DECIMAL}"); sql.VALUES("amount", "#{amount,jdbcType=DECIMAL}");
} }
if (record.getAmountConsume() != null) {
sql.VALUES("amount_consume", "#{amountConsume,jdbcType=DECIMAL}");
}
if (record.getContactName() != null) { if (record.getContactName() != null) {
sql.VALUES("contact_name", "#{contactName,jdbcType=VARCHAR}"); sql.VALUES("contact_name", "#{contactName,jdbcType=VARCHAR}");
} }
@ -116,6 +120,7 @@ public class HighOilCardSqlProvider {
sql.SELECT("org_name"); sql.SELECT("org_name");
sql.SELECT("card_no"); sql.SELECT("card_no");
sql.SELECT("amount"); sql.SELECT("amount");
sql.SELECT("amount_consume");
sql.SELECT("contact_name"); sql.SELECT("contact_name");
sql.SELECT("contact_phone"); sql.SELECT("contact_phone");
sql.SELECT("`status`"); sql.SELECT("`status`");
@ -173,6 +178,10 @@ public class HighOilCardSqlProvider {
sql.SET("amount = #{record.amount,jdbcType=DECIMAL}"); sql.SET("amount = #{record.amount,jdbcType=DECIMAL}");
} }
if (record.getAmountConsume() != null) {
sql.SET("amount_consume = #{record.amountConsume,jdbcType=DECIMAL}");
}
if (record.getContactName() != null) { if (record.getContactName() != null) {
sql.SET("contact_name = #{record.contactName,jdbcType=VARCHAR}"); sql.SET("contact_name = #{record.contactName,jdbcType=VARCHAR}");
} }
@ -236,6 +245,7 @@ public class HighOilCardSqlProvider {
sql.SET("org_name = #{record.orgName,jdbcType=VARCHAR}"); 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("amount_consume = #{record.amountConsume,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}");
@ -282,6 +292,10 @@ public class HighOilCardSqlProvider {
sql.SET("amount = #{amount,jdbcType=DECIMAL}"); sql.SET("amount = #{amount,jdbcType=DECIMAL}");
} }
if (record.getAmountConsume() != null) {
sql.SET("amount_consume = #{amountConsume,jdbcType=DECIMAL}");
}
if (record.getContactName() != null) { if (record.getContactName() != null) {
sql.SET("contact_name = #{contactName,jdbcType=VARCHAR}"); sql.SET("contact_name = #{contactName,jdbcType=VARCHAR}");
} }

@ -46,6 +46,11 @@ public class HighOilCard implements Serializable {
*/ */
private BigDecimal amount; private BigDecimal amount;
/**
* 消费金额
*/
private BigDecimal amountConsume;
/** /**
* 联系人姓名 * 联系人姓名
*/ */
@ -155,6 +160,14 @@ public class HighOilCard implements Serializable {
this.amount = amount; this.amount = amount;
} }
public BigDecimal getAmountConsume() {
return amountConsume;
}
public void setAmountConsume(BigDecimal amountConsume) {
this.amountConsume = amountConsume;
}
public String getContactName() { public String getContactName() {
return contactName; return contactName;
} }
@ -270,6 +283,7 @@ public class HighOilCard implements Serializable {
&& (this.getOrgName() == null ? other.getOrgName() == null : this.getOrgName().equals(other.getOrgName())) && (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.getAmountConsume() == null ? other.getAmountConsume() == null : this.getAmountConsume().equals(other.getAmountConsume()))
&& (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()))
@ -295,6 +309,7 @@ public class HighOilCard implements Serializable {
result = prime * result + ((getOrgName() == null) ? 0 : getOrgName().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 + ((getAmountConsume() == null) ? 0 : getAmountConsume().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());
@ -323,6 +338,7 @@ public class HighOilCard implements Serializable {
sb.append(", orgName=").append(orgName); 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(", amountConsume=").append(amountConsume);
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);

@ -20,6 +20,11 @@ public class HighOilCardContactRecord implements Serializable {
*/ */
private Long oilCardId; private Long oilCardId;
/**
* 油卡卡号
*/
private String cardNo;
/** /**
* 内容 * 内容
*/ */
@ -69,6 +74,14 @@ public class HighOilCardContactRecord implements Serializable {
this.oilCardId = oilCardId; this.oilCardId = oilCardId;
} }
public String getCardNo() {
return cardNo;
}
public void setCardNo(String cardNo) {
this.cardNo = cardNo;
}
public String getContent() { public String getContent() {
return content; return content;
} }
@ -147,6 +160,7 @@ public class HighOilCardContactRecord implements Serializable {
HighOilCardContactRecord other = (HighOilCardContactRecord) that; HighOilCardContactRecord other = (HighOilCardContactRecord) 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.getOilCardId() == null ? other.getOilCardId() == null : this.getOilCardId().equals(other.getOilCardId())) && (this.getOilCardId() == null ? other.getOilCardId() == null : this.getOilCardId().equals(other.getOilCardId()))
&& (this.getCardNo() == null ? other.getCardNo() == null : this.getCardNo().equals(other.getCardNo()))
&& (this.getContent() == null ? other.getContent() == null : this.getContent().equals(other.getContent())) && (this.getContent() == null ? other.getContent() == null : this.getContent().equals(other.getContent()))
&& (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()))
@ -163,6 +177,7 @@ public class HighOilCardContactRecord 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 + ((getOilCardId() == null) ? 0 : getOilCardId().hashCode()); result = prime * result + ((getOilCardId() == null) ? 0 : getOilCardId().hashCode());
result = prime * result + ((getCardNo() == null) ? 0 : getCardNo().hashCode());
result = prime * result + ((getContent() == null) ? 0 : getContent().hashCode()); result = prime * result + ((getContent() == null) ? 0 : getContent().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());
@ -182,6 +197,7 @@ public class HighOilCardContactRecord implements Serializable {
sb.append("Hash = ").append(hashCode()); sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id); sb.append(", id=").append(id);
sb.append(", oilCardId=").append(oilCardId); sb.append(", oilCardId=").append(oilCardId);
sb.append(", cardNo=").append(cardNo);
sb.append(", content=").append(content); sb.append(", content=").append(content);
sb.append(", status=").append(status); sb.append(", status=").append(status);
sb.append(", createTime=").append(createTime); sb.append(", createTime=").append(createTime);

@ -245,6 +245,76 @@ public class HighOilCardContactRecordExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andCardNoIsNull() {
addCriterion("card_no is null");
return (Criteria) this;
}
public Criteria andCardNoIsNotNull() {
addCriterion("card_no is not null");
return (Criteria) this;
}
public Criteria andCardNoEqualTo(String value) {
addCriterion("card_no =", value, "cardNo");
return (Criteria) this;
}
public Criteria andCardNoNotEqualTo(String value) {
addCriterion("card_no <>", value, "cardNo");
return (Criteria) this;
}
public Criteria andCardNoGreaterThan(String value) {
addCriterion("card_no >", value, "cardNo");
return (Criteria) this;
}
public Criteria andCardNoGreaterThanOrEqualTo(String value) {
addCriterion("card_no >=", value, "cardNo");
return (Criteria) this;
}
public Criteria andCardNoLessThan(String value) {
addCriterion("card_no <", value, "cardNo");
return (Criteria) this;
}
public Criteria andCardNoLessThanOrEqualTo(String value) {
addCriterion("card_no <=", value, "cardNo");
return (Criteria) this;
}
public Criteria andCardNoLike(String value) {
addCriterion("card_no like", value, "cardNo");
return (Criteria) this;
}
public Criteria andCardNoNotLike(String value) {
addCriterion("card_no not like", value, "cardNo");
return (Criteria) this;
}
public Criteria andCardNoIn(List<String> values) {
addCriterion("card_no in", values, "cardNo");
return (Criteria) this;
}
public Criteria andCardNoNotIn(List<String> values) {
addCriterion("card_no not in", values, "cardNo");
return (Criteria) this;
}
public Criteria andCardNoBetween(String value1, String value2) {
addCriterion("card_no between", value1, value2, "cardNo");
return (Criteria) this;
}
public Criteria andCardNoNotBetween(String value1, String value2) {
addCriterion("card_no not between", value1, value2, "cardNo");
return (Criteria) this;
}
public Criteria andContentIsNull() { public Criteria andContentIsNull() {
addCriterion("content is null"); addCriterion("content is null");
return (Criteria) this; return (Criteria) this;

@ -576,6 +576,66 @@ public class HighOilCardExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andAmountConsumeIsNull() {
addCriterion("amount_consume is null");
return (Criteria) this;
}
public Criteria andAmountConsumeIsNotNull() {
addCriterion("amount_consume is not null");
return (Criteria) this;
}
public Criteria andAmountConsumeEqualTo(BigDecimal value) {
addCriterion("amount_consume =", value, "amountConsume");
return (Criteria) this;
}
public Criteria andAmountConsumeNotEqualTo(BigDecimal value) {
addCriterion("amount_consume <>", value, "amountConsume");
return (Criteria) this;
}
public Criteria andAmountConsumeGreaterThan(BigDecimal value) {
addCriterion("amount_consume >", value, "amountConsume");
return (Criteria) this;
}
public Criteria andAmountConsumeGreaterThanOrEqualTo(BigDecimal value) {
addCriterion("amount_consume >=", value, "amountConsume");
return (Criteria) this;
}
public Criteria andAmountConsumeLessThan(BigDecimal value) {
addCriterion("amount_consume <", value, "amountConsume");
return (Criteria) this;
}
public Criteria andAmountConsumeLessThanOrEqualTo(BigDecimal value) {
addCriterion("amount_consume <=", value, "amountConsume");
return (Criteria) this;
}
public Criteria andAmountConsumeIn(List<BigDecimal> values) {
addCriterion("amount_consume in", values, "amountConsume");
return (Criteria) this;
}
public Criteria andAmountConsumeNotIn(List<BigDecimal> values) {
addCriterion("amount_consume not in", values, "amountConsume");
return (Criteria) this;
}
public Criteria andAmountConsumeBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("amount_consume between", value1, value2, "amountConsume");
return (Criteria) this;
}
public Criteria andAmountConsumeNotBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("amount_consume not between", value1, value2, "amountConsume");
return (Criteria) this;
}
public Criteria andContactNameIsNull() { public Criteria andContactNameIsNull() {
addCriterion("contact_name is null"); addCriterion("contact_name is null");
return (Criteria) this; return (Criteria) this;

@ -21,6 +21,11 @@ public class HighOilCardRecord implements Serializable {
*/ */
private Long oilCardId; private Long oilCardId;
/**
* 油卡卡号
*/
private String cardNo;
/** /**
* 类型 1进账 2出账 * 类型 1进账 2出账
*/ */
@ -42,7 +47,7 @@ public class HighOilCardRecord implements Serializable {
private BigDecimal afterAmount; private BigDecimal afterAmount;
/** /**
* 来源类型 1. 金额充值 2. 消费订单 * 来源类型 1. 充值金额 2. 订单消费
*/ */
private Integer sourceType; private Integer sourceType;
@ -100,6 +105,14 @@ public class HighOilCardRecord implements Serializable {
this.oilCardId = oilCardId; this.oilCardId = oilCardId;
} }
public String getCardNo() {
return cardNo;
}
public void setCardNo(String cardNo) {
this.cardNo = cardNo;
}
public Integer getType() { public Integer getType() {
return type; return type;
} }
@ -226,6 +239,7 @@ public class HighOilCardRecord implements Serializable {
HighOilCardRecord other = (HighOilCardRecord) that; HighOilCardRecord other = (HighOilCardRecord) 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.getOilCardId() == null ? other.getOilCardId() == null : this.getOilCardId().equals(other.getOilCardId())) && (this.getOilCardId() == null ? other.getOilCardId() == null : this.getOilCardId().equals(other.getOilCardId()))
&& (this.getCardNo() == null ? other.getCardNo() == null : this.getCardNo().equals(other.getCardNo()))
&& (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType())) && (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType()))
&& (this.getAmount() == null ? other.getAmount() == null : this.getAmount().equals(other.getAmount())) && (this.getAmount() == null ? other.getAmount() == null : this.getAmount().equals(other.getAmount()))
&& (this.getBeforeAmount() == null ? other.getBeforeAmount() == null : this.getBeforeAmount().equals(other.getBeforeAmount())) && (this.getBeforeAmount() == null ? other.getBeforeAmount() == null : this.getBeforeAmount().equals(other.getBeforeAmount()))
@ -248,6 +262,7 @@ public class HighOilCardRecord 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 + ((getOilCardId() == null) ? 0 : getOilCardId().hashCode()); result = prime * result + ((getOilCardId() == null) ? 0 : getOilCardId().hashCode());
result = prime * result + ((getCardNo() == null) ? 0 : getCardNo().hashCode());
result = prime * result + ((getType() == null) ? 0 : getType().hashCode()); result = prime * result + ((getType() == null) ? 0 : getType().hashCode());
result = prime * result + ((getAmount() == null) ? 0 : getAmount().hashCode()); result = prime * result + ((getAmount() == null) ? 0 : getAmount().hashCode());
result = prime * result + ((getBeforeAmount() == null) ? 0 : getBeforeAmount().hashCode()); result = prime * result + ((getBeforeAmount() == null) ? 0 : getBeforeAmount().hashCode());
@ -273,6 +288,7 @@ public class HighOilCardRecord implements Serializable {
sb.append("Hash = ").append(hashCode()); sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id); sb.append(", id=").append(id);
sb.append(", oilCardId=").append(oilCardId); sb.append(", oilCardId=").append(oilCardId);
sb.append(", cardNo=").append(cardNo);
sb.append(", type=").append(type); sb.append(", type=").append(type);
sb.append(", amount=").append(amount); sb.append(", amount=").append(amount);
sb.append(", beforeAmount=").append(beforeAmount); sb.append(", beforeAmount=").append(beforeAmount);

@ -246,6 +246,76 @@ public class HighOilCardRecordExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andCardNoIsNull() {
addCriterion("card_no is null");
return (Criteria) this;
}
public Criteria andCardNoIsNotNull() {
addCriterion("card_no is not null");
return (Criteria) this;
}
public Criteria andCardNoEqualTo(String value) {
addCriterion("card_no =", value, "cardNo");
return (Criteria) this;
}
public Criteria andCardNoNotEqualTo(String value) {
addCriterion("card_no <>", value, "cardNo");
return (Criteria) this;
}
public Criteria andCardNoGreaterThan(String value) {
addCriterion("card_no >", value, "cardNo");
return (Criteria) this;
}
public Criteria andCardNoGreaterThanOrEqualTo(String value) {
addCriterion("card_no >=", value, "cardNo");
return (Criteria) this;
}
public Criteria andCardNoLessThan(String value) {
addCriterion("card_no <", value, "cardNo");
return (Criteria) this;
}
public Criteria andCardNoLessThanOrEqualTo(String value) {
addCriterion("card_no <=", value, "cardNo");
return (Criteria) this;
}
public Criteria andCardNoLike(String value) {
addCriterion("card_no like", value, "cardNo");
return (Criteria) this;
}
public Criteria andCardNoNotLike(String value) {
addCriterion("card_no not like", value, "cardNo");
return (Criteria) this;
}
public Criteria andCardNoIn(List<String> values) {
addCriterion("card_no in", values, "cardNo");
return (Criteria) this;
}
public Criteria andCardNoNotIn(List<String> values) {
addCriterion("card_no not in", values, "cardNo");
return (Criteria) this;
}
public Criteria andCardNoBetween(String value1, String value2) {
addCriterion("card_no between", value1, value2, "cardNo");
return (Criteria) this;
}
public Criteria andCardNoNotBetween(String value1, String value2) {
addCriterion("card_no not between", value1, value2, "cardNo");
return (Criteria) this;
}
public Criteria andTypeIsNull() { public Criteria andTypeIsNull() {
addCriterion("`type` is null"); addCriterion("`type` is null");
return (Criteria) this; return (Criteria) this;

@ -16,7 +16,7 @@ public interface HighOilCardContactRecordService {
* @param oilCardId * @param oilCardId
* @param content * @param content
*/ */
void insert(Long oilCardId,String content); void insert(Long oilCardId,String oilCardNo, String content);
/** /**
* 查询记录列表 * 查询记录列表

@ -7,6 +7,7 @@ import com.hai.entity.HighOilCardContactRecordExample;
import com.hai.model.UserInfoModel; import com.hai.model.UserInfoModel;
import com.hai.service.HighOilCardContactRecordService; import com.hai.service.HighOilCardContactRecordService;
import org.apache.commons.collections4.MapUtils; import org.apache.commons.collections4.MapUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import javax.annotation.Resource; import javax.annotation.Resource;
@ -24,11 +25,12 @@ public class HighOilCardContactRecordServiceImpl implements HighOilCardContactRe
private UserCenter userCenter; private UserCenter userCenter;
@Override @Override
public void insert(Long oilCardId, String content) { public void insert(Long oilCardId, String oilCardNo , String content) {
UserInfoModel userInfoModel = userCenter.getSessionModel(UserInfoModel.class); UserInfoModel userInfoModel = userCenter.getSessionModel(UserInfoModel.class);
HighOilCardContactRecord record = new HighOilCardContactRecord(); HighOilCardContactRecord record = new HighOilCardContactRecord();
record.setOilCardId(oilCardId); record.setOilCardId(oilCardId);
record.setCardNo(oilCardNo);
record.setContent(content); record.setContent(content);
record.setCreateTime(new Date()); record.setCreateTime(new Date());
record.setStatus(1); record.setStatus(1);
@ -46,6 +48,18 @@ public class HighOilCardContactRecordServiceImpl implements HighOilCardContactRe
criteria.andOilCardIdEqualTo(MapUtils.getLong(param, "oilCardId")); criteria.andOilCardIdEqualTo(MapUtils.getLong(param, "oilCardId"));
} }
if (StringUtils.isNotBlank(MapUtils.getString(param, "cardNo"))) {
criteria.andCardNoEqualTo(MapUtils.getString(param, "cardNo"));
}
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")));
}
example.setOrderByClause("create_time desc"); example.setOrderByClause("create_time desc");
return oilCardContactRecordMapper.selectByExample(example); return oilCardContactRecordMapper.selectByExample(example);
} }

@ -7,6 +7,7 @@ import com.hai.entity.HighOilCardRecordExample;
import com.hai.model.UserInfoModel; import com.hai.model.UserInfoModel;
import com.hai.service.HighOilCardRecordService; import com.hai.service.HighOilCardRecordService;
import org.apache.commons.collections4.MapUtils; import org.apache.commons.collections4.MapUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import javax.annotation.Resource; import javax.annotation.Resource;
@ -39,18 +40,30 @@ public class HighOilCardRecordServiceImpl implements HighOilCardRecordService {
HighOilCardRecordExample example = new HighOilCardRecordExample(); HighOilCardRecordExample example = new HighOilCardRecordExample();
HighOilCardRecordExample.Criteria criteria = example.createCriteria().andStatusEqualTo(1); HighOilCardRecordExample.Criteria criteria = example.createCriteria().andStatusEqualTo(1);
if (MapUtils.getLong(map, "oilCardId") == null) { if (MapUtils.getLong(map, "oilCardId") != null) {
criteria.andOilCardIdEqualTo(MapUtils.getLong(map, "oilCardId")); criteria.andOilCardIdEqualTo(MapUtils.getLong(map, "oilCardId"));
} }
if (MapUtils.getInteger(map, "type") == null) { if (StringUtils.isNotBlank(MapUtils.getString(map, "cardNo"))) {
criteria.andCardNoEqualTo(MapUtils.getString(map, "cardNo"));
}
if (MapUtils.getInteger(map, "type") != null) {
criteria.andTypeEqualTo(MapUtils.getInteger(map, "type")); criteria.andTypeEqualTo(MapUtils.getInteger(map, "type"));
} }
if (MapUtils.getInteger(map, "sourceType") == null) { if (MapUtils.getInteger(map, "sourceType") != null) {
criteria.andSourceTypeEqualTo(MapUtils.getInteger(map, "sourceType")); criteria.andSourceTypeEqualTo(MapUtils.getInteger(map, "sourceType"));
} }
if (MapUtils.getLong(map, "createTimeS") != null) {
criteria.andCreateTimeGreaterThanOrEqualTo(new Date(MapUtils.getLong(map, "createTimeS")));
}
if (MapUtils.getLong(map, "createTimeE") != null) {
criteria.andCreateTimeLessThanOrEqualTo(new Date(MapUtils.getLong(map, "createTimeE")));
}
example.setOrderByClause("create_time desc"); example.setOrderByClause("create_time desc");
return oilCardRecordMapper.selectByExample(example); return oilCardRecordMapper.selectByExample(example);
} }

@ -89,6 +89,7 @@ public class HighOilCardServiceImpl implements HighOilCardService {
HighOilCardRecord record = new HighOilCardRecord(); HighOilCardRecord record = new HighOilCardRecord();
record.setOilCardId(oilCard.getId()); record.setOilCardId(oilCard.getId());
record.setCardNo(oilCard.getCardNo());
record.setType(OilCardRecordTypeEnum.type1.getType()); record.setType(OilCardRecordTypeEnum.type1.getType());
record.setAmount(price); record.setAmount(price);
record.setBeforeAmount(beforeAmount); record.setBeforeAmount(beforeAmount);
@ -118,6 +119,7 @@ public class HighOilCardServiceImpl implements HighOilCardService {
oilCard.setOrgId(organization.getId()); oilCard.setOrgId(organization.getId());
oilCard.setOrgName(organization.getName()); oilCard.setOrgName(organization.getName());
oilCard.setAmount(new BigDecimal("0")); oilCard.setAmount(new BigDecimal("0"));
oilCard.setAmountConsume(new BigDecimal("0"));
oilCard.setCardNo(BankNumberUtil.getBrankNumber("8")); oilCard.setCardNo(BankNumberUtil.getBrankNumber("8"));
oilCard.setOpUserId(userInfoModel.getSecUser().getId()); oilCard.setOpUserId(userInfoModel.getSecUser().getId());
oilCard.setOpUserName(userInfoModel.getSecUser().getUserName()); oilCard.setOpUserName(userInfoModel.getSecUser().getUserName());
@ -149,9 +151,9 @@ public class HighOilCardServiceImpl implements HighOilCardService {
// 绑定状态 0:未绑定 1:已绑定 // 绑定状态 0:未绑定 1:已绑定
if (oilCard.getBindStatus() == 1) { if (oilCard.getBindStatus() == 1) {
oilCardContactRecordService.insert(oilCard.getId(), "新设置:联系人【"+oilCard.getContactName()+"】,联系电话【"+oilCard.getContactPhone()+"】"); oilCardContactRecordService.insert(oilCard.getId(), oilCard.getCardNo(), "新设置:联系人【"+oilCard.getContactName()+"】,联系电话【"+oilCard.getContactPhone()+"】");
} else { } else {
oilCardContactRecordService.insert(oilCard.getId(), "联系信息变更:原联系人【"+oilCard.getContactName()+"】,联系电话【"+oilCard.getContactPhone()+"】。" + oilCardContactRecordService.insert(oilCard.getId(), oilCard.getCardNo(), "联系信息变更:原联系人【"+oilCard.getContactName()+"】,联系电话【"+oilCard.getContactPhone()+"】。" +
"变跟后联系人【"+oilCard.getContactName()+ "】,联系电话【"+oilCard.getContactPhone()+"】"); "变跟后联系人【"+oilCard.getContactName()+ "】,联系电话【"+oilCard.getContactPhone()+"】");
} }
} }
@ -169,7 +171,7 @@ public class HighOilCardServiceImpl implements HighOilCardService {
oilCard.setStatus(OilCardStatusEnum.status2.getStatus()); oilCard.setStatus(OilCardStatusEnum.status2.getStatus());
editData(oilCard); editData(oilCard);
oilCardContactRecordService.insert(oilCard.getId(), "禁用油卡"); oilCardContactRecordService.insert(oilCard.getId(), oilCard.getCardNo(), "禁用油卡");
} }
@Override @Override
@ -185,7 +187,7 @@ public class HighOilCardServiceImpl implements HighOilCardService {
oilCard.setStatus(OilCardStatusEnum.status1.getStatus()); oilCard.setStatus(OilCardStatusEnum.status1.getStatus());
editData(oilCard); editData(oilCard);
oilCardContactRecordService.insert(oilCard.getId(), "启用油卡"); oilCardContactRecordService.insert(oilCard.getId(), oilCard.getCardNo(), "启用油卡");
} }
@Override @Override

Loading…
Cancel
Save