下单增加goodsId的入库,查询ordermaster列表接口增加查询条件
This commit is contained in:
parent
cfcdd24c8d
commit
2eda5293f8
|
|
@ -246,6 +246,7 @@ public class OrderController extends BaseController {
|
||||||
orderMaster.setPayStatus(PayStatus.WAIT_PAY.getCode());
|
orderMaster.setPayStatus(PayStatus.WAIT_PAY.getCode());
|
||||||
orderMaster.setCreateTime(new Date());
|
orderMaster.setCreateTime(new Date());
|
||||||
orderMaster.setWorkerId(goods.getWorkerId());
|
orderMaster.setWorkerId(goods.getWorkerId());
|
||||||
|
orderMaster.setGoodsId(appOrderRequest.getGoodsId());
|
||||||
// orderMaster.setRevTime(DateUtils.parseDate(appOrderRequest.getServerTime(), com.ghy.common.utils.DateUtils.YYYY_MM_DD_HH_MM_SS));
|
// orderMaster.setRevTime(DateUtils.parseDate(appOrderRequest.getServerTime(), com.ghy.common.utils.DateUtils.YYYY_MM_DD_HH_MM_SS));
|
||||||
orderMaster.setRemark(appOrderRequest.getRemark());
|
orderMaster.setRemark(appOrderRequest.getRemark());
|
||||||
orderMaster.setExpectTimeStart(DateUtils.parseDate(appOrderRequest.getExpectTimeStart(), com.ghy.common.utils.DateUtils.YYYY_MM_DD_HH_MM_SS));
|
orderMaster.setExpectTimeStart(DateUtils.parseDate(appOrderRequest.getExpectTimeStart(), com.ghy.common.utils.DateUtils.YYYY_MM_DD_HH_MM_SS));
|
||||||
|
|
|
||||||
|
|
@ -110,9 +110,14 @@
|
||||||
/* 默认生成时间排序 */
|
/* 默认生成时间排序 */
|
||||||
order by create_time
|
order by create_time
|
||||||
<trim suffixOverrides=",">
|
<trim suffixOverrides=",">
|
||||||
<if test="params.createTimeSort != null and params.createTimeSort != ''">
|
<choose>
|
||||||
${params.createTimeSort}
|
<when test="params.createTimeSort != null and params.createTimeSort != ''">
|
||||||
</if>
|
${params.createTimeSort}
|
||||||
|
</when>
|
||||||
|
<otherwise>
|
||||||
|
desc
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
</trim>
|
</trim>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -65,4 +65,12 @@ public class OrderMaster extends BaseEntity {
|
||||||
|
|
||||||
private OrderGoods orderGoods;
|
private OrderGoods orderGoods;
|
||||||
|
|
||||||
|
private Long goodsId;
|
||||||
|
|
||||||
|
private Long goodsCategoryId;
|
||||||
|
|
||||||
|
private String goodsName;
|
||||||
|
|
||||||
|
private Long countryId;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -42,4 +42,6 @@ public class AppOrderRequest {
|
||||||
// 备注
|
// 备注
|
||||||
private String remark;
|
private String remark;
|
||||||
|
|
||||||
|
private Long goodsId;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,7 @@
|
||||||
<result property="updateBy" column="update_by"/>
|
<result property="updateBy" column="update_by"/>
|
||||||
<result property="updateTime" column="update_time"/>
|
<result property="updateTime" column="update_time"/>
|
||||||
<result property="remark" column="remark"/>
|
<result property="remark" column="remark"/>
|
||||||
|
<result property="goodsId" column="goods_id"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectOrderMaster">
|
<sql id="selectOrderMaster">
|
||||||
|
|
@ -46,39 +47,81 @@
|
||||||
remark
|
remark
|
||||||
FROM order_master
|
FROM order_master
|
||||||
</sql>
|
</sql>
|
||||||
|
<sql id="selectOrderMasterMoreInfo">
|
||||||
|
SELECT om.id,
|
||||||
|
om.dept_id,
|
||||||
|
om.code,
|
||||||
|
om.customer_id,
|
||||||
|
om.address_id,
|
||||||
|
om.order_type,
|
||||||
|
om.order_status,
|
||||||
|
om.pay_type,
|
||||||
|
om.pay_status,
|
||||||
|
om.worker_id,
|
||||||
|
om.pay_time,
|
||||||
|
om.rev_time,
|
||||||
|
om.expect_time_start,
|
||||||
|
om.expect_time_end,
|
||||||
|
om.create_by,
|
||||||
|
om.create_time,
|
||||||
|
om.remark,
|
||||||
|
om.goods_id
|
||||||
|
FROM order_master om
|
||||||
|
LEFT JOIN customer_address ca ON ca.customer_address_id = om.address_id
|
||||||
|
LEFT JOIN goods g ON g.goods_id = om.goods_id
|
||||||
|
</sql>
|
||||||
|
|
||||||
<select id="selectOrderMasterList" parameterType="com.ghy.order.domain.OrderMaster" resultMap="OrderMasterResult">
|
<select id="selectOrderMasterList" parameterType="com.ghy.order.domain.OrderMaster" resultMap="OrderMasterResult">
|
||||||
<include refid="selectOrderMaster"/>
|
<include refid="selectOrderMasterMoreInfo"/>
|
||||||
<where>
|
<where>
|
||||||
<if test="deptId != null and deptId != 0">
|
<if test="deptId != null and deptId != 0">
|
||||||
AND dept_id = #{deptId}
|
AND om.dept_id = #{deptId}
|
||||||
</if>
|
</if>
|
||||||
<if test="code != null and code != ''">
|
<if test="code != null and code != ''">
|
||||||
AND `code` LIKE concat('%', #{code}, '%')
|
AND om.code LIKE concat('%', #{code}, '%')
|
||||||
</if>
|
</if>
|
||||||
<if test="customerId != null and customerId != 0">
|
<if test="customerId != null and customerId != 0">
|
||||||
AND customer_id = #{customerId}
|
AND om.customer_id = #{customerId}
|
||||||
</if>
|
</if>
|
||||||
<if test="orderType != null">
|
<if test="orderType != null">
|
||||||
AND order_type = #{orderType}
|
AND om.order_type = #{orderType}
|
||||||
</if>
|
</if>
|
||||||
<if test="orderStatus != null">
|
<if test="orderStatus != null">
|
||||||
AND order_status = #{orderStatus}
|
AND om.order_status = #{orderStatus}
|
||||||
</if>
|
</if>
|
||||||
<if test="payType != null">
|
<if test="payType != null">
|
||||||
AND pay_type = #{payType}
|
AND om.pay_type = #{payType}
|
||||||
</if>
|
</if>
|
||||||
<if test="payStatus != null">
|
<if test="payStatus != null">
|
||||||
AND pay_status = #{payStatus}
|
AND om.pay_status = #{payStatus}
|
||||||
</if>
|
</if>
|
||||||
<if test="workerId != null and workerId > 0">
|
<if test="workerId != null and workerId > 0">
|
||||||
AND worker_id = #{workerId}
|
AND om.worker_id = #{workerId}
|
||||||
</if>
|
</if>
|
||||||
<if test="workerId == -1">
|
<if test="workerId == -1">
|
||||||
AND worker_id IS NULL
|
AND om.worker_id IS NULL
|
||||||
|
</if>
|
||||||
|
<if test="goodsCategoryId != null">
|
||||||
|
AND g.dept_goods_category_id = #{goodsCategoryId}
|
||||||
|
</if>
|
||||||
|
<if test="goodsName != null and goodsName != ''">
|
||||||
|
AND g.goods_name like concat('%', #{goodsName}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="countryId != null">
|
||||||
|
AND ca.country_id = #{countryId}
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
order by create_time desc
|
order by create_time
|
||||||
|
<trim suffixOverrides=",">
|
||||||
|
<choose>
|
||||||
|
<when test="params.createTimeSort != null and params.createTimeSort != ''">
|
||||||
|
${params.createTimeSort}
|
||||||
|
</when>
|
||||||
|
<otherwise>
|
||||||
|
desc
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
|
</trim>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectById" parameterType="long" resultMap="OrderMasterResult">
|
<select id="selectById" parameterType="long" resultMap="OrderMasterResult">
|
||||||
|
|
@ -123,6 +166,7 @@
|
||||||
<if test="code != null and code != ''">code,</if>
|
<if test="code != null and code != ''">code,</if>
|
||||||
<if test="customerId != null and customerId != 0">customer_id,</if>
|
<if test="customerId != null and customerId != 0">customer_id,</if>
|
||||||
<if test="addressId != null and addressId != 0">address_id,</if>
|
<if test="addressId != null and addressId != 0">address_id,</if>
|
||||||
|
<if test="goodsId != null and goodsId != 0">goods_id,</if>
|
||||||
<if test="orderType != null">order_type,</if>
|
<if test="orderType != null">order_type,</if>
|
||||||
<if test="orderStatus != null">order_status,</if>
|
<if test="orderStatus != null">order_status,</if>
|
||||||
<if test="payType != null">pay_type,</if>
|
<if test="payType != null">pay_type,</if>
|
||||||
|
|
@ -140,6 +184,7 @@
|
||||||
<if test="code != null">#{code},</if>
|
<if test="code != null">#{code},</if>
|
||||||
<if test="customerId != null and customerId != 0">#{customerId},</if>
|
<if test="customerId != null and customerId != 0">#{customerId},</if>
|
||||||
<if test="addressId != null and addressId != 0">#{addressId},</if>
|
<if test="addressId != null and addressId != 0">#{addressId},</if>
|
||||||
|
<if test="goodsId != null and goodsId != 0">#{goodsId},</if>
|
||||||
<if test="orderType != null">#{orderType},</if>
|
<if test="orderType != null">#{orderType},</if>
|
||||||
<if test="orderStatus != null">#{orderStatus},</if>
|
<if test="orderStatus != null">#{orderStatus},</if>
|
||||||
<if test="payType != null">#{payType},</if>
|
<if test="payType != null">#{payType},</if>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue