提交 53445198 作者: 张小凤

order(update)

上级 ea7e367c
...@@ -31,7 +31,7 @@ public class OrderRefundController extends BaseController { ...@@ -31,7 +31,7 @@ public class OrderRefundController extends BaseController {
private OrderRefundService orderRefundService; private OrderRefundService orderRefundService;
@ApiOperation(value = "web——发起退款申请") @ApiOperation(value = "web/小程序——发起退款申请")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)}) @ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)})
@PostMapping("applyRetreat") @PostMapping("applyRetreat")
public ResultBody applyRetreat(HttpServletRequest request, @RequestBody OrderRefundVO param) { public ResultBody applyRetreat(HttpServletRequest request, @RequestBody OrderRefundVO param) {
......
...@@ -6,7 +6,6 @@ import com.mmc.oms.common.result.ResultBody; ...@@ -6,7 +6,6 @@ import com.mmc.oms.common.result.ResultBody;
import com.mmc.oms.model.dto.order.OrderInfoDTO; import com.mmc.oms.model.dto.order.OrderInfoDTO;
import com.mmc.oms.model.qo.OrderInfoQO; import com.mmc.oms.model.qo.OrderInfoQO;
import com.mmc.oms.model.vo.order.LeaseOrderVO; import com.mmc.oms.model.vo.order.LeaseOrderVO;
import com.mmc.oms.model.vo.order.OrderStatusVO;
import com.mmc.oms.model.vo.order.OrderVcuVO; import com.mmc.oms.model.vo.order.OrderVcuVO;
import com.mmc.oms.model.vo.order.ReturnWareVO; import com.mmc.oms.model.vo.order.ReturnWareVO;
import com.mmc.oms.service.RentalOrdersService; import com.mmc.oms.service.RentalOrdersService;
...@@ -22,13 +21,13 @@ import javax.servlet.http.HttpServletRequest; ...@@ -22,13 +21,13 @@ import javax.servlet.http.HttpServletRequest;
*/ */
@RestController @RestController
@RequestMapping("/RentalOrders") @RequestMapping("/RentalOrders")
@Api(tags = {"web租赁订单"}) @Api(tags = {"租赁订单"})
public class RentalOrdersController extends BaseController { public class RentalOrdersController extends BaseController {
@Autowired @Autowired
private RentalOrdersService rentalOrdersService; private RentalOrdersService rentalOrdersService;
@ApiOperation(value = "租赁-下单") @ApiOperation(value = "web/小程序 租赁-下单")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = OrderInfoDTO.class)}) @ApiResponses({@ApiResponse(code = 200, message = "OK", response = OrderInfoDTO.class)})
@PostMapping("feignAddLease") @PostMapping("feignAddLease")
public ResultBody<OrderInfoDTO> feignAddLease(HttpServletRequest request, @RequestBody LeaseOrderVO param) { public ResultBody<OrderInfoDTO> feignAddLease(HttpServletRequest request, @RequestBody LeaseOrderVO param) {
...@@ -38,22 +37,22 @@ public class RentalOrdersController extends BaseController { ...@@ -38,22 +37,22 @@ public class RentalOrdersController extends BaseController {
@ApiOperation(value = "web 租赁订单-分页-列表") @ApiOperation(value = "web 租赁订单-分页-列表")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = OrderInfoDTO.class)}) @ApiResponses({@ApiResponse(code = 200, message = "OK", response = OrderInfoDTO.class)})
@PostMapping("listOfRentalOrders") @PostMapping("listOfRentalOrders")
public ResultBody listOfRentalOrders(HttpServletRequest request, @RequestBody OrderStatusVO orderStatusVO) { public ResultBody listOfRentalOrders(HttpServletRequest request, @RequestBody OrderInfoQO param) {
return ResultBody.success( return ResultBody.success(
rentalOrdersService.listOfRentalOrders(orderStatusVO, this.getCurrentAccount(request))); rentalOrdersService.listOfRentalOrders(param, this.getCurrentAccount(request)));
} }
@ApiOperation(value = "后台管理 租赁订单-分页-列表") @ApiOperation(value = "后台管理 租赁订单-分页-列表")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = OrderInfoDTO.class)}) @ApiResponses({@ApiResponse(code = 200, message = "OK", response = OrderInfoDTO.class)})
@PostMapping("listPcWechatOrder") @PostMapping("listPcWechatOrder")
public ResultBody listPcWechatOrder(HttpServletRequest request, @RequestBody OrderInfoQO param) { public ResultBody<OrderInfoDTO> listPcWechatOrder(HttpServletRequest request, @RequestBody OrderInfoQO param) {
return ResultBody.success( return ResultBody.success(
rentalOrdersService.listPcOrderInfo(param, this.getCurrentAccount(request))); rentalOrdersService.listPcOrderInfo(param, this.getCurrentAccount(request)));
} }
@ApiOperation(value = "订单-详情") @ApiOperation(value = "web/小程序——订单详情")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = OrderInfoDTO.class)}) @ApiResponses({@ApiResponse(code = 200, message = "OK", response = OrderInfoDTO.class)})
@GetMapping("orderDetail") @GetMapping("orderDetail")
public ResultBody<OrderInfoDTO> orderDetail( public ResultBody<OrderInfoDTO> orderDetail(
...@@ -62,7 +61,7 @@ public class RentalOrdersController extends BaseController { ...@@ -62,7 +61,7 @@ public class RentalOrdersController extends BaseController {
} }
@ApiOperation(value = "小程序-云仓-订单-分页-列表") @ApiOperation(value = "小程序————订单分页列表")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = OrderInfoDTO.class)}) @ApiResponses({@ApiResponse(code = 200, message = "OK", response = OrderInfoDTO.class)})
@PostMapping("listPageWechatOrder") @PostMapping("listPageWechatOrder")
public ResultBody listPageWechatOrder( public ResultBody listPageWechatOrder(
...@@ -79,7 +78,7 @@ public class RentalOrdersController extends BaseController { ...@@ -79,7 +78,7 @@ public class RentalOrdersController extends BaseController {
} }
@ApiOperation(value = "v1.0.1后台管理——发货-订单/ 卖家发货") @ApiOperation(value = "后台管理——发货-订单/ 卖家发货")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)}) @ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)})
@PostMapping("sendOrderWare") @PostMapping("sendOrderWare")
public ResultBody sendOrderWare(HttpServletRequest request, public ResultBody sendOrderWare(HttpServletRequest request,
...@@ -88,7 +87,7 @@ public class RentalOrdersController extends BaseController { ...@@ -88,7 +87,7 @@ public class RentalOrdersController extends BaseController {
} }
@ApiOperation(value = "web 确认收货-订单") @ApiOperation(value = "web/小程序 确认收货-订单")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)}) @ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)})
@PostMapping("renterTakeOrder") @PostMapping("renterTakeOrder")
public ResultBody renterTakeOrder(@Validated({Take.class}) @RequestBody OrderVcuVO param) { public ResultBody renterTakeOrder(@Validated({Take.class}) @RequestBody OrderVcuVO param) {
...@@ -96,7 +95,7 @@ public class RentalOrdersController extends BaseController { ...@@ -96,7 +95,7 @@ public class RentalOrdersController extends BaseController {
} }
@ApiOperation(value = "web 商品归还-订单") @ApiOperation(value = "web/小程序 商品归还-订单")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)}) @ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)})
@PostMapping("returnOrderWare") @PostMapping("returnOrderWare")
public ResultBody returnOrderWare(@RequestBody ReturnWareVO param) { public ResultBody returnOrderWare(@RequestBody ReturnWareVO param) {
......
...@@ -50,11 +50,13 @@ public class OrderInfoDO implements Serializable { ...@@ -50,11 +50,13 @@ public class OrderInfoDO implements Serializable {
@ApiModelProperty(value = "购买用户uid") @ApiModelProperty(value = "购买用户uid")
private String uid; private String uid;
@ApiModelProperty(value = "买用户的名称") @ApiModelProperty(value = "买用户的名称")
private String buyerName; private String buyerName;
@ApiModelProperty(value = "买用户的手机号") @ApiModelProperty(value = "买用户的手机号")
private String buyerPhone; private String buyerPhone;
@ApiModelProperty(value = "购买用户的账号")
private String accountNo;
@ApiModelProperty(value = "用买用户单价 元/天") @ApiModelProperty(value = "用买用户单价 元/天")
private BigDecimal unitPrice; private BigDecimal unitPrice;
...@@ -124,6 +126,15 @@ public class OrderInfoDO implements Serializable { ...@@ -124,6 +126,15 @@ public class OrderInfoDO implements Serializable {
@ApiModelProperty(value = "余额", example = "4") @ApiModelProperty(value = "余额", example = "4")
private BigDecimal balance; private BigDecimal balance;
@ApiModelProperty(value = "当前状态", example = "4")
private String doing;
@ApiModelProperty(value = "等待状态", example = "4")
private String waiting;
@ApiModelProperty(value = "导航栏等待状态", example = "4")
private String leaseOrderStatus;
@ApiModelProperty(value = "用户昵称")
private String nickName;
/** /**
* 辅助字段 * 辅助字段
* *
...@@ -169,6 +180,10 @@ public class OrderInfoDO implements Serializable { ...@@ -169,6 +180,10 @@ public class OrderInfoDO implements Serializable {
.couponId(this.couponId) .couponId(this.couponId)
.specsId(this.specsId) .specsId(this.specsId)
.balance(this.balance) .balance(this.balance)
.doing(this.doing)
.waiting(this.waiting)
.leaseOrderStatus(this.leaseOrderStatus)
.nickName(this.nickName)
.build(); .build();
} }
......
...@@ -144,6 +144,18 @@ public class OrderInfoDTO implements Serializable { ...@@ -144,6 +144,18 @@ public class OrderInfoDTO implements Serializable {
@ApiModelProperty(value = "余额", example = "4") @ApiModelProperty(value = "余额", example = "4")
private BigDecimal balance; private BigDecimal balance;
@ApiModelProperty(value = "当前状态", example = "已下单")
private String doing;
@ApiModelProperty(value = "等待状态", example = "等待买家付款")
private String waiting;
@ApiModelProperty(value = "等待状态", example = "等待买家付款")
private String leaseOrderStatus;
@ApiModelProperty(value = "买家微信昵称", example = "昵称")
private String nickName;
public RepoCashDO buildRepoCashDO() { public RepoCashDO buildRepoCashDO() {
return RepoCashDO.builder() return RepoCashDO.builder()
.uid(this.uid) .uid(this.uid)
......
...@@ -26,12 +26,13 @@ public class OrderInfoQO implements Serializable { ...@@ -26,12 +26,13 @@ public class OrderInfoQO implements Serializable {
@ApiModelProperty(value = "用户ID", hidden = true) @ApiModelProperty(value = "用户ID", hidden = true)
private Integer repoAccountId; private Integer repoAccountId;
@ApiModelProperty(value = "关键字")
private String keyword;
@ApiModelProperty(value = "买家名称") @ApiModelProperty(value = "买家名称", hidden = true)
private String buyerName; private String buyerName;
@ApiModelProperty(value = "买家账号")
private String buyerAccount;
@ApiModelProperty(value = "订单编号") @ApiModelProperty(value = "订单编号")
private String orderNo; private String orderNo;
......
...@@ -13,9 +13,15 @@ import com.mmc.oms.common.status.TranStatusDic; ...@@ -13,9 +13,15 @@ import com.mmc.oms.common.status.TranStatusDic;
import com.mmc.oms.common.util.CodeUtil; import com.mmc.oms.common.util.CodeUtil;
import com.mmc.oms.dao.RentalOrdersDao; import com.mmc.oms.dao.RentalOrdersDao;
import com.mmc.oms.entity.coupon.CouponDO; import com.mmc.oms.entity.coupon.CouponDO;
import com.mmc.oms.entity.order.*; import com.mmc.oms.entity.order.OrderInfoDO;
import com.mmc.oms.entity.order.OrderReceiptDO;
import com.mmc.oms.entity.order.OrderRefundDO;
import com.mmc.oms.entity.order.OrderVcuDO;
import com.mmc.oms.entity.ware.WareInfoDO; import com.mmc.oms.entity.ware.WareInfoDO;
import com.mmc.oms.model.dto.order.*; import com.mmc.oms.model.dto.order.OrderInfoDTO;
import com.mmc.oms.model.dto.order.OrderReceiptDTO;
import com.mmc.oms.model.dto.order.OrderRefundDTO;
import com.mmc.oms.model.dto.order.SkuOrderDTO;
import com.mmc.oms.model.dto.repo.RepoAccountDTO; import com.mmc.oms.model.dto.repo.RepoAccountDTO;
import com.mmc.oms.model.dto.user.BaseAccountDTO; import com.mmc.oms.model.dto.user.BaseAccountDTO;
import com.mmc.oms.model.dto.user.UserAccountSimpleDTO; import com.mmc.oms.model.dto.user.UserAccountSimpleDTO;
...@@ -91,6 +97,7 @@ public class RentalOrdersServiceImpl implements RentalOrdersService { ...@@ -91,6 +97,7 @@ public class RentalOrdersServiceImpl implements RentalOrdersService {
orderInfo.setUid(user.getUid()); orderInfo.setUid(user.getUid());
orderInfo.setBuyerName(user.getUserName()); orderInfo.setBuyerName(user.getUserName());
orderInfo.setBuyerPhone(user.getPhoneNum()); orderInfo.setBuyerPhone(user.getPhoneNum());
orderInfo.setNickName(user.getNickName());
rentalOrdersDao.insertOrderInfo(orderInfo); rentalOrdersDao.insertOrderInfo(orderInfo);
// 添加收货地址 // 添加收货地址
Date cdate = new Date(); Date cdate = new Date();
...@@ -192,7 +199,7 @@ public class RentalOrdersServiceImpl implements RentalOrdersService { ...@@ -192,7 +199,7 @@ public class RentalOrdersServiceImpl implements RentalOrdersService {
*/ */
private BigDecimal getUnitPrice(PriceAcquisition param) { private BigDecimal getUnitPrice(PriceAcquisition param) {
// 需要支付的价格 // 需要支付的价格
/* ResponseEntity<String> responseEntity = restTemplate.postForEntity(pmsUrl + "product/spec/getSpecLeaseUnitPrice" /* ResponseEntity<String> responseEntity = restTemplate.postForEntity(pmsUrl + "product/spec/feignGetSpecLeaseUnitPrice"
, param, String.class); , param, String.class);
String body = responseEntity.getBody(); String body = responseEntity.getBody();
BigDecimal bigDecimal = new BigDecimal(body);*/ BigDecimal bigDecimal = new BigDecimal(body);*/
...@@ -381,20 +388,21 @@ public class RentalOrdersServiceImpl implements RentalOrdersService { ...@@ -381,20 +388,21 @@ public class RentalOrdersServiceImpl implements RentalOrdersService {
} }
@Override @Override
public PageResult listOfRentalOrders(OrderStatusVO orderStatusVO, BaseAccountDTO currentAccount) { public PageResult listOfRentalOrders(OrderInfoQO param, BaseAccountDTO currentAccount) {
orderStatusVO.setUserAccountId(currentAccount.getUserAccountId()); Integer count = rentalOrdersDao.countPcOrderInfo(param);
int count = rentalOrdersDao.rentalOrdersCount(orderStatusVO);
if (count == 0) { if (count == 0) {
return PageResult.buildPage(orderStatusVO.getPageNo(), orderStatusVO.getPageSize(), count); return PageResult.buildPage(param.getPageNo(), param.getPageSize(), count);
} }
Integer pageNo = orderStatusVO.getPageNo(); Integer pageNo = param.getPageNo();
orderStatusVO.buildCurrentPage(); param.buildCurrentPage();
List<OrderInfoDTO> data =
List<OrderStatusDO> orderInfoDOS = rentalOrdersDao.listOfRentalOrders(orderStatusVO); rentalOrdersDao.listPcOrderInfo(param).stream()
List<OrderStatusDTO> collect = orderInfoDOS.stream().map(d -> { .map(
return d.buildOrderStatusDTO(); d -> {
}).collect(Collectors.toList()); return d.buildOrderInfoDTO();
return PageResult.buildPage(pageNo, orderStatusVO.getPageSize(), count, collect); })
.collect(Collectors.toList());
return PageResult.buildPage(pageNo, param.getPageSize(), count, data);
} }
@Override @Override
......
...@@ -5,7 +5,6 @@ import com.mmc.oms.common.result.ResultBody; ...@@ -5,7 +5,6 @@ import com.mmc.oms.common.result.ResultBody;
import com.mmc.oms.model.dto.user.BaseAccountDTO; import com.mmc.oms.model.dto.user.BaseAccountDTO;
import com.mmc.oms.model.qo.OrderInfoQO; import com.mmc.oms.model.qo.OrderInfoQO;
import com.mmc.oms.model.vo.order.LeaseOrderVO; import com.mmc.oms.model.vo.order.LeaseOrderVO;
import com.mmc.oms.model.vo.order.OrderStatusVO;
import com.mmc.oms.model.vo.order.OrderVcuVO; import com.mmc.oms.model.vo.order.OrderVcuVO;
import com.mmc.oms.model.vo.order.ReturnWareVO; import com.mmc.oms.model.vo.order.ReturnWareVO;
...@@ -27,7 +26,7 @@ public interface RentalOrdersService { ...@@ -27,7 +26,7 @@ public interface RentalOrdersService {
ResultBody sendOrderWare(BaseAccountDTO currentAccount, OrderVcuVO param); ResultBody sendOrderWare(BaseAccountDTO currentAccount, OrderVcuVO param);
PageResult listOfRentalOrders(OrderStatusVO orderStatusVO, BaseAccountDTO currentAccount); PageResult listOfRentalOrders(OrderInfoQO param, BaseAccountDTO currentAccount);
ResultBody renterTakeOrder(OrderVcuVO param); ResultBody renterTakeOrder(OrderVcuVO param);
......
...@@ -38,6 +38,10 @@ ...@@ -38,6 +38,10 @@
<result property="createTime" column="create_time"/> <result property="createTime" column="create_time"/>
<result property="updateTime" column="update_time"/> <result property="updateTime" column="update_time"/>
<result property="rcdCompanyId" column="rcd_company_id"/> <result property="rcdCompanyId" column="rcd_company_id"/>
<result property="doing" column="doing"/>
<result property="waiting" column="waiting"/>
<result property="leaseOrderStatus" column="lease_order_status"/>
<result property="nickName" column="nick_name"/>
<association property="receipt" <association property="receipt"
javaType="com.mmc.oms.entity.order.OrderReceiptDO" javaType="com.mmc.oms.entity.order.OrderReceiptDO"
resultMap="orderReceiptResultMap"></association> resultMap="orderReceiptResultMap"></association>
...@@ -182,13 +186,13 @@ ...@@ -182,13 +186,13 @@
(order_no, ware_info_id, ware_no, ware_title, ware_img, sku_info_id, sku_title, repo_account_id, (order_no, ware_info_id, ware_no, ware_title, ware_img, sku_info_id, sku_title, repo_account_id,
uid, buyer_name, buyer_phone, unit_price, ware_num, should_pay, actual_pay, order_type, uid, buyer_name, buyer_phone, unit_price, ware_num, should_pay, actual_pay, order_type,
deposit, rent_price, start_date, end_date, pay_day, tran_status, ex_ware, remark, pay_time, deposit, rent_price, start_date, end_date, pay_day, tran_status, ex_ware, remark, pay_time,
send_ware_time, create_time, rcd_company_id, return_time, coupon_id, specs_id) send_ware_time, create_time, rcd_company_id, return_time, coupon_id, specs_id, nick_name)
values (#{orderNo}, #{wareInfoId}, #{wareNo}, #{wareTitle}, #{wareImg}, #{skuInfoId}, #{skuTitle}, values (#{orderNo}, #{wareInfoId}, #{wareNo}, #{wareTitle}, #{wareImg}, #{skuInfoId}, #{skuTitle},
#{repoAccountId}, #{repoAccountId},
#{uid}, #{buyerName}, #{buyerPhone}, #{unitPrice}, #{wareNum}, #{shouldPay}, #{actualPay}, #{orderType}, #{uid}, #{buyerName}, #{buyerPhone}, #{unitPrice}, #{wareNum}, #{shouldPay}, #{actualPay}, #{orderType},
#{deposit}, #{rentPrice}, #{startDate}, #{endDate}, #{payDay}, #{tranStatus}, #{exWare}, #{remark}, #{deposit}, #{rentPrice}, #{startDate}, #{endDate}, #{payDay}, #{tranStatus}, #{exWare}, #{remark},
#{payTime}, #{payTime},
#{sendWareTime}, now(), #{rcdCompanyId}, #{returnTime}, #{couponId}, #{specsId}) #{sendWareTime}, now(), #{rcdCompanyId}, #{returnTime}, #{couponId}, #{specsId}, #{nickName})
</insert> </insert>
<insert id="insertOrderReceipt" useGeneratedKeys="true" <insert id="insertOrderReceipt" useGeneratedKeys="true"
keyProperty="id" parameterType="com.mmc.oms.entity.order.OrderReceiptDO"> keyProperty="id" parameterType="com.mmc.oms.entity.order.OrderReceiptDO">
...@@ -202,11 +206,14 @@ ...@@ -202,11 +206,14 @@
<select id="countPcOrderInfo" resultType="java.lang.Integer" parameterType="com.mmc.oms.model.qo.OrderInfoQO"> <select id="countPcOrderInfo" resultType="java.lang.Integer" parameterType="com.mmc.oms.model.qo.OrderInfoQO">
select count(*) select count(*)
from order_info o from order_info o
inner join order_receipt rp on rp.order_info_id=o.id
LEFT JOIN tran_status_dic ts on ts.`status` =o.tran_status
<where>1=1 <where>1=1
<if test=" buyerName != null and buyerName != '' "> <if test=" buyerAccount != null and buyerAccount != '' ">
and ( and (
o.uid like CONCAT('%',#{buyerName},'%') o.uid like CONCAT('%',#{buyerAccount},'%')
or o.buyer_name like CONCAT('%',#{buyerName},'%') or o.nick_name like CONCAT('%',#{buyerAccount},'%')
or o.buyer_name like CONCAT('%',#{buyerAccount},'%')
) )
</if> </if>
<if test=" orderNo != null and orderNo != '' "> <if test=" orderNo != null and orderNo != '' ">
...@@ -252,19 +259,24 @@ ...@@ -252,19 +259,24 @@
<select id="listPcOrderInfo" resultMap="orderInfoResultMap" parameterType="com.mmc.oms.model.qo.OrderInfoQO"> <select id="listPcOrderInfo" resultMap="orderInfoResultMap" parameterType="com.mmc.oms.model.qo.OrderInfoQO">
select o.id,o.order_no,o.ware_title,o.sku_title,o.ware_img,o.deposit, select o.id,o.order_no,o.ware_title,o.sku_title,o.ware_img,o.deposit,
o.unit_price,o.ware_num,o.buyer_name,o.buyer_phone,o.uid,o.remark, o.unit_price,o.ware_num,o.buyer_name,o.buyer_phone,o.uid,o.remark,
o.tran_status,o.should_pay,o.actual_pay,o.pf_remark,o.create_time,o.ware_no, o.tran_status,o.should_pay,o.actual_pay,o.pf_remark,o.create_time,o.ware_no,o.nick_name,
rp.order_info_id,rp.receipt_method,rp.take_name, rp.order_info_id,rp.receipt_method,rp.take_name,
rp.take_phone,rp.region,rp.detail_address,rp.repo_name,rp.repo_address, rp.take_phone,rp.region,rp.detail_address,rp.repo_name,rp.repo_address,
rp.book_phone,rp.send_ex_code,rp.send_ex_no,rp.send_address,rp.ren_method, rp.book_phone,rp.send_ex_code,rp.send_ex_no,rp.send_address,rp.ren_method,
rp.ren_phone,rp.ren_name,rp.ren_ex_code,rp.ren_ex_no,rp.ren_address,rp.ren_repo_name, rp.ren_phone,rp.ren_name,rp.ren_ex_code,rp.ren_ex_no,rp.ren_address,rp.ren_repo_name,
rp.ren_repo_addr,rp.ren_repo_phone rp.ren_repo_addr,rp.ren_repo_phone,
ts.doing ,
ts.waiting,
ts.lease_order_status
from order_info o from order_info o
inner join order_receipt rp on rp.order_info_id=o.id inner join order_receipt rp on rp.order_info_id=o.id
LEFT JOIN tran_status_dic ts on ts.`status` =o.tran_status
<where>1=1 <where>1=1
<if test=" buyerName != null and buyerName != '' "> <if test=" buyerAccount != null and buyerAccount != '' ">
and ( and (
o.uid like CONCAT('%',#{buyerName},'%') o.uid like CONCAT('%',#{buyerAccount},'%')
or o.buyer_name like CONCAT('%',#{buyerName},'%') or o.nick_name like CONCAT('%',#{buyerAccount},'%')
or o.buyer_name like CONCAT('%',#{buyerAccount},'%')
) )
</if> </if>
<if test=" orderNo != null and orderNo != '' "> <if test=" orderNo != null and orderNo != '' ">
...@@ -315,10 +327,10 @@ ...@@ -315,10 +327,10 @@
<if test=" tranStatus!=null and tranStatus!='' "> <if test=" tranStatus!=null and tranStatus!='' ">
and o.tran_status = #{tranStatus} and o.tran_status = #{tranStatus}
</if> </if>
<if test=" keyword!=null and keyword!='' "> <if test=" buyerAccount!=null and buyerAccount!='' ">
and ( and (
o.ware_title like CONCAT('%',#{keyword},'%') o.ware_title like CONCAT('%',#{buyerAccount},'%')
or o.order_no like CONCAT('%',#{keyword},'%') or o.order_no like CONCAT('%',#{buyerAccount},'%')
) )
</if> </if>
</where> </where>
...@@ -339,10 +351,10 @@ ...@@ -339,10 +351,10 @@
<if test=" tranStatus!=null and tranStatus!='' "> <if test=" tranStatus!=null and tranStatus!='' ">
and o.tran_status = #{tranStatus} and o.tran_status = #{tranStatus}
</if> </if>
<if test=" keyword!=null and keyword!='' "> <if test=" buyerAccount!=null and buyerAccount!='' ">
and ( and (
o.ware_title like CONCAT('%',#{keyword},'%') o.ware_title like CONCAT('%',#{buyerAccount},'%')
or o.order_no like CONCAT('%',#{keyword},'%') or o.order_no like CONCAT('%',#{buyerAccount},'%')
) )
</if> </if>
</where> </where>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论