提交代码

master
胡锐 3 months ago
parent 995a3aef4c
commit d88ce960e2
  1. 17
      bweb/src/main/java/com/bweb/controller/BsAgentMerAccountController.java
  2. 9
      bweb/src/main/java/com/bweb/controller/BsGasOilPriceController.java
  3. 2
      bweb/src/main/java/com/bweb/controller/BsGasOilPriceWeekController.java
  4. 11
      bweb/src/main/java/com/bweb/controller/BsGasOrderController.java
  5. 43
      bweb/src/main/java/com/bweb/controller/BsGasOrderReceiptController.java
  6. 49
      bweb/src/main/java/com/bweb/controller/BsMerchantAccountController.java
  7. 2
      service/src/main/java/com/hfkj/dao/BsGasOilPriceWeekMapperExt.java
  8. 29
      service/src/main/java/com/hfkj/dao/BsGasOrderReceiptMapper.java
  9. 84
      service/src/main/java/com/hfkj/dao/BsGasOrderReceiptSqlProvider.java
  10. 12
      service/src/main/java/com/hfkj/dao/BsMerchantAccountMapperExt.java
  11. 96
      service/src/main/java/com/hfkj/entity/BsGasOrderReceipt.java
  12. 400
      service/src/main/java/com/hfkj/entity/BsGasOrderReceiptExample.java
  13. 1
      service/src/main/java/com/hfkj/service/gas/impl/BsGasOilPriceWeekServiceImpl.java
  14. 22
      service/src/main/java/com/hfkj/service/gas/impl/BsGasOrderReceiptServiceImpl.java
  15. 4
      service/src/main/java/com/hfkj/service/gas/impl/BsGasOrderServiceImpl.java
  16. 3
      service/src/main/java/com/hfkj/service/merchant/BsMerchantAccountService.java
  17. 3
      service/src/main/java/com/hfkj/service/merchant/impl/BsMerchantAccountServiceImpl.java
  18. 17
      service/src/main/java/com/hfkj/service/merchant/impl/BsMerchantChainBrandAccountServiceImpl.java

