提交 05869e56 authored 作者: 吴德鹏's avatar 吴德鹏

增加代购商品的物流状态

上级 ffe92945
...@@ -9,7 +9,7 @@ import java.util.Date; ...@@ -9,7 +9,7 @@ import java.util.Date;
* 表名 tb_cf_platform_order * 表名 tb_cf_platform_order
* *
* @author lipengjun * @author lipengjun
* @date 2019-09-20 11:03:37 * @date 2020-06-05 11:22:12
*/ */
public class TbCfPlatformOrderEntity implements Serializable { public class TbCfPlatformOrderEntity implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
...@@ -26,6 +26,10 @@ public class TbCfPlatformOrderEntity implements Serializable { ...@@ -26,6 +26,10 @@ public class TbCfPlatformOrderEntity implements Serializable {
* 第三方订单id * 第三方订单id
*/ */
private String pOrderId; private String pOrderId;
/**
* 商品ID
*/
private String itemId;
/** /**
* 第三方平台名 * 第三方平台名
*/ */
...@@ -41,16 +45,11 @@ public class TbCfPlatformOrderEntity implements Serializable { ...@@ -41,16 +45,11 @@ public class TbCfPlatformOrderEntity implements Serializable {
/** /**
* 代购人 * 代购人
*/ */
private String agentName; private String userName;
/** /**
* 代购人id * 代购人id
*/ */
private String agentId; private String userId;
/**
* 商品品名
*/
private String descripitionName;
/** /**
* 创建时间 * 创建时间
*/ */
...@@ -58,26 +57,19 @@ public class TbCfPlatformOrderEntity implements Serializable { ...@@ -58,26 +57,19 @@ public class TbCfPlatformOrderEntity implements Serializable {
/** /**
* 实际付款 * 实际付款
*/ */
private BigDecimal realPay; private BigDecimal realityPay;
/** /**
* 第三方快递单号 * 第三方快递单号
*/ */
private String pExpressNumber; private String pExpressNumber;
/** /**
* 设置:商品品名 * 商品品名id
*/ */
public String setDescripitionName() { private String descripitionId;
return descripitionName;
}
/** /**
* 获取:商品品名 * 物流状态 10:无 20:有
*/ */
public String getDescripitionName() { private Integer logisticsStatus;
this.descripitionName = descripitionName;
return descripitionName;
}
/** /**
* 设置:对应id * 设置:对应id
...@@ -118,6 +110,19 @@ public class TbCfPlatformOrderEntity implements Serializable { ...@@ -118,6 +110,19 @@ public class TbCfPlatformOrderEntity implements Serializable {
public String getPOrderId() { public String getPOrderId() {
return pOrderId; return pOrderId;
} }
/**
* 设置:商品ID
*/
public void setItemId(String itemId) {
this.itemId = itemId;
}
/**
* 获取:商品ID
*/
public String getItemId() {
return itemId;
}
/** /**
* 设置:第三方平台名 * 设置:第三方平台名
*/ */
...@@ -160,28 +165,28 @@ public class TbCfPlatformOrderEntity implements Serializable { ...@@ -160,28 +165,28 @@ public class TbCfPlatformOrderEntity implements Serializable {
/** /**
* 设置:代购人 * 设置:代购人
*/ */
public void setAgentName(String agentName) { public void setUserName(String userName) {
this.agentName = agentName; this.userName = userName;
} }
/** /**
* 获取:代购人 * 获取:代购人
*/ */
public String getAgentName() { public String getUserName() {
return agentName; return userName;
} }
/** /**
* 设置:代购人id * 设置:代购人id
*/ */
public void setAgentId(String agentId) { public void setUserId(String userId) {
this.agentId = agentId; this.userId = userId;
} }
/** /**
* 获取:代购人id * 获取:代购人id
*/ */
public String getAgentId() { public String getUserId() {
return agentId; return userId;
} }
/** /**
* 设置:创建时间 * 设置:创建时间
...@@ -199,15 +204,15 @@ public class TbCfPlatformOrderEntity implements Serializable { ...@@ -199,15 +204,15 @@ public class TbCfPlatformOrderEntity implements Serializable {
/** /**
* 设置:实际付款 * 设置:实际付款
*/ */
public void setRealPay(BigDecimal realPay) { public void setRealityPay(BigDecimal realityPay) {
this.realPay = realPay; this.realityPay = realityPay;
} }
/** /**
* 获取:实际付款 * 获取:实际付款
*/ */
public BigDecimal getRealPay() { public BigDecimal getRealityPay() {
return realPay; return realityPay;
} }
/** /**
* 设置:第三方快递单号 * 设置:第三方快递单号
...@@ -222,5 +227,30 @@ public class TbCfPlatformOrderEntity implements Serializable { ...@@ -222,5 +227,30 @@ public class TbCfPlatformOrderEntity implements Serializable {
public String getPExpressNumber() { public String getPExpressNumber() {
return pExpressNumber; return pExpressNumber;
} }
/**
* 设置:商品品名id
*/
public void setDescripitionId(String descripitionId) {
this.descripitionId = descripitionId;
}
/**
* 获取:商品品名id
*/
public String getDescripitionId() {
return descripitionId;
}
/**
* 设置:物流状态 10:无 20:有
*/
public void setLogisticsStatus(Integer logisticsStatus) {
this.logisticsStatus = logisticsStatus;
}
/**
* 获取:物流状态 10:无 20:有
*/
public Integer getLogisticsStatus() {
return logisticsStatus;
}
} }
...@@ -98,6 +98,7 @@ public class TbCfOrderServiceImpl implements TbCfOrderService { ...@@ -98,6 +98,7 @@ public class TbCfOrderServiceImpl implements TbCfOrderService {
tbCfPlatformOrder.setUserName(sysUserDao.queryById(userId)); tbCfPlatformOrder.setUserName(sysUserDao.queryById(userId));
res = tbCfPlatformOrderDao.updates(tbCfPlatformOrder); res = tbCfPlatformOrderDao.updates(tbCfPlatformOrder);
} else { } else {
tbCfPlatformOrder.setLogisticsStatus(10);
tbCfPlatformOrder.setRelativeId(tbCfPlatformOrder.getOrdersId()); tbCfPlatformOrder.setRelativeId(tbCfPlatformOrder.getOrdersId());
tbCfPlatformOrder.setOrderId(tbCfItemOrderRDao.getOrderId(tbCfPlatformOrder.getOrdersId())); tbCfPlatformOrder.setOrderId(tbCfItemOrderRDao.getOrderId(tbCfPlatformOrder.getOrdersId()));
tbCfPlatformOrder.setCreateTime(new Date()); tbCfPlatformOrder.setCreateTime(new Date());
......
...@@ -52,6 +52,19 @@ public class PlatformOrderVo implements Serializable{ ...@@ -52,6 +52,19 @@ public class PlatformOrderVo implements Serializable{
*/ */
private String pExpressNumber; private String pExpressNumber;
/**
* 物流状态 10:无 20:有
*/
private Integer logisticsStatus;
public Integer getLogisticsStatus() {
return logisticsStatus;
}
public void setLogisticsStatus(Integer logisticsStatus) {
this.logisticsStatus = logisticsStatus;
}
private String userId; private String userId;
private String userName; private String userName;
......
...@@ -5,23 +5,22 @@ ...@@ -5,23 +5,22 @@
<resultMap type="com.platform.vo.PlatformOrderVo" id="tbCfPlatformOrderMap"> <resultMap type="com.platform.vo.PlatformOrderVo" id="tbCfPlatformOrderMap">
<result property="relativeId" column="relative_id"/> <result property="relativeId" column="relative_id"/>
<result property="ordersId" column="ordersId"/>
<result property="orderId" column="order_id"/> <result property="orderId" column="order_id"/>
<result property="pOrderId" column="p_order_id"/> <result property="pOrderId" column="p_order_id"/>
<result property="itemId" column="item_id"/>
<result property="platformName" column="platform_name"/> <result property="platformName" column="platform_name"/>
<result property="platformCode" column="platform_code"/> <result property="platformCode" column="platform_code"/>
<result property="pDeliveryAddress" column="p_delivery_address"/> <result property="pDeliveryAddress" column="p_delivery_address"/>
<result property="descripitionId" column="descripition_id"/>
<result property="templateId" column="template_id"/>
<result property="templateTitle" column="template_title"/>
<result property="userName" column="user_name"/> <result property="userName" column="user_name"/>
<result property="userId" column="user_id"/> <result property="userId" column="user_id"/>
<result property="createTime" column="create_time"/> <result property="createTime" column="create_time"/>
<result property="realityPay" column="reality_pay"/> <result property="realityPay" column="reality_pay"/>
<result property="pExpressNumber" column="p_express_number"/> <result property="pExpressNumber" column="p_express_number"/>
<result property="descripitionId" column="descripition_id"/>
<result property="logisticsStatus" column="logistics_status"/>
</resultMap> </resultMap>
<select id="queryObject" resultType="com.platform.vo.PlatformOrderVo"> <select id="queryObject" resultType="com.platform.vo.PlatformOrderVo">
select select
p.relative_id, p.relative_id,
p.order_id, p.order_id,
...@@ -42,48 +41,48 @@ ...@@ -42,48 +41,48 @@
where p.relative_id =#{relativeId} where p.relative_id =#{relativeId}
</select> </select>
<!--<select id="queryList" resultType="com.platform.vo.PlatformOrderVo"> <!--<select id="queryList" resultType="com.platform.vo.PlatformOrderVo">
select select
`relative_id`, `relative_id`,
p.order_id, p.order_id,
`p_order_id`, `p_order_id`,
`platform_name`, `platform_name`,
`platform_code`, `platform_code`,
`p_delivery_address`, `p_delivery_address`,
`agent_name`, `agent_name`,
`agent_id`, `agent_id`,
`create_time`, `create_time`,
`real_pay`, `real_pay`,
`p_express_number` `p_express_number`
from tb_cf_platform_order p left join tb_cf_order o on p.order_id=o.order_id from tb_cf_platform_order p left join tb_cf_order o on p.order_id=o.order_id
WHERE 1=1 WHERE 1=1
<if test="name != null and name.trim() != ''"> <if test="name != null and name.trim() != ''">
AND name LIKE concat('%',#{name},'%') AND name LIKE concat('%',#{name},'%')
</if> </if>
<choose> <choose>
<when test="sidx != null and sidx.trim() != ''"> <when test="sidx != null and sidx.trim() != ''">
order by ${sidx} ${order} order by ${sidx} ${order}
</when> </when>
<otherwise> <otherwise>
order by relative_id desc order by relative_id desc
</otherwise> </otherwise>
</choose> </choose>
<if test="offset != null and limit != null"> <if test="offset != null and limit != null">
limit #{offset}, #{limit} limit #{offset}, #{limit}
</if>
</select>-->
<!--
<select id="queryTotal" resultType="int">
select count(*) from tb_cf_platform_order
WHERE 1=1
<if test="name != null and name.trim() != ''">
AND name LIKE concat('%',#{name},'%')
</if> </if>
</select> </select>-->
-->
<!--
<select id="queryTotal" resultType="int">
select count(*) from tb_cf_platform_order
WHERE 1=1
<if test="name != null and name.trim() != ''">
AND name LIKE concat('%',#{name},'%')
</if>
</select>
-->
<insert id="save" parameterType="com.platform.vo.PlatformOrderVo"> <insert id="save" parameterType="com.platform.vo.PlatformOrderVo">
insert into tb_cf_platform_order( insert into tb_cf_platform_order(
`relative_id`, `relative_id`,
`order_id`, `order_id`,
...@@ -96,7 +95,8 @@ ...@@ -96,7 +95,8 @@
`create_time`, `create_time`,
`reality_pay`, `reality_pay`,
`p_express_number`, `p_express_number`,
`descripition_id`) `descripition_id`,
`logistics_status`)
values( values(
#{relativeId}, #{relativeId},
#{orderId}, #{orderId},
...@@ -109,44 +109,49 @@ ...@@ -109,44 +109,49 @@
#{createTime}, #{createTime},
#{realityPay}, #{realityPay},
#{pExpressNumber}, #{pExpressNumber},
#{descripitionId}) #{descripitionId},
#{logisticsStatus})
</insert> </insert>
<update id="update" parameterType="com.platform.entity.TbCfItemOrderREntity">
update tb_cf_platform_order
<set>
<if test="orderId != null">`order_id` = #{orderId},</if>
<if test="pOrderId != null">`p_order_id` = #{pOrderId},</if>
<if test="itemId != null">`item_id` = #{itemId},</if>
<if test="platformName != null">`platform_name` = #{platformName},</if>
<if test="platformCode != null">`platform_code` = #{platformCode},</if>
<if test="pDeliveryAddress != null">`p_delivery_address` = #{pDeliveryAddress},</if>
<if test="userName != null">`user_name` = #{userName},</if>
<if test="userId != null">`user_id` = #{userId},</if>
<if test="createTime != null">`create_time` = #{createTime},</if>
<if test="realityPay != null">`reality_pay` = #{realityPay},</if>
<if test="pExpressNumber != null">`p_express_number` = #{pExpressNumber},</if>
<if test="descripitionId != null">`descripition_id` = #{descripitionId},</if>
<if test="logisticsStatus != null">`logistics_status` = #{logisticsStatus}</if>
</set>
where relative_id = #{relativeId}
</update>
<!--<update id="update" parameterType="com.platform.vo.PlatformOrderVo"> <update id="updates" parameterType="com.platform.vo.PlatformOrderVo">
update tb_cf_platform_order update tb_cf_platform_order p left join tb_cf_express_template e on e.template_id=p.descripition_id
<set> left join tb_cf_item_order_r i on i.order_id=p.order_id
<if test="orderId != null">`order_id` = #{orderId}, </if> <set>
<if test="pOrderId != null">`p_order_id` = #{pOrderId}, </if> <if test="orderId != null">p.order_id = #{orderId},</if>
<if test="platformName != null">`platform_name` = #{platformName}, </if> <if test="pOrderId != null">p.p_order_id = #{pOrderId},</if>
<if test="platformCode != null">`platform_code` = #{platformCode}, </if> <if test="platformName != null">p.platform_name = #{platformName},</if>
<if test="pDeliveryAddress != null">`p_delivery_address` = #{pDeliveryAddress}, </if> <if test="platformCode != null">p.platform_code = #{platformCode},</if>
<if test="userName != null">`user_name` = #{userName}, </if> <if test="pDeliveryAddress != null">p.p_delivery_address = #{pDeliveryAddress},</if>
<if test="userId != null">`user_id` = #{userId}, </if> <if test="createTime != null">p.create_time = #{createTime},</if>
<if test="createTime != null">`create_time` = #{createTime}, </if> <if test="realityPay != null">p.reality_pay = #{realityPay},</if>
<if test="realityPay != null">`reality_pay` = #{realityPay}, </if> <if test="pExpressNumber != null">p.p_express_number = #{pExpressNumber},</if>
<if test="pExpressNumber != null">`p_express_number` = #{pExpressNumber}</if> <if test="descripitionId != null">p.descripition_id = #{descripitionId},</if>
</set> <if test="logisticsStatus != null">`logistics_status` = #{logisticsStatus}</if>
where relative_id = #{relativeId} </set>
</update>--> where p.relative_id = #{relativeId}
<update id="updates" parameterType="com.platform.vo.PlatformOrderVo" > </update>
update tb_cf_platform_order p left join tb_cf_express_template e on e.template_id=p.descripition_id
left join tb_cf_item_order_r i on i.order_id=p.order_id
<set>
<if test="orderId != null">p.order_id = #{orderId}, </if>
<if test="pOrderId != null">p.p_order_id = #{pOrderId}, </if>
<if test="platformName != null">p.platform_name = #{platformName}, </if>
<if test="platformCode != null">p.platform_code = #{platformCode}, </if>
<if test="pDeliveryAddress != null">p.p_delivery_address = #{pDeliveryAddress}, </if>
<if test="createTime != null">p.create_time = #{createTime}, </if>
<if test="realityPay != null">p.reality_pay = #{realityPay}, </if>
<if test="pExpressNumber != null">p.p_express_number = #{pExpressNumber},</if>
<if test="descripitionId != null">p.descripition_id = #{descripitionId}</if>
</set>
where p.relative_id = #{relativeId}
</update>
<!-- <delete id="delete"> <!-- <delete id="delete">
delete from tb_cf_platform_order where relative_id = #{value} delete from tb_cf_platform_order where relative_id = #{value}
</delete> </delete>
...@@ -157,8 +162,8 @@ ...@@ -157,8 +162,8 @@
</foreach> </foreach>
</delete>--> </delete>-->
<!--获取订单的代购信息--> <!--获取订单的代购信息-->
<select id="getAgentInfo" resultType="com.platform.vo.PlatformOrderVo"> <select id="getAgentInfo" resultType="com.platform.vo.PlatformOrderVo">
select select
o.order_id, o.order_id,
p.relative_id, p.relative_id,
...@@ -181,7 +186,7 @@ ...@@ -181,7 +186,7 @@
where i.order_item_id =#{ordersId} and p.relative_id=#{ordersId}; where i.order_item_id =#{ordersId} and p.relative_id=#{ordersId};
</select> </select>
<select id="getOrdersId" resultType="com.platform.entity.TbCfItemOrderREntity"> <select id="getOrdersId" resultType="com.platform.entity.TbCfItemOrderREntity">
select select
r.order_item_id, r.order_item_id,
r.order_id, r.order_id,
...@@ -189,18 +194,18 @@ ...@@ -189,18 +194,18 @@
from tb_cf_platform_order p left join tb_cf_item_order_r r on r.order_item_id=p.relative_id from tb_cf_platform_order p left join tb_cf_item_order_r r on r.order_item_id=p.relative_id
where 1=1 and p.p_express_number=#{sid} where 1=1 and p.p_express_number=#{sid}
</select> </select>
<select id="getOrderId" resultType="String"> <select id="getOrderId" resultType="String">
select order_id from tb_cf_platform_order where p_express_number=#{sid} select order_id from tb_cf_platform_order where p_express_number=#{sid}
</select> </select>
<select id="findOrderByExpressNumber" resultType="com.platform.entity.TbCfOrderEntity"> <select id="findOrderByExpressNumber" resultType="com.platform.entity.TbCfOrderEntity">
select o.delivery_phone,i.order_item_id ordersId,i.order_id select o.delivery_phone,i.order_item_id ordersId,i.order_id
from tb_cf_platform_order p from tb_cf_platform_order p
left join tb_cf_item_order_r i on p.order_id=i.order_id left join tb_cf_item_order_r i on p.order_id=i.order_id
left join tb_cf_order o on o.order_id=i.order_id left join tb_cf_order o on o.order_id=i.order_id
where i.is_send=0 and i.delivery_flag=40 and p.p_express_number in where i.is_send=0 and i.delivery_flag=40 and p.p_express_number in
<foreach collection="array" item="sids" open="(" separator="," close=")"> <foreach collection="array" item="sids" open="(" separator="," close=")">
#{sids} #{sids}
</foreach> </foreach>
</select> </select>
</mapper> </mapper>
\ No newline at end of file
...@@ -2,13 +2,13 @@ ...@@ -2,13 +2,13 @@
#jdbc.username=root #jdbc.username=root
#jdbc.password=root #jdbc.password=root
#jdbc.url=jdbc:mysql://47.106.242.175:3306/chinafrica?allowMultiQueries=true&useSSL=false&useUnicode=true&characterEncoding=UTF-8 jdbc.url=jdbc:mysql://47.106.242.175:3306/chinafrica?allowMultiQueries=true&useSSL=false&useUnicode=true&characterEncoding=UTF-8
#jdbc.username=root jdbc.username=root
#jdbc.password=diaoyun666 jdbc.password=diaoyun666
jdbc.url: jdbc:mysql://159.138.48.71:3306/chinafrica?useUnicode=true&characterEncoding=UTF-8&rewriteBatchedStatements=true&autoReconnect=true&failOverReadOnly=false&zeroDateTimeBehavior=convertToNull&useSSL=false #jdbc.url: jdbc:mysql://159.138.48.71:3306/chinafrica?useUnicode=true&characterEncoding=UTF-8&rewriteBatchedStatements=true&autoReconnect=true&failOverReadOnly=false&zeroDateTimeBehavior=convertToNull&useSSL=false
jdbc.username: root #jdbc.username: root
jdbc.password: Diaoyunnuli.8 #jdbc.password: Diaoyunnuli.8
jdbc.initialSize=5 jdbc.initialSize=5
jdbc.maxActive=30 jdbc.maxActive=30
......
...@@ -2,13 +2,13 @@ ...@@ -2,13 +2,13 @@
#jdbc.username=root #jdbc.username=root
#jdbc.password=root #jdbc.password=root
#jdbc.url=jdbc:mysql://47.106.242.175:3306/chinafrica?allowMultiQueries=true&useSSL=false&useUnicode=true&characterEncoding=UTF-8 jdbc.url=jdbc:mysql://47.106.242.175:3306/chinafrica?allowMultiQueries=true&useSSL=false&useUnicode=true&characterEncoding=UTF-8
#jdbc.username=root jdbc.username=root
#jdbc.password=diaoyun666 jdbc.password=diaoyun666
jdbc.url: jdbc:mysql://159.138.48.71:3306/chinafrica?useUnicode=true&characterEncoding=UTF-8&rewriteBatchedStatements=true&autoReconnect=true&failOverReadOnly=false&zeroDateTimeBehavior=convertToNull&useSSL=false #jdbc.url: jdbc:mysql://159.138.48.71:3306/chinafrica?useUnicode=true&characterEncoding=UTF-8&rewriteBatchedStatements=true&autoReconnect=true&failOverReadOnly=false&zeroDateTimeBehavior=convertToNull&useSSL=false
jdbc.username: root #jdbc.username: root
jdbc.password: Diaoyunnuli.8 #jdbc.password: Diaoyunnuli.8
jdbc.initialSize=5 jdbc.initialSize=5
jdbc.maxActive=30 jdbc.maxActive=30
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论