提交代码

yy_dev
胡锐 1 year ago
parent 494f28afe8
commit 36f33c9963
  1. 55
      bweb/src/main/java/com/bweb/controller/BsTradeOrderController.java
  2. 47
      bweb/src/main/java/com/bweb/controller/TestController.java
  3. 36
      bweb/src/main/java/com/bweb/excel/model/ExportTradeOrderModel.java
  4. 1
      open-api/src/main/java/com/api/controller/v1/TradeController.java
  5. 23
      service/src/main/java/com/hfkj/dao/BsTradeOrderMapper.java
  6. 14
      service/src/main/java/com/hfkj/dao/BsTradeOrderSqlProvider.java
  7. 16
      service/src/main/java/com/hfkj/entity/BsTradeOrder.java
  8. 70
      service/src/main/java/com/hfkj/entity/BsTradeOrderExample.java
  9. 14
      service/src/main/java/com/hfkj/service/impl/BsTradeOrderServiceImpl.java

@ -18,10 +18,7 @@ import com.hfkj.entity.BsTradeOrder;
import com.hfkj.model.ResponseData; import com.hfkj.model.ResponseData;
import com.hfkj.model.UserInfoModel; import com.hfkj.model.UserInfoModel;
import com.hfkj.service.*; import com.hfkj.service.*;
import com.hfkj.sysenum.PayQrCodeStatusEnum; import com.hfkj.sysenum.*;
import com.hfkj.sysenum.SecUserTypeEnum;
import com.hfkj.sysenum.TradeOrderPayModeEnum;
import com.hfkj.sysenum.TradeOrderStatusEnum;
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.collections4.MapUtils;
@ -62,7 +59,9 @@ public class BsTradeOrderController {
@ApiOperation(value = "查询订单列表") @ApiOperation(value = "查询订单列表")
public ResponseData getOrderList(@RequestParam(value = "salesmanId" , required = false) Long salesmanId, public ResponseData getOrderList(@RequestParam(value = "salesmanId" , required = false) Long salesmanId,
@RequestParam(value = "merId" , required = false) Long merId, @RequestParam(value = "merId" , required = false) Long merId,
@RequestParam(value = "merNo" , required = false) String merNo,
@RequestParam(value = "merName" , required = false) String merName, @RequestParam(value = "merName" , required = false) String merName,
@RequestParam(value = "merAbbreviate" , required = false) String merAbbreviate,
@RequestParam(value = "companyId" , required = false) Long companyId, @RequestParam(value = "companyId" , required = false) Long companyId,
@RequestParam(value = "agentId" , required = false) Long agentId, @RequestParam(value = "agentId" , required = false) Long agentId,
@RequestParam(value = "storeId" , required = false) Long storeId, @RequestParam(value = "storeId" , required = false) Long storeId,
@ -84,6 +83,8 @@ public class BsTradeOrderController {
param.put("salesmanId", salesmanId); param.put("salesmanId", salesmanId);
param.put("merId", merId); param.put("merId", merId);
param.put("merName", merName); param.put("merName", merName);
param.put("merAbbreviate", merAbbreviate);
param.put("merNo", merNo);
param.put("storeId", storeId); param.put("storeId", storeId);
param.put("storeName", storeName); param.put("storeName", storeName);
@ -93,6 +94,8 @@ public class BsTradeOrderController {
param.put("salesmanId", salesmanId); param.put("salesmanId", salesmanId);
param.put("merId", merId); param.put("merId", merId);
param.put("merName", merName); param.put("merName", merName);
param.put("merAbbreviate", merAbbreviate);
param.put("merNo", merNo);
param.put("storeId", storeId); param.put("storeId", storeId);
param.put("storeName", storeName); param.put("storeName", storeName);
@ -100,14 +103,18 @@ public class BsTradeOrderController {
param.put("agentId", userModel.getAgent().getId()); param.put("agentId", userModel.getAgent().getId());
param.put("salesmanId", salesmanId); param.put("salesmanId", salesmanId);
param.put("merId", merId); param.put("merId", merId);
param.put("merNo", merNo);
param.put("merName", merName); param.put("merName", merName);
param.put("merAbbreviate", merAbbreviate);
param.put("storeId", storeId); param.put("storeId", storeId);
param.put("storeName", storeName); param.put("storeName", storeName);
} else if (userModel.getSecUser().getObjectType().equals(SecUserTypeEnum.type3.getNumber())) { } else if (userModel.getSecUser().getObjectType().equals(SecUserTypeEnum.type3.getNumber())) {
param.put("salesmanId", userModel.getSalesman().getId()); param.put("salesmanId", userModel.getSalesman().getId());
param.put("merId", merId); param.put("merId", merId);
param.put("merNo", merNo);
param.put("merName", merName); param.put("merName", merName);
param.put("merAbbreviate", merAbbreviate);
param.put("storeId", storeId); param.put("storeId", storeId);
param.put("storeName", storeName); param.put("storeName", storeName);
@ -137,20 +144,22 @@ public class BsTradeOrderController {
@RequestMapping(value="/exportTradeOrder",method = RequestMethod.GET) @RequestMapping(value="/exportTradeOrder",method = RequestMethod.GET)
@ResponseBody @ResponseBody
@ApiOperation(value = "查询订单列表") @ApiOperation(value = "导出交易订单")
public ResponseData exportTradeOrder(@RequestParam(value = "salesmanId" , required = false) Long salesmanId, public ResponseData exportTradeOrder(@RequestParam(value = "salesmanId" , required = false) Long salesmanId,
@RequestParam(value = "merId" , required = false) Long merId, @RequestParam(value = "merId" , required = false) Long merId,
@RequestParam(value = "merName" , required = false) String merName, @RequestParam(value = "merNo" , required = false) String merNo,
@RequestParam(value = "companyId" , required = false) Long companyId, @RequestParam(value = "merName" , required = false) String merName,
@RequestParam(value = "agentId" , required = false) Long agentId, @RequestParam(value = "merAbbreviate" , required = false) String merAbbreviate,
@RequestParam(value = "storeId" , required = false) Long storeId, @RequestParam(value = "companyId" , required = false) Long companyId,
@RequestParam(value = "storeName" , required = false) String storeName, @RequestParam(value = "agentId" , required = false) Long agentId,
@RequestParam(value = "payMode" , required = false) String payMode, @RequestParam(value = "storeId" , required = false) Long storeId,
@RequestParam(value = "outTradeNo" , required = false) String outTradeNo, @RequestParam(value = "storeName" , required = false) String storeName,
@RequestParam(value = "accTradeNo" , required = false) String accTradeNo, @RequestParam(value = "payMode" , required = false) String payMode,
@RequestParam(value = "payTimeS" , required = false) Long payTimeS, @RequestParam(value = "outTradeNo" , required = false) String outTradeNo,
@RequestParam(value = "payTimeE" , required = false) Long payTimeE, @RequestParam(value = "accTradeNo" , required = false) String accTradeNo,
@RequestParam(value = "status" , required = false) Integer status) { @RequestParam(value = "payTimeS" , required = false) Long payTimeS,
@RequestParam(value = "payTimeE" , required = false) Long payTimeE,
@RequestParam(value = "status" , required = false) Integer status) {
try { try {
Map<String, Object> param = new HashMap<>(); Map<String, Object> param = new HashMap<>();
UserInfoModel userModel = userCenter.getSessionModel(UserInfoModel.class); UserInfoModel userModel = userCenter.getSessionModel(UserInfoModel.class);
@ -160,6 +169,8 @@ public class BsTradeOrderController {
param.put("salesmanId", salesmanId); param.put("salesmanId", salesmanId);
param.put("merId", merId); param.put("merId", merId);
param.put("merName", merName); param.put("merName", merName);
param.put("merAbbreviate", merAbbreviate);
param.put("merNo", merNo);
param.put("storeId", storeId); param.put("storeId", storeId);
param.put("storeName", storeName); param.put("storeName", storeName);
@ -169,6 +180,8 @@ public class BsTradeOrderController {
param.put("salesmanId", salesmanId); param.put("salesmanId", salesmanId);
param.put("merId", merId); param.put("merId", merId);
param.put("merName", merName); param.put("merName", merName);
param.put("merAbbreviate", merAbbreviate);
param.put("merNo", merNo);
param.put("storeId", storeId); param.put("storeId", storeId);
param.put("storeName", storeName); param.put("storeName", storeName);
@ -176,14 +189,18 @@ public class BsTradeOrderController {
param.put("agentId", userModel.getAgent().getId()); param.put("agentId", userModel.getAgent().getId());
param.put("salesmanId", salesmanId); param.put("salesmanId", salesmanId);
param.put("merId", merId); param.put("merId", merId);
param.put("merNo", merNo);
param.put("merName", merName); param.put("merName", merName);
param.put("merAbbreviate", merAbbreviate);
param.put("storeId", storeId); param.put("storeId", storeId);
param.put("storeName", storeName); param.put("storeName", storeName);
} else if (userModel.getSecUser().getObjectType().equals(SecUserTypeEnum.type3.getNumber())) { } else if (userModel.getSecUser().getObjectType().equals(SecUserTypeEnum.type3.getNumber())) {
param.put("salesmanId", userModel.getSalesman().getId()); param.put("salesmanId", userModel.getSalesman().getId());
param.put("merId", merId); param.put("merId", merId);
param.put("merNo", merNo);
param.put("merName", merName); param.put("merName", merName);
param.put("merAbbreviate", merAbbreviate);
param.put("storeId", storeId); param.put("storeId", storeId);
param.put("storeName", storeName); param.put("storeName", storeName);
@ -209,15 +226,19 @@ public class BsTradeOrderController {
List<BsTradeOrder> tradeOrderList = tradeOrderService.getTradeOrderList(param); List<BsTradeOrder> tradeOrderList = tradeOrderService.getTradeOrderList(param);
for (BsTradeOrder tradeOrder : tradeOrderList) { for (BsTradeOrder tradeOrder : tradeOrderList) {
data = new ExportTradeOrderModel(); data = new ExportTradeOrderModel();
data.setMerNo(tradeOrder.getMerNo());
data.setMerName(tradeOrder.getMerName()); data.setMerName(tradeOrder.getMerName());
data.setMerAbbreviate(tradeOrder.getMerAbbreviate());
data.setStoreName(tradeOrder.getStoreName()); data.setStoreName(tradeOrder.getStoreName());
data.setOutTradeNo(tradeOrder.getOutTradeNo()); data.setOutTradeNo(tradeOrder.getOutTradeNo());
data.setAccTradeNo(tradeOrder.getAccTradeNo());
data.setPayMode(TradeOrderPayModeEnum.getNameByCode(tradeOrder.getPayMode()).getName()); data.setPayMode(TradeOrderPayModeEnum.getNameByCode(tradeOrder.getPayMode()).getName());
data.setTradeAmount(tradeOrder.getTradeAmount()); data.setTradeAmount(tradeOrder.getTradeAmount());
data.setStoreDiscountActualPrice(tradeOrder.getStoreDiscountActualPrice()); data.setStoreDiscountActualPrice(tradeOrder.getStoreDiscountActualPrice());
data.setUserDiscountActualPrice(tradeOrder.getUserDiscountActualPrice()); data.setUserDiscountActualPrice(tradeOrder.getUserDiscountActualPrice());
data.setTradeActualAmount(tradeOrder.getTradeActualAmount()); data.setTradeActualAmount(tradeOrder.getTradeActualAmount());
data.setStatus(TradeOrderStatusEnum.getNameByNumber(tradeOrder.getStatus()).getName()); data.setStatus(TradeOrderStatusEnum.getNameByNumber(tradeOrder.getStatus()).getName());
data.setCreateType(TradeOrderCreateTypeEnum.getNameByCode(tradeOrder.getCreateType()).getName());
data.setCreateTime(tradeOrder.getCreateTime()); data.setCreateTime(tradeOrder.getCreateTime());
data.setPayTime(tradeOrder.getPayTime()); data.setPayTime(tradeOrder.getPayTime());
data.setPlatformMerNo(tradeOrder.getPlatformMerNo()); data.setPlatformMerNo(tradeOrder.getPlatformMerNo());

@ -29,6 +29,7 @@ import com.hfkj.sysenum.*;
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.collections4.MapUtils;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
@ -85,6 +86,52 @@ public class TestController {
private LaKaLaLedgerService laKaLaLedgerService; private LaKaLaLedgerService laKaLaLedgerService;
@Resource @Resource
private LaKaLaTradeSeparateService laKaLaTradeSeparateService; private LaKaLaTradeSeparateService laKaLaTradeSeparateService;
@Resource
private BsTradeOrderService tradeOrderService;
@Resource
private LaKaLaTradeService laKaLaTradeService;
@RequestMapping(value="/brushOrder",method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "saasUpdateFee")
public ResponseData brushOrder() {
try {
Map<String, Object> param = new HashMap<>();
param.put("status", "3");
List<BsTradeOrder> orderList = tradeOrderService.getTradeOrderList(param);
for (BsTradeOrder order : orderList) {
try {
JSONObject queryTrade = laKaLaTradeService.queryTrade(order.getOutTradeNo());
if (queryTrade != null) {
order.setTradeActualAmount(queryTrade.getBigDecimal("total_amount"));
order.setAccSettleAmount(
StringUtils.isNotBlank(queryTrade.getString("acc_settle_amount"))
?queryTrade.getBigDecimal("acc_settle_amount").divide(new BigDecimal("100"))
:new BigDecimal("0"));
order.setAccDiscountAmount(
StringUtils.isNotBlank(queryTrade.getString("acc_discount_amount"))
?queryTrade.getBigDecimal("acc_discount_amount").divide(new BigDecimal("100"))
:new BigDecimal("0"));
order.setAccMdiscountAmount(
StringUtils.isNotBlank(queryTrade.getString("acc_mdiscount_amount"))
?queryTrade.getBigDecimal("acc_mdiscount_amount").divide(new BigDecimal("100"))
:new BigDecimal("0"));
tradeOrderService.editOrder(order);
}
} catch (Exception e) {
}
}
return ResponseMsgUtil.success("");
} catch (Exception e) {
log.error(e.getMessage(), e);
return ResponseMsgUtil.exception(e);
}
}
@RequestMapping(value="/saasUpdateFee",method = RequestMethod.GET) @RequestMapping(value="/saasUpdateFee",method = RequestMethod.GET)
@ResponseBody @ResponseBody

@ -2,7 +2,9 @@ package com.bweb.excel.model;
import com.alibaba.excel.annotation.ExcelProperty; import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth; import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentStyle;
import lombok.Data; import lombok.Data;
import org.apache.poi.ss.usermodel.HorizontalAlignment;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
@ -15,42 +17,62 @@ import java.util.Date;
@Data @Data
public class ExportTradeOrderModel { public class ExportTradeOrderModel {
@ColumnWidth(25)
@ExcelProperty(value = "商户号")
private String merNo;
@ColumnWidth(25) @ColumnWidth(25)
@ExcelProperty(value = "商户名称") @ExcelProperty(value = "商户名称")
private String merName; private String merName;
@ColumnWidth(20)
@ExcelProperty(value = "商户简称")
private String merAbbreviate;
@ColumnWidth(25) @ColumnWidth(25)
@ExcelProperty(value = "门店名称") @ExcelProperty(value = "门店名称")
private String storeName; private String storeName;
@ColumnWidth(30) @ColumnWidth(35)
@ExcelProperty(value = "交易单号") @ExcelProperty(value = "商户交易单号")
private String outTradeNo; private String outTradeNo;
@ColumnWidth(25) @ColumnWidth(35)
@ExcelProperty(value = "账户端交易单号")
private String accTradeNo;
@ColumnWidth(20)
@ExcelProperty(value = "支付方式") @ExcelProperty(value = "支付方式")
private String payMode; private String payMode;
@ColumnWidth(25) @ColumnWidth(20)
@ExcelProperty(value = "交易金额") @ExcelProperty(value = "交易金额")
@ContentStyle(horizontalAlignment = HorizontalAlignment.LEFT)
private BigDecimal tradeAmount; private BigDecimal tradeAmount;
@ColumnWidth(25) @ColumnWidth(20)
@ExcelProperty(value = "门店优惠") @ExcelProperty(value = "门店优惠")
@ContentStyle(horizontalAlignment = HorizontalAlignment.LEFT)
private BigDecimal storeDiscountActualPrice; private BigDecimal storeDiscountActualPrice;
@ColumnWidth(25) @ColumnWidth(20)
@ExcelProperty(value = "优惠券优惠") @ExcelProperty(value = "优惠券优惠")
@ContentStyle(horizontalAlignment = HorizontalAlignment.LEFT)
private BigDecimal userDiscountActualPrice; private BigDecimal userDiscountActualPrice;
@ColumnWidth(25) @ColumnWidth(20)
@ExcelProperty(value = "实付金额") @ExcelProperty(value = "实付金额")
@ContentStyle(horizontalAlignment = HorizontalAlignment.LEFT)
private BigDecimal tradeActualAmount; private BigDecimal tradeActualAmount;
@ColumnWidth(20) @ColumnWidth(20)
@ExcelProperty(value = "交易状态") @ExcelProperty(value = "交易状态")
private String status; private String status;
@ColumnWidth(20)
@ExcelProperty(value = "创建方式")
private String createType;
@ColumnWidth(25) @ColumnWidth(25)
@ExcelProperty(value = "创建时间") @ExcelProperty(value = "创建时间")
private Date createTime; private Date createTime;

@ -92,6 +92,7 @@ public class TradeController {
tradeOrder.setMerId(mer.getId()); tradeOrder.setMerId(mer.getId());
tradeOrder.setMerName(mer.getMerName()); tradeOrder.setMerName(mer.getMerName());
tradeOrder.setMerNo(mer.getMerNo()); tradeOrder.setMerNo(mer.getMerNo());
tradeOrder.setMerAbbreviate(mer.getMerAbbreviate());
tradeOrder.setOutTradeNo(body.getOutTradeNo()); tradeOrder.setOutTradeNo(body.getOutTradeNo());
tradeOrder.setTradeAmount(new BigDecimal(body.getTotalAmount())); tradeOrder.setTradeAmount(new BigDecimal(body.getTotalAmount()));
tradeOrder.setTradeActualAmount(tradeOrder.getTradeAmount()); tradeOrder.setTradeActualAmount(tradeOrder.getTradeAmount());

@ -41,8 +41,8 @@ public interface BsTradeOrderMapper extends BsTradeOrderMapperExt {
@Insert({ @Insert({
"insert into bs_trade_order (company_id, agent_id, ", "insert into bs_trade_order (company_id, agent_id, ",
"salesman_id, salesman_name, ", "salesman_id, salesman_name, ",
"mer_id, mer_name, mer_no, ", "mer_id, mer_name, mer_abbreviate, ",
"store_id, store_name, ", "mer_no, store_id, store_name, ",
"device_id, device_sn, ", "device_id, device_sn, ",
"qr_code_id, qr_code_sn, ", "qr_code_id, qr_code_sn, ",
"platform_type, platform_mer_no, ", "platform_type, platform_mer_no, ",
@ -75,8 +75,8 @@ public interface BsTradeOrderMapper extends BsTradeOrderMapperExt {
"ext_1, ext_2, ext_3)", "ext_1, ext_2, ext_3)",
"values (#{companyId,jdbcType=BIGINT}, #{agentId,jdbcType=BIGINT}, ", "values (#{companyId,jdbcType=BIGINT}, #{agentId,jdbcType=BIGINT}, ",
"#{salesmanId,jdbcType=BIGINT}, #{salesmanName,jdbcType=VARCHAR}, ", "#{salesmanId,jdbcType=BIGINT}, #{salesmanName,jdbcType=VARCHAR}, ",
"#{merId,jdbcType=BIGINT}, #{merName,jdbcType=VARCHAR}, #{merNo,jdbcType=VARCHAR}, ", "#{merId,jdbcType=BIGINT}, #{merName,jdbcType=VARCHAR}, #{merAbbreviate,jdbcType=VARCHAR}, ",
"#{storeId,jdbcType=BIGINT}, #{storeName,jdbcType=VARCHAR}, ", "#{merNo,jdbcType=VARCHAR}, #{storeId,jdbcType=BIGINT}, #{storeName,jdbcType=VARCHAR}, ",
"#{deviceId,jdbcType=BIGINT}, #{deviceSn,jdbcType=VARCHAR}, ", "#{deviceId,jdbcType=BIGINT}, #{deviceSn,jdbcType=VARCHAR}, ",
"#{qrCodeId,jdbcType=BIGINT}, #{qrCodeSn,jdbcType=VARCHAR}, ", "#{qrCodeId,jdbcType=BIGINT}, #{qrCodeSn,jdbcType=VARCHAR}, ",
"#{platformType,jdbcType=INTEGER}, #{platformMerNo,jdbcType=VARCHAR}, ", "#{platformType,jdbcType=INTEGER}, #{platformMerNo,jdbcType=VARCHAR}, ",
@ -124,6 +124,7 @@ public interface BsTradeOrderMapper extends BsTradeOrderMapperExt {
@Result(column="salesman_name", property="salesmanName", jdbcType=JdbcType.VARCHAR), @Result(column="salesman_name", property="salesmanName", jdbcType=JdbcType.VARCHAR),
@Result(column="mer_id", property="merId", jdbcType=JdbcType.BIGINT), @Result(column="mer_id", property="merId", jdbcType=JdbcType.BIGINT),
@Result(column="mer_name", property="merName", jdbcType=JdbcType.VARCHAR), @Result(column="mer_name", property="merName", jdbcType=JdbcType.VARCHAR),
@Result(column="mer_abbreviate", property="merAbbreviate", jdbcType=JdbcType.VARCHAR),
@Result(column="mer_no", property="merNo", jdbcType=JdbcType.VARCHAR), @Result(column="mer_no", property="merNo", jdbcType=JdbcType.VARCHAR),
@Result(column="store_id", property="storeId", jdbcType=JdbcType.BIGINT), @Result(column="store_id", property="storeId", jdbcType=JdbcType.BIGINT),
@Result(column="store_name", property="storeName", jdbcType=JdbcType.VARCHAR), @Result(column="store_name", property="storeName", jdbcType=JdbcType.VARCHAR),
@ -193,12 +194,12 @@ public interface BsTradeOrderMapper extends BsTradeOrderMapperExt {
@Select({ @Select({
"select", "select",
"id, company_id, agent_id, salesman_id, salesman_name, mer_id, mer_name, mer_no, ", "id, company_id, agent_id, salesman_id, salesman_name, mer_id, mer_name, mer_abbreviate, ",
"store_id, store_name, device_id, device_sn, qr_code_id, qr_code_sn, platform_type, ", "mer_no, store_id, store_name, device_id, device_sn, qr_code_id, qr_code_sn, ",
"platform_mer_no, platform_trade_no, platform_log_no, platform_appid, platform_rate, ", "platform_type, platform_mer_no, platform_trade_no, platform_log_no, platform_appid, ",
"platform_commission, pay_appid, pay_user_id, pay_mode, out_trade_no, trade_amount, ", "platform_rate, platform_commission, pay_appid, pay_user_id, pay_mode, out_trade_no, ",
"store_discount_satisfy, store_discount_id, store_discount_name, store_discount_type, ", "trade_amount, store_discount_satisfy, store_discount_id, store_discount_name, ",
"store_discount_condition, store_discount_price, store_discount_final_cost_price, ", "store_discount_type, store_discount_condition, store_discount_price, store_discount_final_cost_price, ",
"store_discount_actual_price, store_discount_profit_price, user_id, user_phone, ", "store_discount_actual_price, store_discount_profit_price, user_id, user_phone, ",
"user_discount_id, user_discount_name, user_discount_type, user_discount_price, ", "user_discount_id, user_discount_name, user_discount_type, user_discount_price, ",
"user_discount_actual_price, trade_actual_amount, income_amount, acc_trade_no, ", "user_discount_actual_price, trade_actual_amount, income_amount, acc_trade_no, ",
@ -218,6 +219,7 @@ public interface BsTradeOrderMapper extends BsTradeOrderMapperExt {
@Result(column="salesman_name", property="salesmanName", jdbcType=JdbcType.VARCHAR), @Result(column="salesman_name", property="salesmanName", jdbcType=JdbcType.VARCHAR),
@Result(column="mer_id", property="merId", jdbcType=JdbcType.BIGINT), @Result(column="mer_id", property="merId", jdbcType=JdbcType.BIGINT),
@Result(column="mer_name", property="merName", jdbcType=JdbcType.VARCHAR), @Result(column="mer_name", property="merName", jdbcType=JdbcType.VARCHAR),
@Result(column="mer_abbreviate", property="merAbbreviate", jdbcType=JdbcType.VARCHAR),
@Result(column="mer_no", property="merNo", jdbcType=JdbcType.VARCHAR), @Result(column="mer_no", property="merNo", jdbcType=JdbcType.VARCHAR),
@Result(column="store_id", property="storeId", jdbcType=JdbcType.BIGINT), @Result(column="store_id", property="storeId", jdbcType=JdbcType.BIGINT),
@Result(column="store_name", property="storeName", jdbcType=JdbcType.VARCHAR), @Result(column="store_name", property="storeName", jdbcType=JdbcType.VARCHAR),
@ -302,6 +304,7 @@ public interface BsTradeOrderMapper extends BsTradeOrderMapperExt {
"salesman_name = #{salesmanName,jdbcType=VARCHAR},", "salesman_name = #{salesmanName,jdbcType=VARCHAR},",
"mer_id = #{merId,jdbcType=BIGINT},", "mer_id = #{merId,jdbcType=BIGINT},",
"mer_name = #{merName,jdbcType=VARCHAR},", "mer_name = #{merName,jdbcType=VARCHAR},",
"mer_abbreviate = #{merAbbreviate,jdbcType=VARCHAR},",
"mer_no = #{merNo,jdbcType=VARCHAR},", "mer_no = #{merNo,jdbcType=VARCHAR},",
"store_id = #{storeId,jdbcType=BIGINT},", "store_id = #{storeId,jdbcType=BIGINT},",
"store_name = #{storeName,jdbcType=VARCHAR},", "store_name = #{storeName,jdbcType=VARCHAR},",

@ -52,6 +52,10 @@ public class BsTradeOrderSqlProvider {
sql.VALUES("mer_name", "#{merName,jdbcType=VARCHAR}"); sql.VALUES("mer_name", "#{merName,jdbcType=VARCHAR}");
} }
if (record.getMerAbbreviate() != null) {
sql.VALUES("mer_abbreviate", "#{merAbbreviate,jdbcType=VARCHAR}");
}
if (record.getMerNo() != null) { if (record.getMerNo() != null) {
sql.VALUES("mer_no", "#{merNo,jdbcType=VARCHAR}"); sql.VALUES("mer_no", "#{merNo,jdbcType=VARCHAR}");
} }
@ -324,6 +328,7 @@ public class BsTradeOrderSqlProvider {
sql.SELECT("salesman_name"); sql.SELECT("salesman_name");
sql.SELECT("mer_id"); sql.SELECT("mer_id");
sql.SELECT("mer_name"); sql.SELECT("mer_name");
sql.SELECT("mer_abbreviate");
sql.SELECT("mer_no"); sql.SELECT("mer_no");
sql.SELECT("store_id"); sql.SELECT("store_id");
sql.SELECT("store_name"); sql.SELECT("store_name");
@ -433,6 +438,10 @@ public class BsTradeOrderSqlProvider {
sql.SET("mer_name = #{record.merName,jdbcType=VARCHAR}"); sql.SET("mer_name = #{record.merName,jdbcType=VARCHAR}");
} }
if (record.getMerAbbreviate() != null) {
sql.SET("mer_abbreviate = #{record.merAbbreviate,jdbcType=VARCHAR}");
}
if (record.getMerNo() != null) { if (record.getMerNo() != null) {
sql.SET("mer_no = #{record.merNo,jdbcType=VARCHAR}"); sql.SET("mer_no = #{record.merNo,jdbcType=VARCHAR}");
} }
@ -704,6 +713,7 @@ public class BsTradeOrderSqlProvider {
sql.SET("salesman_name = #{record.salesmanName,jdbcType=VARCHAR}"); sql.SET("salesman_name = #{record.salesmanName,jdbcType=VARCHAR}");
sql.SET("mer_id = #{record.merId,jdbcType=BIGINT}"); sql.SET("mer_id = #{record.merId,jdbcType=BIGINT}");
sql.SET("mer_name = #{record.merName,jdbcType=VARCHAR}"); sql.SET("mer_name = #{record.merName,jdbcType=VARCHAR}");
sql.SET("mer_abbreviate = #{record.merAbbreviate,jdbcType=VARCHAR}");
sql.SET("mer_no = #{record.merNo,jdbcType=VARCHAR}"); sql.SET("mer_no = #{record.merNo,jdbcType=VARCHAR}");
sql.SET("store_id = #{record.storeId,jdbcType=BIGINT}"); sql.SET("store_id = #{record.storeId,jdbcType=BIGINT}");
sql.SET("store_name = #{record.storeName,jdbcType=VARCHAR}"); sql.SET("store_name = #{record.storeName,jdbcType=VARCHAR}");
@ -802,6 +812,10 @@ public class BsTradeOrderSqlProvider {
sql.SET("mer_name = #{merName,jdbcType=VARCHAR}"); sql.SET("mer_name = #{merName,jdbcType=VARCHAR}");
} }
if (record.getMerAbbreviate() != null) {
sql.SET("mer_abbreviate = #{merAbbreviate,jdbcType=VARCHAR}");
}
if (record.getMerNo() != null) { if (record.getMerNo() != null) {
sql.SET("mer_no = #{merNo,jdbcType=VARCHAR}"); sql.SET("mer_no = #{merNo,jdbcType=VARCHAR}");
} }

@ -49,6 +49,11 @@ public class BsTradeOrder implements Serializable {
*/ */
private String merName; private String merName;
/**
* 商户简称
*/
private String merAbbreviate;
/** /**
* 商户号 * 商户号
*/ */
@ -422,6 +427,14 @@ public class BsTradeOrder implements Serializable {
this.merName = merName; this.merName = merName;
} }
public String getMerAbbreviate() {
return merAbbreviate;
}
public void setMerAbbreviate(String merAbbreviate) {
this.merAbbreviate = merAbbreviate;
}
public String getMerNo() { public String getMerNo() {
return merNo; return merNo;
} }
@ -953,6 +966,7 @@ public class BsTradeOrder implements Serializable {
&& (this.getSalesmanName() == null ? other.getSalesmanName() == null : this.getSalesmanName().equals(other.getSalesmanName())) && (this.getSalesmanName() == null ? other.getSalesmanName() == null : this.getSalesmanName().equals(other.getSalesmanName()))
&& (this.getMerId() == null ? other.getMerId() == null : this.getMerId().equals(other.getMerId())) && (this.getMerId() == null ? other.getMerId() == null : this.getMerId().equals(other.getMerId()))
&& (this.getMerName() == null ? other.getMerName() == null : this.getMerName().equals(other.getMerName())) && (this.getMerName() == null ? other.getMerName() == null : this.getMerName().equals(other.getMerName()))
&& (this.getMerAbbreviate() == null ? other.getMerAbbreviate() == null : this.getMerAbbreviate().equals(other.getMerAbbreviate()))
&& (this.getMerNo() == null ? other.getMerNo() == null : this.getMerNo().equals(other.getMerNo())) && (this.getMerNo() == null ? other.getMerNo() == null : this.getMerNo().equals(other.getMerNo()))
&& (this.getStoreId() == null ? other.getStoreId() == null : this.getStoreId().equals(other.getStoreId())) && (this.getStoreId() == null ? other.getStoreId() == null : this.getStoreId().equals(other.getStoreId()))
&& (this.getStoreName() == null ? other.getStoreName() == null : this.getStoreName().equals(other.getStoreName())) && (this.getStoreName() == null ? other.getStoreName() == null : this.getStoreName().equals(other.getStoreName()))
@ -1030,6 +1044,7 @@ public class BsTradeOrder implements Serializable {
result = prime * result + ((getSalesmanName() == null) ? 0 : getSalesmanName().hashCode()); result = prime * result + ((getSalesmanName() == null) ? 0 : getSalesmanName().hashCode());
result = prime * result + ((getMerId() == null) ? 0 : getMerId().hashCode()); result = prime * result + ((getMerId() == null) ? 0 : getMerId().hashCode());
result = prime * result + ((getMerName() == null) ? 0 : getMerName().hashCode()); result = prime * result + ((getMerName() == null) ? 0 : getMerName().hashCode());
result = prime * result + ((getMerAbbreviate() == null) ? 0 : getMerAbbreviate().hashCode());
result = prime * result + ((getMerNo() == null) ? 0 : getMerNo().hashCode()); result = prime * result + ((getMerNo() == null) ? 0 : getMerNo().hashCode());
result = prime * result + ((getStoreId() == null) ? 0 : getStoreId().hashCode()); result = prime * result + ((getStoreId() == null) ? 0 : getStoreId().hashCode());
result = prime * result + ((getStoreName() == null) ? 0 : getStoreName().hashCode()); result = prime * result + ((getStoreName() == null) ? 0 : getStoreName().hashCode());
@ -1110,6 +1125,7 @@ public class BsTradeOrder implements Serializable {
sb.append(", salesmanName=").append(salesmanName); sb.append(", salesmanName=").append(salesmanName);
sb.append(", merId=").append(merId); sb.append(", merId=").append(merId);
sb.append(", merName=").append(merName); sb.append(", merName=").append(merName);
sb.append(", merAbbreviate=").append(merAbbreviate);
sb.append(", merNo=").append(merNo); sb.append(", merNo=").append(merNo);
sb.append(", storeId=").append(storeId); sb.append(", storeId=").append(storeId);
sb.append(", storeName=").append(storeName); sb.append(", storeName=").append(storeName);

@ -593,6 +593,76 @@ public class BsTradeOrderExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andMerAbbreviateIsNull() {
addCriterion("mer_abbreviate is null");
return (Criteria) this;
}
public Criteria andMerAbbreviateIsNotNull() {
addCriterion("mer_abbreviate is not null");
return (Criteria) this;
}
public Criteria andMerAbbreviateEqualTo(String value) {
addCriterion("mer_abbreviate =", value, "merAbbreviate");
return (Criteria) this;
}
public Criteria andMerAbbreviateNotEqualTo(String value) {
addCriterion("mer_abbreviate <>", value, "merAbbreviate");
return (Criteria) this;
}
public Criteria andMerAbbreviateGreaterThan(String value) {
addCriterion("mer_abbreviate >", value, "merAbbreviate");
return (Criteria) this;
}
public Criteria andMerAbbreviateGreaterThanOrEqualTo(String value) {
addCriterion("mer_abbreviate >=", value, "merAbbreviate");
return (Criteria) this;
}
public Criteria andMerAbbreviateLessThan(String value) {
addCriterion("mer_abbreviate <", value, "merAbbreviate");
return (Criteria) this;
}
public Criteria andMerAbbreviateLessThanOrEqualTo(String value) {
addCriterion("mer_abbreviate <=", value, "merAbbreviate");
return (Criteria) this;
}
public Criteria andMerAbbreviateLike(String value) {
addCriterion("mer_abbreviate like", value, "merAbbreviate");
return (Criteria) this;
}
public Criteria andMerAbbreviateNotLike(String value) {
addCriterion("mer_abbreviate not like", value, "merAbbreviate");
return (Criteria) this;
}
public Criteria andMerAbbreviateIn(List<String> values) {
addCriterion("mer_abbreviate in", values, "merAbbreviate");
return (Criteria) this;
}
public Criteria andMerAbbreviateNotIn(List<String> values) {
addCriterion("mer_abbreviate not in", values, "merAbbreviate");
return (Criteria) this;
}
public Criteria andMerAbbreviateBetween(String value1, String value2) {
addCriterion("mer_abbreviate between", value1, value2, "merAbbreviate");
return (Criteria) this;
}
public Criteria andMerAbbreviateNotBetween(String value1, String value2) {
addCriterion("mer_abbreviate not between", value1, value2, "merAbbreviate");
return (Criteria) this;
}
public Criteria andMerNoIsNull() { public Criteria andMerNoIsNull() {
addCriterion("mer_no is null"); addCriterion("mer_no is null");
return (Criteria) this; return (Criteria) this;

@ -100,7 +100,8 @@ public class BsTradeOrderServiceImpl implements BsTradeOrderService {
tradeOrder.setSalesmanName(mer.getSalesmanName()); tradeOrder.setSalesmanName(mer.getSalesmanName());
tradeOrder.setMerId(store.getMerId()); tradeOrder.setMerId(store.getMerId());
tradeOrder.setMerNo(mer.getMerNo()); tradeOrder.setMerNo(mer.getMerNo());
tradeOrder.setMerName(mer.getMerAbbreviate()); tradeOrder.setMerName(mer.getMerName());
tradeOrder.setMerAbbreviate(mer.getMerAbbreviate());
tradeOrder.setStoreId(storeId); tradeOrder.setStoreId(storeId);
tradeOrder.setStoreName(store.getName()); tradeOrder.setStoreName(store.getName());
tradeOrder.setStatus(TradeOrderStatusEnum.status1.getNumber()); tradeOrder.setStatus(TradeOrderStatusEnum.status1.getNumber());
@ -240,7 +241,8 @@ public class BsTradeOrderServiceImpl implements BsTradeOrderService {
?new BigDecimal(MapUtils.getString(other, "acc_discount_amount")) ?new BigDecimal(MapUtils.getString(other, "acc_discount_amount"))
:new BigDecimal("0")); :new BigDecimal("0"));
tradeOrder.setAccMdiscountAmount(StringUtils.isNotBlank(MapUtils.getString(other, "acc_mdiscount_amount")) tradeOrder.setAccMdiscountAmount(
StringUtils.isNotBlank(MapUtils.getString(other, "acc_mdiscount_amount"))
?new BigDecimal(MapUtils.getString(other, "acc_mdiscount_amount")) ?new BigDecimal(MapUtils.getString(other, "acc_mdiscount_amount"))
:new BigDecimal("0")); :new BigDecimal("0"));
@ -348,10 +350,18 @@ public class BsTradeOrderServiceImpl implements BsTradeOrderService {
criteria.andMerIdEqualTo(MapUtils.getLong(param, "merId")); criteria.andMerIdEqualTo(MapUtils.getLong(param, "merId"));
} }
if (StringUtils.isNotBlank(MapUtils.getString(param, "merNo"))) {
criteria.andMerNoLike("%"+MapUtils.getString(param, "merNo")+"%");
}
if (StringUtils.isNotBlank(MapUtils.getString(param, "merName"))) { if (StringUtils.isNotBlank(MapUtils.getString(param, "merName"))) {
criteria.andMerNameLike("%"+MapUtils.getString(param, "merName")+"%"); criteria.andMerNameLike("%"+MapUtils.getString(param, "merName")+"%");
} }
if (StringUtils.isNotBlank(MapUtils.getString(param, "merAbbreviate"))) {
criteria.andMerAbbreviateLike("%"+MapUtils.getString(param, "merAbbreviate")+"%");
}
if (MapUtils.getLong(param, "storeId") != null) { if (MapUtils.getLong(param, "storeId") != null) {
criteria.andStoreIdEqualTo(MapUtils.getLong(param, "storeId")); criteria.andStoreIdEqualTo(MapUtils.getLong(param, "storeId"));
} }

Loading…
Cancel
Save