@ -143,12 +143,27 @@ public class BsAgentMerAccountController {
@RequestMapping(value = "/getRecordList", method = RequestMethod.GET) @RequestMapping(value = "/getRecordList", method = RequestMethod.GET)
@ResponseBody @ResponseBody
@ApiOperation(value = "记录列表") @ApiOperation(value = "记录列表")
public ResponseData getRecordList(@RequestParam(value = "agentId", required = true) Long agentId, public ResponseData getRecordList(@RequestParam(value = "agentId", required = false) Long agentId,
@RequestParam(value = "merNo", required = true) String merNo, @RequestParam(value = "merNo", required = true) String merNo,
@RequestParam(value = "pageNum", required = true) Integer pageNum, @RequestParam(value = "pageNum", required = true) Integer pageNum,
@RequestParam(value = "pageSize", required = true) Integer pageSize) { @RequestParam(value = "pageSize", required = true) Integer pageSize) {
try { try {
SecUserSessionObject userSession = userCenter.getSessionModel(SecUserSessionObject.class);
if (SecUserObjectTypeEnum.type1.getCode() == userSession.getAccount().getObjectType()) {
} else if (SecUserObjectTypeEnum.type4.getCode() == userSession.getAccount().getObjectType()) {
agentId = userSession.getAccount().getObjectId();;
} else if (SecUserObjectTypeEnum.type5.getCode() == userSession.getAccount().getObjectType()) {
// 查询代理业务员
BsAgentStaff staff = agentStaffService.getStaffDetailById(userSession.getAccount().getObjectId());
if (staff == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到账户");
}
agentId = staff.getAgentId();
} else {
throw ErrorHelp.genException(SysCode.System, ErrorCode.ROLE_NOT_PERMISSIONS, "");
}
// 查询账户 // 查询账户
BsAgentMerAccount account = agentMerAccountService.getAccount(agentId, merNo); BsAgentMerAccount account = agentMerAccountService.getAccount(agentId, merNo);
if (account == null) { if (account == null) {

@ -52,8 +52,6 @@ public class BsGasOilPriceController {
private BsGasService gasService; private BsGasService gasService;
@Resource @Resource
private BsGasOilPriceWeekService gasOilPriceWeekService; private BsGasOilPriceWeekService gasOilPriceWeekService;
@Resource
private BsGasOilPriceOfficialService gasOilPriceOfficialService;
@RequestMapping(value = "/createOil", method = RequestMethod.POST) @RequestMapping(value = "/createOil", method = RequestMethod.POST)
@ResponseBody @ResponseBody
@ -98,11 +96,6 @@ public class BsGasOilPriceController {
log.error("BsGasOilPriceController --> createOil() error!", "未知的的油品类型"); log.error("BsGasOilPriceController --> createOil() error!", "未知的的油品类型");
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的的油品类型"); throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的的油品类型");
} }
// 查询国标价
BsGasOilPriceOfficial priceOfficial = gasOilPriceOfficialService.getPrice(merchant.getProvinceCode(), merchant.getOilPriceZoneId(), oilNo.getCodeValue());
if (priceOfficial == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未配置当前油站所在区域国标价,请联系运营配置!");
}
BsGasOilPrice oilPrice = new BsGasOilPrice(); BsGasOilPrice oilPrice = new BsGasOilPrice();
oilPrice.setMerId(merchant.getId()); oilPrice.setMerId(merchant.getId());
@ -112,7 +105,7 @@ public class BsGasOilPriceController {
oilPrice.setOilNo(oilNo.getCodeValue()); oilPrice.setOilNo(oilNo.getCodeValue());
oilPrice.setOilNoName(oilNo.getCodeName()); oilPrice.setOilNoName(oilNo.getCodeName());
oilPrice.setPreferentialMargin(new BigDecimal("0")); oilPrice.setPreferentialMargin(new BigDecimal("0"));
oilPrice.setPriceOfficial(priceOfficial.getPriceOfficial()); oilPrice.setPriceOfficial(new BigDecimal("0"));
oilPrice.setGasStationDrop(new BigDecimal("0")); oilPrice.setGasStationDrop(new BigDecimal("0"));
oilPrice.setPriceGun(oilPrice.getPriceOfficial().subtract(oilPrice.getGasStationDrop())); oilPrice.setPriceGun(oilPrice.getPriceOfficial().subtract(oilPrice.getGasStationDrop()));
oilPrice.setPriceVip(oilPrice.getPriceGun()); oilPrice.setPriceVip(oilPrice.getPriceGun());

@ -38,6 +38,7 @@ public class BsGasOilPriceWeekController {
public ResponseData updatePrice(@RequestBody BsGasOilPriceWeek body) { public ResponseData updatePrice(@RequestBody BsGasOilPriceWeek body) {
try { try {
if (body.getId() == null if (body.getId() == null
|| body.getPriceOfficial() == null
|| body.getPriceGun() == null || body.getPriceGun() == null
|| body.getPriceVip() == null || body.getPriceVip() == null
) { ) {
@ -48,6 +49,7 @@ public class BsGasOilPriceWeekController {
if (oilPrice == null) { if (oilPrice == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的数据"); throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的数据");
} }
oilPrice.setPriceOfficial(body.getPriceOfficial());
oilPrice.setPriceGun(body.getPriceGun()); oilPrice.setPriceGun(body.getPriceGun());
oilPrice.setPriceVip(body.getPriceVip()); oilPrice.setPriceVip(body.getPriceVip());
gasOilPriceWeekService.updatePrice(oilPrice); gasOilPriceWeekService.updatePrice(oilPrice);

@ -191,6 +191,9 @@ public class BsGasOrderController {
} else if (sessionObject.getAccount().getObjectType().equals(SecUserObjectTypeEnum.type5.getCode())) { } else if (sessionObject.getAccount().getObjectType().equals(SecUserObjectTypeEnum.type5.getCode())) {
param.put("agentStaffId", sessionObject.getAccount().getObjectId()); param.put("agentStaffId", sessionObject.getAccount().getObjectId());
param.put("merName", merName); param.put("merName", merName);
} else if (sessionObject.getAccount().getObjectType().equals(SecUserObjectTypeEnum.type6.getCode())) {
param.put("merChainBrandId", sessionObject.getAccount().getObjectId());
param.put("merName", merName);
} else { } else {
throw ErrorHelp.genException(SysCode.System, ErrorCode.ROLE_NOT_PERMISSIONS, ""); throw ErrorHelp.genException(SysCode.System, ErrorCode.ROLE_NOT_PERMISSIONS, "");
} }
@ -267,6 +270,9 @@ public class BsGasOrderController {
} else if (sessionObject.getAccount().getObjectType().equals(SecUserObjectTypeEnum.type5.getCode())) { } else if (sessionObject.getAccount().getObjectType().equals(SecUserObjectTypeEnum.type5.getCode())) {
param.put("agentStaffId", sessionObject.getAccount().getObjectId()); param.put("agentStaffId", sessionObject.getAccount().getObjectId());
param.put("merName", merName); param.put("merName", merName);
} else if (sessionObject.getAccount().getObjectType().equals(SecUserObjectTypeEnum.type6.getCode())) {
param.put("merChainBrandId", sessionObject.getAccount().getObjectId());
param.put("merName", merName);
} else { } else {
throw ErrorHelp.genException(SysCode.System, ErrorCode.ROLE_NOT_PERMISSIONS, ""); throw ErrorHelp.genException(SysCode.System, ErrorCode.ROLE_NOT_PERMISSIONS, "");
} }
@ -370,6 +376,11 @@ public class BsGasOrderController {
includeColumnFiledNames.add("merName"); includeColumnFiledNames.add("merName");
includeColumnFiledNames.add("channelType"); includeColumnFiledNames.add("channelType");
includeColumnFiledNames.add("channelOrderNo"); includeColumnFiledNames.add("channelOrderNo");
} else if (sessionObject.getAccount().getObjectType().equals(SecUserObjectTypeEnum.type6.getCode()) ) {
includeColumnFiledNames.add("merName");
includeColumnFiledNames.add("userPhone");
includeColumnFiledNames.add("gasStaffName");
} }
EasyExcel.write(fileUrl+pathName) EasyExcel.write(fileUrl+pathName)

@ -6,12 +6,19 @@ import com.github.pagehelper.PageInfo;
import com.hfkj.common.exception.ErrorCode; import com.hfkj.common.exception.ErrorCode;
import com.hfkj.common.exception.ErrorHelp; import com.hfkj.common.exception.ErrorHelp;
import com.hfkj.common.exception.SysCode; import com.hfkj.common.exception.SysCode;
import com.hfkj.common.security.UserCenter;
import com.hfkj.common.utils.ResponseMsgUtil; import com.hfkj.common.utils.ResponseMsgUtil;
import com.hfkj.entity.BsAgentMer;
import com.hfkj.model.AgentMerAllot;
import com.hfkj.model.ResponseData; import com.hfkj.model.ResponseData;
import com.hfkj.model.SecUserSessionObject;
import com.hfkj.model.UserSessionObject; import com.hfkj.model.UserSessionObject;
import com.hfkj.service.agent.BsAgentMerService;
import com.hfkj.service.gas.BsGasOrderReceiptService; import com.hfkj.service.gas.BsGasOrderReceiptService;
import com.hfkj.sysenum.SecUserObjectTypeEnum;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.apache.commons.collections4.MapUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
@ -19,10 +26,11 @@ 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.util.HashMap; import java.util.*;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import java.util.stream.IntStream;
import java.util.stream.LongStream;
import java.util.stream.Stream;
@Controller @Controller
@RequestMapping(value = "/gasOrderReceipt") @RequestMapping(value = "/gasOrderReceipt")
@ -31,6 +39,10 @@ public class BsGasOrderReceiptController {
private static Logger log = LoggerFactory.getLogger(BsGasOrderReceiptController.class); private static Logger log = LoggerFactory.getLogger(BsGasOrderReceiptController.class);
@Resource @Resource
private BsGasOrderReceiptService gasOrderReceiptService; private BsGasOrderReceiptService gasOrderReceiptService;
@Resource
private BsAgentMerService agentMerService;
@Resource
private UserCenter userCenter;
@RequestMapping(value="/success",method = RequestMethod.POST) @RequestMapping(value="/success",method = RequestMethod.POST)
@ResponseBody @ResponseBody
@ -78,15 +90,28 @@ public class BsGasOrderReceiptController {
@ResponseBody @ResponseBody
@ApiOperation(value = "查询申请列表") @ApiOperation(value = "查询申请列表")
public ResponseData queryReceiptList(@RequestParam(name = "orderNo", required = false) String orderNo, public ResponseData queryReceiptList(@RequestParam(name = "orderNo", required = false) String orderNo,
@RequestParam(name = "contactsPhone", required = false) String contactsPhone, @RequestParam(name = "merName", required = false) String merName,
@RequestParam(name = "status", required = false) Integer status, @RequestParam(name = "contactsPhone", required = false) String contactsPhone,
@RequestParam(name = "createTimeS", required = false) Long createTimeS, @RequestParam(name = "status", required = false) Integer status,
@RequestParam(name = "createTimeE", required = false) Long createTimeE, @RequestParam(name = "createTimeS", required = false) Long createTimeS,
@RequestParam(name = "pageNum", required = true) Integer pageNum, @RequestParam(name = "createTimeE", required = false) Long createTimeE,
@RequestParam(name = "pageSize", required = true) Integer pageSize) { @RequestParam(name = "pageNum", required = true) Integer pageNum,
@RequestParam(name = "pageSize", required = true) Integer pageSize) {
try { try {
Map<String,Object> param = new HashMap<>(); Map<String,Object> param = new HashMap<>();
SecUserSessionObject sessionObject = userCenter.getSessionModel(SecUserSessionObject.class);
if (sessionObject.getAccount().getObjectType().equals(SecUserObjectTypeEnum.type1.getCode())) {
} else if (sessionObject.getAccount().getObjectType().equals(SecUserObjectTypeEnum.type4.getCode())) {
param.put("agentId", sessionObject.getAccount().getObjectId());
} else if (sessionObject.getAccount().getObjectType().equals(SecUserObjectTypeEnum.type5.getCode())) {
param.put("agentStaffId", sessionObject.getAccount().getObjectId());
} else {
throw ErrorHelp.genException(SysCode.System, ErrorCode.ROLE_NOT_PERMISSIONS, "");
}
param.put("orderNo", orderNo); param.put("orderNo", orderNo);
param.put("merName", merName);
param.put("contactsPhone", contactsPhone); param.put("contactsPhone", contactsPhone);
param.put("status", status); param.put("status", status);
param.put("createTimeS", createTimeS); param.put("createTimeS", createTimeS);

@ -7,13 +7,9 @@ import com.hfkj.common.exception.ErrorCode;
import com.hfkj.common.exception.ErrorHelp; import com.hfkj.common.exception.ErrorHelp;
import com.hfkj.common.exception.SysCode; import com.hfkj.common.exception.SysCode;
import com.hfkj.common.utils.ResponseMsgUtil; import com.hfkj.common.utils.ResponseMsgUtil;
import com.hfkj.entity.BsGasOilGunNo; import com.hfkj.entity.*;
import com.hfkj.entity.BsGasOilPrice;
import com.hfkj.entity.BsMerchant;
import com.hfkj.model.ResponseData; import com.hfkj.model.ResponseData;
import com.hfkj.service.merchant.BsMerchantAccountRecordService; import com.hfkj.service.merchant.*;
import com.hfkj.service.merchant.BsMerchantAccountService;
import com.hfkj.service.merchant.BsMerchantService;
import com.hfkj.sysenum.merchant.MerchantChainBrandSettleTypeEnum; import com.hfkj.sysenum.merchant.MerchantChainBrandSettleTypeEnum;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
@ -43,17 +39,34 @@ public class BsMerchantAccountController {
@Resource @Resource
private BsMerchantAccountService merchantAccountService; private BsMerchantAccountService merchantAccountService;
@Resource @Resource
private BsMerchantChainBrandAccountService merchantChainBrandAccountService;
@Resource
private BsMerchantService merchantService; private BsMerchantService merchantService;
@Resource @Resource
private BsMerchantAccountRecordService merchantAccountRecordService; private BsMerchantAccountRecordService merchantAccountRecordService;
@Resource
private BsMerchantChainBrandAccountRecordService merchantChainBrandAccountRecord;
@RequestMapping(value = "/getAccount", method = RequestMethod.GET) @RequestMapping(value = "/getAccount", method = RequestMethod.GET)
@ResponseBody @ResponseBody
@ApiOperation(value = "查询账户") @ApiOperation(value = "查询账户")
public ResponseData getAccount(@RequestParam(value = "merNo", required = true) String merNo) { public ResponseData getAccount(@RequestParam(value = "merNo", required = true) String merNo) {
try { try {
// 查询商户详情
BsMerchant merchant = merchantService.getMerchant(merNo);
if (merchant == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的商户账户");
}
// 查询账户 // 查询账户
return ResponseMsgUtil.success(merchantAccountService.getAccount(merNo)); BsMerchantAccount account = merchantAccountService.getAccount(merNo);
if (merchant.getChainBrandId() != null && merchant.getChainBrandSettleType().equals(MerchantChainBrandSettleTypeEnum.type1.getNumber())) {
// 连锁额度
BsMerchantChainBrandAccount brandAccount = merchantChainBrandAccountService.getAccount(merchant.getChainBrandId());
account.setAmount(brandAccount.getAmount());
}
return ResponseMsgUtil.success(account);
} catch (Exception e) { } catch (Exception e) {
log.error("BsMerchantAccountController --> getAccount() error!", e); log.error("BsMerchantAccountController --> getAccount() error!", e);
@ -81,7 +94,7 @@ public class BsMerchantAccountController {
} }
if (merchant.getChainBrandId() != null if (merchant.getChainBrandId() != null
&& merchant.getChainBrandSettleType().equals(MerchantChainBrandSettleTypeEnum.type1.getNumber())) { && merchant.getChainBrandSettleType().equals(MerchantChainBrandSettleTypeEnum.type1.getNumber())) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, "结算方式为连锁额度,不可以进行充值。"); throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "结算方式为连锁额度,不可以进行充值。");
} }
// 账户充值 // 账户充值
merchantAccountService.recharge(body.getString("merNo"), body.getBigDecimal("amount")); merchantAccountService.recharge(body.getString("merNo"), body.getBigDecimal("amount"));
@ -125,16 +138,28 @@ public class BsMerchantAccountController {
@RequestMapping(value = "/getRecordList", method = RequestMethod.GET) @RequestMapping(value = "/getRecordList", method = RequestMethod.GET)
@ResponseBody @ResponseBody
@ApiOperation(value = "记录列表") @ApiOperation(value = "记录列表")
public ResponseData getRecordList(@RequestParam(value = "merNo", required = true) Long merNo, public ResponseData getRecordList(@RequestParam(value = "merNo", required = true) String merNo,
@RequestParam(value = "pageNum", required = true) Integer pageNum, @RequestParam(value = "pageNum", required = true) Integer pageNum,
@RequestParam(value = "pageSize", required = true) Integer pageSize) { @RequestParam(value = "pageSize", required = true) Integer pageSize) {
try { try {
// 查询商户详情
BsMerchant merchant = merchantService.getMerchant(merNo);
if (merchant == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的商户");
}
Map<String,Object> param = new HashMap<>(); Map<String,Object> param = new HashMap<>();
param.put("merNo", merNo);
PageHelper.startPage(pageNum,pageSize); PageHelper.startPage(pageNum,pageSize);
return ResponseMsgUtil.success(new PageInfo<>(merchantAccountRecordService.getList(param))); if (merchant.getChainBrandId() != null && merchant.getChainBrandSettleType().equals(MerchantChainBrandSettleTypeEnum.type1.getNumber())) {
// 连锁额度账户
BsMerchantChainBrandAccount brandAccount = merchantChainBrandAccountService.getAccount(merchant.getChainBrandId());
param.put("merChainBrandAccountId", brandAccount.getId());
return ResponseMsgUtil.success(new PageInfo<>(merchantChainBrandAccountRecord.getList(param)));
} else {
param.put("merNo", merNo);
return ResponseMsgUtil.success(new PageInfo<>(merchantAccountRecordService.getList(param)));
}
} catch (Exception e) { } catch (Exception e) {
log.error("BsMerchantAccountController --> getRecordList() error!", e); log.error("BsMerchantAccountController --> getRecordList() error!", e);

@ -14,6 +14,6 @@ public interface BsGasOilPriceWeekMapperExt {
*/ */
@Update(" update (select weeks,mer_id,oil_no,price_official,price_gun,price_vip from bs_gas_oil_price_week where weeks = #{week}) a " + @Update(" update (select weeks,mer_id,oil_no,price_official,price_gun,price_vip from bs_gas_oil_price_week where weeks = #{week}) a " +
" LEFT JOIN bs_gas_oil_price b on b.mer_id = a.mer_id and b.oil_no = a.oil_no " + " LEFT JOIN bs_gas_oil_price b on b.mer_id = a.mer_id and b.oil_no = a.oil_no " +
" set b.price_gun = a.price_gun, b.price_vip = a.price_vip, b.gas_station_drop = (a.price_official - a.price_gun)") " set b.price_official = a.price_official,b.price_gun = a.price_gun, b.price_vip = a.price_vip, b.gas_station_drop = (a.price_official - a.price_gun)")
void updatePrice(@Param("week") Integer week); void updatePrice(@Param("week") Integer week);
} }

@ -42,6 +42,9 @@ public interface BsGasOrderReceiptMapper extends BsGasOrderReceiptMapperExt {
"insert into bs_gas_order_receipt (apply_no, user_receipt_id, ", "insert into bs_gas_order_receipt (apply_no, user_receipt_id, ",
"company_name, tax_no, ", "company_name, tax_no, ",
"contacts_phone, email, ", "contacts_phone, email, ",
"agent_id, agent_name, ",
"agent_staff_id, agent_staff_name, ",
"mer_no, mer_name, ",
"order_no, order_child_no, ", "order_no, order_child_no, ",
"oil_no, amount, `status`, ", "oil_no, amount, `status`, ",
"fail_remark, create_time, ", "fail_remark, create_time, ",
@ -50,6 +53,9 @@ public interface BsGasOrderReceiptMapper extends BsGasOrderReceiptMapperExt {
"values (#{applyNo,jdbcType=VARCHAR}, #{userReceiptId,jdbcType=BIGINT}, ", "values (#{applyNo,jdbcType=VARCHAR}, #{userReceiptId,jdbcType=BIGINT}, ",
"#{companyName,jdbcType=VARCHAR}, #{taxNo,jdbcType=VARCHAR}, ", "#{companyName,jdbcType=VARCHAR}, #{taxNo,jdbcType=VARCHAR}, ",
"#{contactsPhone,jdbcType=VARCHAR}, #{email,jdbcType=VARCHAR}, ", "#{contactsPhone,jdbcType=VARCHAR}, #{email,jdbcType=VARCHAR}, ",
"#{agentId,jdbcType=BIGINT}, #{agentName,jdbcType=VARCHAR}, ",
"#{agentStaffId,jdbcType=BIGINT}, #{agentStaffName,jdbcType=VARCHAR}, ",
"#{merNo,jdbcType=VARCHAR}, #{merName,jdbcType=VARCHAR}, ",
"#{orderNo,jdbcType=VARCHAR}, #{orderChildNo,jdbcType=VARCHAR}, ", "#{orderNo,jdbcType=VARCHAR}, #{orderChildNo,jdbcType=VARCHAR}, ",
"#{oilNo,jdbcType=VARCHAR}, #{amount,jdbcType=DECIMAL}, #{status,jdbcType=INTEGER}, ", "#{oilNo,jdbcType=VARCHAR}, #{amount,jdbcType=DECIMAL}, #{status,jdbcType=INTEGER}, ",
"#{failRemark,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, ", "#{failRemark,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, ",
@ -72,6 +78,12 @@ public interface BsGasOrderReceiptMapper extends BsGasOrderReceiptMapperExt {
@Result(column="tax_no", property="taxNo", jdbcType=JdbcType.VARCHAR), @Result(column="tax_no", property="taxNo", jdbcType=JdbcType.VARCHAR),
@Result(column="contacts_phone", property="contactsPhone", jdbcType=JdbcType.VARCHAR), @Result(column="contacts_phone", property="contactsPhone", jdbcType=JdbcType.VARCHAR),
@Result(column="email", property="email", jdbcType=JdbcType.VARCHAR), @Result(column="email", property="email", jdbcType=JdbcType.VARCHAR),
@Result(column="agent_id", property="agentId", jdbcType=JdbcType.BIGINT),
@Result(column="agent_name", property="agentName", jdbcType=JdbcType.VARCHAR),
@Result(column="agent_staff_id", property="agentStaffId", jdbcType=JdbcType.BIGINT),
@Result(column="agent_staff_name", property="agentStaffName", jdbcType=JdbcType.VARCHAR),
@Result(column="mer_no", property="merNo", jdbcType=JdbcType.VARCHAR),
@Result(column="mer_name", property="merName", jdbcType=JdbcType.VARCHAR),
@Result(column="order_no", property="orderNo", jdbcType=JdbcType.VARCHAR), @Result(column="order_no", property="orderNo", jdbcType=JdbcType.VARCHAR),
@Result(column="order_child_no", property="orderChildNo", jdbcType=JdbcType.VARCHAR), @Result(column="order_child_no", property="orderChildNo", jdbcType=JdbcType.VARCHAR),
@Result(column="oil_no", property="oilNo", jdbcType=JdbcType.VARCHAR), @Result(column="oil_no", property="oilNo", jdbcType=JdbcType.VARCHAR),
@ -89,8 +101,9 @@ public interface BsGasOrderReceiptMapper extends BsGasOrderReceiptMapperExt {
@Select({ @Select({
"select", "select",
"id, apply_no, user_receipt_id, company_name, tax_no, contacts_phone, email, ", "id, apply_no, user_receipt_id, company_name, tax_no, contacts_phone, email, ",
"order_no, order_child_no, oil_no, amount, `status`, fail_remark, create_time, ", "agent_id, agent_name, agent_staff_id, agent_staff_name, mer_no, mer_name, order_no, ",
"update_time, ext_1, ext_2, ext_3", "order_child_no, oil_no, amount, `status`, fail_remark, create_time, update_time, ",
"ext_1, ext_2, ext_3",
"from bs_gas_order_receipt", "from bs_gas_order_receipt",
"where id = #{id,jdbcType=BIGINT}" "where id = #{id,jdbcType=BIGINT}"
}) })
@ -102,6 +115,12 @@ public interface BsGasOrderReceiptMapper extends BsGasOrderReceiptMapperExt {
@Result(column="tax_no", property="taxNo", jdbcType=JdbcType.VARCHAR), @Result(column="tax_no", property="taxNo", jdbcType=JdbcType.VARCHAR),
@Result(column="contacts_phone", property="contactsPhone", jdbcType=JdbcType.VARCHAR), @Result(column="contacts_phone", property="contactsPhone", jdbcType=JdbcType.VARCHAR),
@Result(column="email", property="email", jdbcType=JdbcType.VARCHAR), @Result(column="email", property="email", jdbcType=JdbcType.VARCHAR),
@Result(column="agent_id", property="agentId", jdbcType=JdbcType.BIGINT),
@Result(column="agent_name", property="agentName", jdbcType=JdbcType.VARCHAR),
@Result(column="agent_staff_id", property="agentStaffId", jdbcType=JdbcType.BIGINT),
@Result(column="agent_staff_name", property="agentStaffName", jdbcType=JdbcType.VARCHAR),
@Result(column="mer_no", property="merNo", jdbcType=JdbcType.VARCHAR),
@Result(column="mer_name", property="merName", jdbcType=JdbcType.VARCHAR),
@Result(column="order_no", property="orderNo", jdbcType=JdbcType.VARCHAR), @Result(column="order_no", property="orderNo", jdbcType=JdbcType.VARCHAR),
@Result(column="order_child_no", property="orderChildNo", jdbcType=JdbcType.VARCHAR), @Result(column="order_child_no", property="orderChildNo", jdbcType=JdbcType.VARCHAR),
@Result(column="oil_no", property="oilNo", jdbcType=JdbcType.VARCHAR), @Result(column="oil_no", property="oilNo", jdbcType=JdbcType.VARCHAR),
@ -133,6 +152,12 @@ public interface BsGasOrderReceiptMapper extends BsGasOrderReceiptMapperExt {
"tax_no = #{taxNo,jdbcType=VARCHAR},", "tax_no = #{taxNo,jdbcType=VARCHAR},",
"contacts_phone = #{contactsPhone,jdbcType=VARCHAR},", "contacts_phone = #{contactsPhone,jdbcType=VARCHAR},",
"email = #{email,jdbcType=VARCHAR},", "email = #{email,jdbcType=VARCHAR},",
"agent_id = #{agentId,jdbcType=BIGINT},",
"agent_name = #{agentName,jdbcType=VARCHAR},",
"agent_staff_id = #{agentStaffId,jdbcType=BIGINT},",
"agent_staff_name = #{agentStaffName,jdbcType=VARCHAR},",
"mer_no = #{merNo,jdbcType=VARCHAR},",
"mer_name = #{merName,jdbcType=VARCHAR},",
"order_no = #{orderNo,jdbcType=VARCHAR},", "order_no = #{orderNo,jdbcType=VARCHAR},",
"order_child_no = #{orderChildNo,jdbcType=VARCHAR},", "order_child_no = #{orderChildNo,jdbcType=VARCHAR},",
"oil_no = #{oilNo,jdbcType=VARCHAR},", "oil_no = #{oilNo,jdbcType=VARCHAR},",

@ -52,6 +52,30 @@ public class BsGasOrderReceiptSqlProvider {
sql.VALUES("email", "#{email,jdbcType=VARCHAR}"); sql.VALUES("email", "#{email,jdbcType=VARCHAR}");
} }
if (record.getAgentId() != null) {
sql.VALUES("agent_id", "#{agentId,jdbcType=BIGINT}");
}
if (record.getAgentName() != null) {
sql.VALUES("agent_name", "#{agentName,jdbcType=VARCHAR}");
}
if (record.getAgentStaffId() != null) {
sql.VALUES("agent_staff_id", "#{agentStaffId,jdbcType=BIGINT}");
}
if (record.getAgentStaffName() != null) {
sql.VALUES("agent_staff_name", "#{agentStaffName,jdbcType=VARCHAR}");
}
if (record.getMerNo() != null) {
sql.VALUES("mer_no", "#{merNo,jdbcType=VARCHAR}");
}
if (record.getMerName() != null) {
sql.VALUES("mer_name", "#{merName,jdbcType=VARCHAR}");
}
if (record.getOrderNo() != null) { if (record.getOrderNo() != null) {
sql.VALUES("order_no", "#{orderNo,jdbcType=VARCHAR}"); sql.VALUES("order_no", "#{orderNo,jdbcType=VARCHAR}");
} }
@ -112,6 +136,12 @@ public class BsGasOrderReceiptSqlProvider {
sql.SELECT("tax_no"); sql.SELECT("tax_no");
sql.SELECT("contacts_phone"); sql.SELECT("contacts_phone");
sql.SELECT("email"); sql.SELECT("email");
sql.SELECT("agent_id");
sql.SELECT("agent_name");
sql.SELECT("agent_staff_id");
sql.SELECT("agent_staff_name");
sql.SELECT("mer_no");
sql.SELECT("mer_name");
sql.SELECT("order_no"); sql.SELECT("order_no");
sql.SELECT("order_child_no"); sql.SELECT("order_child_no");
sql.SELECT("oil_no"); sql.SELECT("oil_no");
@ -168,6 +198,30 @@ public class BsGasOrderReceiptSqlProvider {
sql.SET("email = #{record.email,jdbcType=VARCHAR}"); sql.SET("email = #{record.email,jdbcType=VARCHAR}");
} }
if (record.getAgentId() != null) {
sql.SET("agent_id = #{record.agentId,jdbcType=BIGINT}");
}
if (record.getAgentName() != null) {
sql.SET("agent_name = #{record.agentName,jdbcType=VARCHAR}");
}
if (record.getAgentStaffId() != null) {
sql.SET("agent_staff_id = #{record.agentStaffId,jdbcType=BIGINT}");
}
if (record.getAgentStaffName() != null) {
sql.SET("agent_staff_name = #{record.agentStaffName,jdbcType=VARCHAR}");
}
if (record.getMerNo() != null) {
sql.SET("mer_no = #{record.merNo,jdbcType=VARCHAR}");
}
if (record.getMerName() != null) {
sql.SET("mer_name = #{record.merName,jdbcType=VARCHAR}");
}
if (record.getOrderNo() != null) { if (record.getOrderNo() != null) {
sql.SET("order_no = #{record.orderNo,jdbcType=VARCHAR}"); sql.SET("order_no = #{record.orderNo,jdbcType=VARCHAR}");
} }
@ -227,6 +281,12 @@ public class BsGasOrderReceiptSqlProvider {
sql.SET("tax_no = #{record.taxNo,jdbcType=VARCHAR}"); sql.SET("tax_no = #{record.taxNo,jdbcType=VARCHAR}");
sql.SET("contacts_phone = #{record.contactsPhone,jdbcType=VARCHAR}"); sql.SET("contacts_phone = #{record.contactsPhone,jdbcType=VARCHAR}");
sql.SET("email = #{record.email,jdbcType=VARCHAR}"); sql.SET("email = #{record.email,jdbcType=VARCHAR}");
sql.SET("agent_id = #{record.agentId,jdbcType=BIGINT}");
sql.SET("agent_name = #{record.agentName,jdbcType=VARCHAR}");
sql.SET("agent_staff_id = #{record.agentStaffId,jdbcType=BIGINT}");
sql.SET("agent_staff_name = #{record.agentStaffName,jdbcType=VARCHAR}");
sql.SET("mer_no = #{record.merNo,jdbcType=VARCHAR}");
sql.SET("mer_name = #{record.merName,jdbcType=VARCHAR}");
sql.SET("order_no = #{record.orderNo,jdbcType=VARCHAR}"); sql.SET("order_no = #{record.orderNo,jdbcType=VARCHAR}");
sql.SET("order_child_no = #{record.orderChildNo,jdbcType=VARCHAR}"); sql.SET("order_child_no = #{record.orderChildNo,jdbcType=VARCHAR}");
sql.SET("oil_no = #{record.oilNo,jdbcType=VARCHAR}"); sql.SET("oil_no = #{record.oilNo,jdbcType=VARCHAR}");
@ -272,6 +332,30 @@ public class BsGasOrderReceiptSqlProvider {
sql.SET("email = #{email,jdbcType=VARCHAR}"); sql.SET("email = #{email,jdbcType=VARCHAR}");
} }
if (record.getAgentId() != null) {
sql.SET("agent_id = #{agentId,jdbcType=BIGINT}");
}
if (record.getAgentName() != null) {
sql.SET("agent_name = #{agentName,jdbcType=VARCHAR}");
}
if (record.getAgentStaffId() != null) {
sql.SET("agent_staff_id = #{agentStaffId,jdbcType=BIGINT}");
}
if (record.getAgentStaffName() != null) {
sql.SET("agent_staff_name = #{agentStaffName,jdbcType=VARCHAR}");
}
if (record.getMerNo() != null) {
sql.SET("mer_no = #{merNo,jdbcType=VARCHAR}");
}
if (record.getMerName() != null) {
sql.SET("mer_name = #{merName,jdbcType=VARCHAR}");
}
if (record.getOrderNo() != null) { if (record.getOrderNo() != null) {
sql.SET("order_no = #{orderNo,jdbcType=VARCHAR}"); sql.SET("order_no = #{orderNo,jdbcType=VARCHAR}");
} }

@ -5,6 +5,7 @@ import org.apache.ibatis.annotations.Select;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.TreeMap;
/** /**
* mapper扩展类 * mapper扩展类
@ -13,13 +14,20 @@ public interface BsMerchantAccountMapperExt {
@Select("<script>" + @Select("<script>" +
" SELECT" + " SELECT" +
" b.chain_brand_id chainBrandId," +
" b.chain_brand_name chainBrandName," +
" b.province_name provinceName," + " b.province_name provinceName," +
" b.city_name cityName," + " b.city_name cityName," +
" b.area_name areaName," + " b.area_name areaName," +
" b.mer_no merNo," + " b.mer_no merNo," +
" b.mer_name merName," + " b.mer_name merName," +
" b.address," + " b.address," +
" a.amount " + " case when chain_brand_id is not null" +
" then " +
" (case b.chain_brand_settle_type" +
" when 1 then (select amount from bs_merchant_chain_brand_account where mer_chain_brand_id = b.chain_brand_id and `status` = 1 LIMIT 1)" +
" when 2 then a.amount end)" +
" else a.amount end amount" +
" FROM" + " FROM" +
" bs_merchant_account a" + " bs_merchant_account a" +
" LEFT JOIN bs_merchant b ON a.mer_no = b.mer_no" + " LEFT JOIN bs_merchant b ON a.mer_no = b.mer_no" +
@ -31,5 +39,5 @@ public interface BsMerchantAccountMapperExt {
" <if test='param.merName != null'> and b.mer_name like concat('%',#{param.merName},'%') </if>" + " <if test='param.merName != null'> and b.mer_name like concat('%',#{param.merName},'%') </if>" +
" ORDER BY a.amount asc" + " ORDER BY a.amount asc" +
"</script>") "</script>")
List<Map<String,Object>> selectMerList(@Param("param") Map<String,Object> param); List<TreeMap<String,Object>> selectMerList(@Param("param") Map<String,Object> param);
} }

@ -46,6 +46,36 @@ public class BsGasOrderReceipt implements Serializable {
*/ */
private String email; private String email;
/**
* 代理商id
*/
private Long agentId;
/**
* 代理商名称
*/
private String agentName;
/**
* 业务员id
*/
private Long agentStaffId;
/**
* 业务员名称
*/
private String agentStaffName;
/**
* 商户编号
*/
private String merNo;
/**
* 商户名称
*/
private String merName;
/** /**
* 交易订单号 * 交易订单号
*/ */
@ -150,6 +180,54 @@ public class BsGasOrderReceipt implements Serializable {
this.email = email; this.email = email;
} }
public Long getAgentId() {
return agentId;
}
public void setAgentId(Long agentId) {
this.agentId = agentId;
}
public String getAgentName() {
return agentName;
}
public void setAgentName(String agentName) {
this.agentName = agentName;
}
public Long getAgentStaffId() {
return agentStaffId;
}
public void setAgentStaffId(Long agentStaffId) {
this.agentStaffId = agentStaffId;
}
public String getAgentStaffName() {
return agentStaffName;
}
public void setAgentStaffName(String agentStaffName) {
this.agentStaffName = agentStaffName;
}
public String getMerNo() {
return merNo;
}
public void setMerNo(String merNo) {
this.merNo = merNo;
}
public String getMerName() {
return merName;
}
public void setMerName(String merName) {
this.merName = merName;
}
public String getOrderNo() { public String getOrderNo() {
return orderNo; return orderNo;
} }
@ -257,6 +335,12 @@ public class BsGasOrderReceipt implements Serializable {
&& (this.getTaxNo() == null ? other.getTaxNo() == null : this.getTaxNo().equals(other.getTaxNo())) && (this.getTaxNo() == null ? other.getTaxNo() == null : this.getTaxNo().equals(other.getTaxNo()))
&& (this.getContactsPhone() == null ? other.getContactsPhone() == null : this.getContactsPhone().equals(other.getContactsPhone())) && (this.getContactsPhone() == null ? other.getContactsPhone() == null : this.getContactsPhone().equals(other.getContactsPhone()))
&& (this.getEmail() == null ? other.getEmail() == null : this.getEmail().equals(other.getEmail())) && (this.getEmail() == null ? other.getEmail() == null : this.getEmail().equals(other.getEmail()))
&& (this.getAgentId() == null ? other.getAgentId() == null : this.getAgentId().equals(other.getAgentId()))
&& (this.getAgentName() == null ? other.getAgentName() == null : this.getAgentName().equals(other.getAgentName()))
&& (this.getAgentStaffId() == null ? other.getAgentStaffId() == null : this.getAgentStaffId().equals(other.getAgentStaffId()))
&& (this.getAgentStaffName() == null ? other.getAgentStaffName() == null : this.getAgentStaffName().equals(other.getAgentStaffName()))
&& (this.getMerNo() == null ? other.getMerNo() == null : this.getMerNo().equals(other.getMerNo()))
&& (this.getMerName() == null ? other.getMerName() == null : this.getMerName().equals(other.getMerName()))
&& (this.getOrderNo() == null ? other.getOrderNo() == null : this.getOrderNo().equals(other.getOrderNo())) && (this.getOrderNo() == null ? other.getOrderNo() == null : this.getOrderNo().equals(other.getOrderNo()))
&& (this.getOrderChildNo() == null ? other.getOrderChildNo() == null : this.getOrderChildNo().equals(other.getOrderChildNo())) && (this.getOrderChildNo() == null ? other.getOrderChildNo() == null : this.getOrderChildNo().equals(other.getOrderChildNo()))
&& (this.getOilNo() == null ? other.getOilNo() == null : this.getOilNo().equals(other.getOilNo())) && (this.getOilNo() == null ? other.getOilNo() == null : this.getOilNo().equals(other.getOilNo()))
@ -281,6 +365,12 @@ public class BsGasOrderReceipt implements Serializable {
result = prime * result + ((getTaxNo() == null) ? 0 : getTaxNo().hashCode()); result = prime * result + ((getTaxNo() == null) ? 0 : getTaxNo().hashCode());
result = prime * result + ((getContactsPhone() == null) ? 0 : getContactsPhone().hashCode()); result = prime * result + ((getContactsPhone() == null) ? 0 : getContactsPhone().hashCode());
result = prime * result + ((getEmail() == null) ? 0 : getEmail().hashCode()); result = prime * result + ((getEmail() == null) ? 0 : getEmail().hashCode());
result = prime * result + ((getAgentId() == null) ? 0 : getAgentId().hashCode());
result = prime * result + ((getAgentName() == null) ? 0 : getAgentName().hashCode());
result = prime * result + ((getAgentStaffId() == null) ? 0 : getAgentStaffId().hashCode());
result = prime * result + ((getAgentStaffName() == null) ? 0 : getAgentStaffName().hashCode());
result = prime * result + ((getMerNo() == null) ? 0 : getMerNo().hashCode());
result = prime * result + ((getMerName() == null) ? 0 : getMerName().hashCode());
result = prime * result + ((getOrderNo() == null) ? 0 : getOrderNo().hashCode()); result = prime * result + ((getOrderNo() == null) ? 0 : getOrderNo().hashCode());
result = prime * result + ((getOrderChildNo() == null) ? 0 : getOrderChildNo().hashCode()); result = prime * result + ((getOrderChildNo() == null) ? 0 : getOrderChildNo().hashCode());
result = prime * result + ((getOilNo() == null) ? 0 : getOilNo().hashCode()); result = prime * result + ((getOilNo() == null) ? 0 : getOilNo().hashCode());
@ -308,6 +398,12 @@ public class BsGasOrderReceipt implements Serializable {
sb.append(", taxNo=").append(taxNo); sb.append(", taxNo=").append(taxNo);
sb.append(", contactsPhone=").append(contactsPhone); sb.append(", contactsPhone=").append(contactsPhone);
sb.append(", email=").append(email); sb.append(", email=").append(email);
sb.append(", agentId=").append(agentId);
sb.append(", agentName=").append(agentName);
sb.append(", agentStaffId=").append(agentStaffId);
sb.append(", agentStaffName=").append(agentStaffName);
sb.append(", merNo=").append(merNo);
sb.append(", merName=").append(merName);
sb.append(", orderNo=").append(orderNo); sb.append(", orderNo=").append(orderNo);
sb.append(", orderChildNo=").append(orderChildNo); sb.append(", orderChildNo=").append(orderChildNo);
sb.append(", oilNo=").append(oilNo); sb.append(", oilNo=").append(oilNo);

@ -596,6 +596,406 @@ public class BsGasOrderReceiptExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andAgentIdIsNull() {
addCriterion("agent_id is null");
return (Criteria) this;
}
public Criteria andAgentIdIsNotNull() {
addCriterion("agent_id is not null");
return (Criteria) this;
}
public Criteria andAgentIdEqualTo(Long value) {
addCriterion("agent_id =", value, "agentId");
return (Criteria) this;
}
public Criteria andAgentIdNotEqualTo(Long value) {
addCriterion("agent_id <>", value, "agentId");
return (Criteria) this;
}
public Criteria andAgentIdGreaterThan(Long value) {
addCriterion("agent_id >", value, "agentId");
return (Criteria) this;
}
public Criteria andAgentIdGreaterThanOrEqualTo(Long value) {
addCriterion("agent_id >=", value, "agentId");
return (Criteria) this;
}
public Criteria andAgentIdLessThan(Long value) {
addCriterion("agent_id <", value, "agentId");
return (Criteria) this;
}
public Criteria andAgentIdLessThanOrEqualTo(Long value) {
addCriterion("agent_id <=", value, "agentId");
return (Criteria) this;
}
public Criteria andAgentIdIn(List<Long> values) {
addCriterion("agent_id in", values, "agentId");
return (Criteria) this;
}
public Criteria andAgentIdNotIn(List<Long> values) {
addCriterion("agent_id not in", values, "agentId");
return (Criteria) this;
}
public Criteria andAgentIdBetween(Long value1, Long value2) {
addCriterion("agent_id between", value1, value2, "agentId");
return (Criteria) this;
}
public Criteria andAgentIdNotBetween(Long value1, Long value2) {
addCriterion("agent_id not between", value1, value2, "agentId");
return (Criteria) this;
}
public Criteria andAgentNameIsNull() {
addCriterion("agent_name is null");
return (Criteria) this;
}
public Criteria andAgentNameIsNotNull() {
addCriterion("agent_name is not null");
return (Criteria) this;
}
public Criteria andAgentNameEqualTo(String value) {
addCriterion("agent_name =", value, "agentName");
return (Criteria) this;
}
public Criteria andAgentNameNotEqualTo(String value) {
addCriterion("agent_name <>", value, "agentName");
return (Criteria) this;
}
public Criteria andAgentNameGreaterThan(String value) {
addCriterion("agent_name >", value, "agentName");
return (Criteria) this;
}
public Criteria andAgentNameGreaterThanOrEqualTo(String value) {
addCriterion("agent_name >=", value, "agentName");
return (Criteria) this;
}
public Criteria andAgentNameLessThan(String value) {
addCriterion("agent_name <", value, "agentName");
return (Criteria) this;
}
public Criteria andAgentNameLessThanOrEqualTo(String value) {
addCriterion("agent_name <=", value, "agentName");
return (Criteria) this;
}
public Criteria andAgentNameLike(String value) {
addCriterion("agent_name like", value, "agentName");
return (Criteria) this;
}
public Criteria andAgentNameNotLike(String value) {
addCriterion("agent_name not like", value, "agentName");
return (Criteria) this;
}
public Criteria andAgentNameIn(List<String> values) {
addCriterion("agent_name in", values, "agentName");
return (Criteria) this;
}
public Criteria andAgentNameNotIn(List<String> values) {
addCriterion("agent_name not in", values, "agentName");
return (Criteria) this;
}
public Criteria andAgentNameBetween(String value1, String value2) {
addCriterion("agent_name between", value1, value2, "agentName");
return (Criteria) this;
}
public Criteria andAgentNameNotBetween(String value1, String value2) {
addCriterion("agent_name not between", value1, value2, "agentName");
return (Criteria) this;
}
public Criteria andAgentStaffIdIsNull() {
addCriterion("agent_staff_id is null");
return (Criteria) this;
}
public Criteria andAgentStaffIdIsNotNull() {
addCriterion("agent_staff_id is not null");
return (Criteria) this;
}
public Criteria andAgentStaffIdEqualTo(Long value) {
addCriterion("agent_staff_id =", value, "agentStaffId");
return (Criteria) this;
}
public Criteria andAgentStaffIdNotEqualTo(Long value) {
addCriterion("agent_staff_id <>", value, "agentStaffId");
return (Criteria) this;
}
public Criteria andAgentStaffIdGreaterThan(Long value) {
addCriterion("agent_staff_id >", value, "agentStaffId");
return (Criteria) this;
}
public Criteria andAgentStaffIdGreaterThanOrEqualTo(Long value) {
addCriterion("agent_staff_id >=", value, "agentStaffId");
return (Criteria) this;
}
public Criteria andAgentStaffIdLessThan(Long value) {
addCriterion("agent_staff_id <", value, "agentStaffId");
return (Criteria) this;
}
public Criteria andAgentStaffIdLessThanOrEqualTo(Long value) {
addCriterion("agent_staff_id <=", value, "agentStaffId");
return (Criteria) this;
}
public Criteria andAgentStaffIdIn(List<Long> values) {
addCriterion("agent_staff_id in", values, "agentStaffId");
return (Criteria) this;
}
public Criteria andAgentStaffIdNotIn(List<Long> values) {
addCriterion("agent_staff_id not in", values, "agentStaffId");
return (Criteria) this;
}
public Criteria andAgentStaffIdBetween(Long value1, Long value2) {
addCriterion("agent_staff_id between", value1, value2, "agentStaffId");
return (Criteria) this;
}
public Criteria andAgentStaffIdNotBetween(Long value1, Long value2) {
addCriterion("agent_staff_id not between", value1, value2, "agentStaffId");
return (Criteria) this;
}
public Criteria andAgentStaffNameIsNull() {
addCriterion("agent_staff_name is null");
return (Criteria) this;
}
public Criteria andAgentStaffNameIsNotNull() {
addCriterion("agent_staff_name is not null");
return (Criteria) this;
}
public Criteria andAgentStaffNameEqualTo(String value) {
addCriterion("agent_staff_name =", value, "agentStaffName");
return (Criteria) this;
}
public Criteria andAgentStaffNameNotEqualTo(String value) {
addCriterion("agent_staff_name <>", value, "agentStaffName");
return (Criteria) this;
}
public Criteria andAgentStaffNameGreaterThan(String value) {
addCriterion("agent_staff_name >", value, "agentStaffName");
return (Criteria) this;
}
public Criteria andAgentStaffNameGreaterThanOrEqualTo(String value) {
addCriterion("agent_staff_name >=", value, "agentStaffName");
return (Criteria) this;
}
public Criteria andAgentStaffNameLessThan(String value) {
addCriterion("agent_staff_name <", value, "agentStaffName");
return (Criteria) this;
}
public Criteria andAgentStaffNameLessThanOrEqualTo(String value) {
addCriterion("agent_staff_name <=", value, "agentStaffName");
return (Criteria) this;
}
public Criteria andAgentStaffNameLike(String value) {
addCriterion("agent_staff_name like", value, "agentStaffName");
return (Criteria) this;
}
public Criteria andAgentStaffNameNotLike(String value) {
addCriterion("agent_staff_name not like", value, "agentStaffName");
return (Criteria) this;
}
public Criteria andAgentStaffNameIn(List<String> values) {
addCriterion("agent_staff_name in", values, "agentStaffName");
return (Criteria) this;
}
public Criteria andAgentStaffNameNotIn(List<String> values) {
addCriterion("agent_staff_name not in", values, "agentStaffName");
return (Criteria) this;
}
public Criteria andAgentStaffNameBetween(String value1, String value2) {
addCriterion("agent_staff_name between", value1, value2, "agentStaffName");
return (Criteria) this;
}
public Criteria andAgentStaffNameNotBetween(String value1, String value2) {
addCriterion("agent_staff_name not between", value1, value2, "agentStaffName");
return (Criteria) this;
}
public Criteria andMerNoIsNull() {
addCriterion("mer_no is null");
return (Criteria) this;
}
public Criteria andMerNoIsNotNull() {
addCriterion("mer_no is not null");
return (Criteria) this;
}
public Criteria andMerNoEqualTo(String value) {
addCriterion("mer_no =", value, "merNo");
return (Criteria) this;
}
public Criteria andMerNoNotEqualTo(String value) {
addCriterion("mer_no <>", value, "merNo");
return (Criteria) this;
}
public Criteria andMerNoGreaterThan(String value) {
addCriterion("mer_no >", value, "merNo");
return (Criteria) this;
}
public Criteria andMerNoGreaterThanOrEqualTo(String value) {
addCriterion("mer_no >=", value, "merNo");
return (Criteria) this;
}
public Criteria andMerNoLessThan(String value) {
addCriterion("mer_no <", value, "merNo");
return (Criteria) this;
}
public Criteria andMerNoLessThanOrEqualTo(String value) {
addCriterion("mer_no <=", value, "merNo");
return (Criteria) this;
}
public Criteria andMerNoLike(String value) {
addCriterion("mer_no like", value, "merNo");
return (Criteria) this;
}
public Criteria andMerNoNotLike(String value) {
addCriterion("mer_no not like", value, "merNo");
return (Criteria) this;
}
public Criteria andMerNoIn(List<String> values) {
addCriterion("mer_no in", values, "merNo");
return (Criteria) this;
}
public Criteria andMerNoNotIn(List<String> values) {
addCriterion("mer_no not in", values, "merNo");
return (Criteria) this;
}
public Criteria andMerNoBetween(String value1, String value2) {
addCriterion("mer_no between", value1, value2, "merNo");
return (Criteria) this;
}
public Criteria andMerNoNotBetween(String value1, String value2) {
addCriterion("mer_no not between", value1, value2, "merNo");
return (Criteria) this;
}
public Criteria andMerNameIsNull() {
addCriterion("mer_name is null");
return (Criteria) this;
}
public Criteria andMerNameIsNotNull() {
addCriterion("mer_name is not null");
return (Criteria) this;
}
public Criteria andMerNameEqualTo(String value) {
addCriterion("mer_name =", value, "merName");
return (Criteria) this;
}
public Criteria andMerNameNotEqualTo(String value) {
addCriterion("mer_name <>", value, "merName");
return (Criteria) this;
}
public Criteria andMerNameGreaterThan(String value) {
addCriterion("mer_name >", value, "merName");
return (Criteria) this;
}
public Criteria andMerNameGreaterThanOrEqualTo(String value) {
addCriterion("mer_name >=", value, "merName");
return (Criteria) this;
}
public Criteria andMerNameLessThan(String value) {
addCriterion("mer_name <", value, "merName");
return (Criteria) this;
}
public Criteria andMerNameLessThanOrEqualTo(String value) {
addCriterion("mer_name <=", value, "merName");
return (Criteria) this;
}
public Criteria andMerNameLike(String value) {
addCriterion("mer_name like", value, "merName");
return (Criteria) this;
}
public Criteria andMerNameNotLike(String value) {
addCriterion("mer_name not like", value, "merName");
return (Criteria) this;
}
public Criteria andMerNameIn(List<String> values) {
addCriterion("mer_name in", values, "merName");
return (Criteria) this;
}
public Criteria andMerNameNotIn(List<String> values) {
addCriterion("mer_name not in", values, "merName");
return (Criteria) this;
}
public Criteria andMerNameBetween(String value1, String value2) {
addCriterion("mer_name between", value1, value2, "merName");
return (Criteria) this;
}
public Criteria andMerNameNotBetween(String value1, String value2) {
addCriterion("mer_name not between", value1, value2, "merName");
return (Criteria) this;
}
public Criteria andOrderNoIsNull() { public Criteria andOrderNoIsNull() {
addCriterion("order_no is null"); addCriterion("order_no is null");
return (Criteria) this; return (Criteria) this;

@ -72,6 +72,7 @@ public class BsGasOilPriceWeekServiceImpl implements BsGasOilPriceWeekService {
if (oilPrice == null) { if (oilPrice == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到油品价格数据"); throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到油品价格数据");
} }
oilPrice.setPriceOfficial(priceWeek.getPriceOfficial());
oilPrice.setPriceGun(priceWeek.getPriceGun()); oilPrice.setPriceGun(priceWeek.getPriceGun());
oilPrice.setPriceVip(priceWeek.getPriceVip()); oilPrice.setPriceVip(priceWeek.getPriceVip());
oilPrice.setGasStationDrop(oilPrice.getPriceOfficial().subtract(oilPrice.getPriceGun())); oilPrice.setGasStationDrop(oilPrice.getPriceOfficial().subtract(oilPrice.getPriceGun()));

@ -80,6 +80,12 @@ public class BsGasOrderReceiptServiceImpl implements BsGasOrderReceiptService {
gasOrderReceipt.setTaxNo(receipt.getTaxNo()); gasOrderReceipt.setTaxNo(receipt.getTaxNo());
gasOrderReceipt.setContactsPhone(receipt.getContactsPhone()); gasOrderReceipt.setContactsPhone(receipt.getContactsPhone());
gasOrderReceipt.setEmail(receipt.getEmail()); gasOrderReceipt.setEmail(receipt.getEmail());
gasOrderReceipt.setAgentId(gasOrder.getAgentId());
gasOrderReceipt.setAgentName(gasOrder.getAgentName());
gasOrderReceipt.setAgentStaffId(gasOrder.getGasStaffId());
gasOrderReceipt.setAgentStaffName(gasOrderReceipt.getAgentStaffName());
gasOrderReceipt.setMerNo(gasOrder.getMerNo());
gasOrderReceipt.setMerName(gasOrder.getMerName());
gasOrderReceipt.setOrderNo(gasOrder.getOrderNo()); gasOrderReceipt.setOrderNo(gasOrder.getOrderNo());
gasOrderReceipt.setOrderChildNo(gasOrder.getOrderChildNo()); gasOrderReceipt.setOrderChildNo(gasOrder.getOrderChildNo());
gasOrderReceipt.setOilNo(gasOrder.getGasOilNo()); gasOrderReceipt.setOilNo(gasOrder.getGasOilNo());
@ -163,6 +169,22 @@ public class BsGasOrderReceiptServiceImpl implements BsGasOrderReceiptService {
criteria.andContactsPhoneLike("%"+MapUtils.getString(param, "contactsPhone")+"%"); criteria.andContactsPhoneLike("%"+MapUtils.getString(param, "contactsPhone")+"%");
} }
if (StringUtils.isNotBlank(MapUtils.getString(param, "merNo"))) {
criteria.andMerNoEqualTo(MapUtils.getString(param, "merNo"));
}
if (StringUtils.isNotBlank(MapUtils.getString(param, "merName"))) {
criteria.andMerNameLike("%"+MapUtils.getString(param, "merName")+"%");
}
if (MapUtils.getLong(param, "agentId") != null) {
criteria.andAgentIdEqualTo(MapUtils.getLong(param, "agentId"));
}
if (MapUtils.getLong(param, "agentStaffId") != null) {
criteria.andAgentStaffIdEqualTo(MapUtils.getLong(param, "agentStaffId"));
}
if (StringUtils.isNotBlank(MapUtils.getString(param, "status"))) { if (StringUtils.isNotBlank(MapUtils.getString(param, "status"))) {
List<Integer> status = Arrays.stream(MapUtils.getString(param, "status").split(",")) List<Integer> status = Arrays.stream(MapUtils.getString(param, "status").split(","))
.flatMapToInt(num -> IntStream.of(Integer.parseInt(num))).boxed() .flatMapToInt(num -> IntStream.of(Integer.parseInt(num))).boxed()

@ -130,6 +130,10 @@ public class BsGasOrderServiceImpl implements BsGasOrderService {
BsGasOrderExample example = new BsGasOrderExample(); BsGasOrderExample example = new BsGasOrderExample();
BsGasOrderExample.Criteria criteria = example.createCriteria(); BsGasOrderExample.Criteria criteria = example.createCriteria();
if (MapUtils.getLong(param, "merChainBrandId") != null) {
criteria.andMerChainBrandIdEqualTo(MapUtils.getLong(param, "merChainBrandId"));
}
if (MapUtils.getLong(param, "merId") != null) { if (MapUtils.getLong(param, "merId") != null) {
criteria.andMerIdEqualTo(MapUtils.getLong(param, "merId")); criteria.andMerIdEqualTo(MapUtils.getLong(param, "merId"));
} }

@ -6,6 +6,7 @@ import com.hfkj.entity.BsOrderRefund;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.TreeMap;
/** /**
* @className: BsMerchantAccountService * @className: BsMerchantAccountService
@ -54,6 +55,6 @@ public interface BsMerchantAccountService {
* @param param * @param param
* @return * @return
*/ */
List<Map<String,Object>> getMerList(Map<String,Object> param); List<TreeMap<String,Object>> getMerList(Map<String,Object> param);
} }

@ -23,6 +23,7 @@ import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.TreeMap;
/** /**
* @className: BsMerchantAccountServiceImpl * @className: BsMerchantAccountServiceImpl
@ -211,7 +212,7 @@ public class BsMerchantAccountServiceImpl implements BsMerchantAccountService {
} }
@Override @Override
public List<Map<String,Object>> getMerList(Map<String, Object> param) { public List<TreeMap<String,Object>> getMerList(Map<String, Object> param) {
return merchantAccountMapper.selectMerList(param); return merchantAccountMapper.selectMerList(param);
} }

@ -8,6 +8,7 @@ import com.hfkj.dao.BsMerchantChainBrandAccountMapper;
import com.hfkj.entity.*; import com.hfkj.entity.*;
import com.hfkj.service.merchant.BsMerchantChainBrandAccountRecordService; import com.hfkj.service.merchant.BsMerchantChainBrandAccountRecordService;
import com.hfkj.service.merchant.BsMerchantChainBrandAccountService; import com.hfkj.service.merchant.BsMerchantChainBrandAccountService;
import com.hfkj.service.merchant.BsMerchantService;
import com.hfkj.sysenum.merchant.MerchantAccountRecordSourceTypeEnum; import com.hfkj.sysenum.merchant.MerchantAccountRecordSourceTypeEnum;
import com.hfkj.sysenum.merchant.MerchantAccountRecordTypeEnum; import com.hfkj.sysenum.merchant.MerchantAccountRecordTypeEnum;
import org.apache.commons.collections4.MapUtils; import org.apache.commons.collections4.MapUtils;
@ -32,6 +33,8 @@ public class BsMerchantChainBrandAccountServiceImpl implements BsMerchantChainBr
@Resource @Resource
private BsMerchantChainBrandAccountRecordService merchantChainBrandAccountRecordService; private BsMerchantChainBrandAccountRecordService merchantChainBrandAccountRecordService;
@Resource @Resource
private BsMerchantService merchantService;
@Resource
private RedisTemplate<String, Object> redisTemplate; private RedisTemplate<String, Object> redisTemplate;
private final String LOCK_KEY = "MER_CHAIN_BRAND_ACCOUNT_LOCK_"; private final String LOCK_KEY = "MER_CHAIN_BRAND_ACCOUNT_LOCK_";
@Override @Override
@ -128,9 +131,14 @@ public class BsMerchantChainBrandAccountServiceImpl implements BsMerchantChainBr
// 变更后金额 // 变更后金额
BigDecimal afterAmount = account.getAmount(); BigDecimal afterAmount = account.getAmount();
// 查询商户信息
BsMerchant merchant = merchantService.getMerchant(merNo);
BsMerchantChainBrandAccountRecord record = new BsMerchantChainBrandAccountRecord(); BsMerchantChainBrandAccountRecord record = new BsMerchantChainBrandAccountRecord();
record.setMerChainBrandAccountId(account.getId()); record.setMerChainBrandAccountId(account.getId());
record.setMerNo(merNo); record.setMerId(merchant.getId());
record.setMerNo(merchant.getMerNo());
record.setMerName(merchant.getMerName());
record.setType(MerchantAccountRecordTypeEnum.type2.getType()); record.setType(MerchantAccountRecordTypeEnum.type2.getType());
record.setTransactionAmount(amount); record.setTransactionAmount(amount);
record.setBeforeAmount(beforeAmount); record.setBeforeAmount(beforeAmount);
@ -175,9 +183,14 @@ public class BsMerchantChainBrandAccountServiceImpl implements BsMerchantChainBr
// 变更后金额 // 变更后金额
BigDecimal afterAmount = account.getAmount(); BigDecimal afterAmount = account.getAmount();
// 查询商户信息
BsMerchant merchant = merchantService.getMerchant(merNo);
BsMerchantChainBrandAccountRecord record = new BsMerchantChainBrandAccountRecord(); BsMerchantChainBrandAccountRecord record = new BsMerchantChainBrandAccountRecord();
record.setMerChainBrandAccountId(account.getId()); record.setMerChainBrandAccountId(account.getId());
record.setMerNo(merNo); record.setMerId(merchant.getId());
record.setMerNo(merchant.getMerNo());
record.setMerName(merchant.getMerName());
record.setType(MerchantAccountRecordTypeEnum.type1.getType()); record.setType(MerchantAccountRecordTypeEnum.type1.getType());
record.setTransactionAmount(amount); record.setTransactionAmount(amount);
record.setBeforeAmount(beforeAmount); record.setBeforeAmount(beforeAmount);

Loading…
Cancel
Save