提交 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,20 +5,19 @@ ...@@ -5,20 +5,19 @@
<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">
...@@ -73,7 +72,7 @@ ...@@ -73,7 +72,7 @@
</if> </if>
</select>--> </select>-->
<!-- <!--
<select id="queryTotal" resultType="int"> <select id="queryTotal" resultType="int">
select count(*) from tb_cf_platform_order select count(*) from tb_cf_platform_order
WHERE 1=1 WHERE 1=1
...@@ -81,7 +80,7 @@ ...@@ -81,7 +80,7 @@
AND name LIKE concat('%',#{name},'%') AND name LIKE concat('%',#{name},'%')
</if> </if>
</select> </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(
...@@ -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,39 +109,44 @@ ...@@ -109,39 +109,44 @@
#{createTime}, #{createTime},
#{realityPay}, #{realityPay},
#{pExpressNumber}, #{pExpressNumber},
#{descripitionId}) #{descripitionId},
#{logisticsStatus})
</insert> </insert>
<update id="update" parameterType="com.platform.entity.TbCfItemOrderREntity">
<!--<update id="update" parameterType="com.platform.vo.PlatformOrderVo">
update tb_cf_platform_order update tb_cf_platform_order
<set> <set>
<if test="orderId != null">`order_id` = #{orderId}, </if> <if test="orderId != null">`order_id` = #{orderId},</if>
<if test="pOrderId != null">`p_order_id` = #{pOrderId}, </if> <if test="pOrderId != null">`p_order_id` = #{pOrderId},</if>
<if test="platformName != null">`platform_name` = #{platformName}, </if> <if test="itemId != null">`item_id` = #{itemId},</if>
<if test="platformCode != null">`platform_code` = #{platformCode}, </if> <if test="platformName != null">`platform_name` = #{platformName},</if>
<if test="pDeliveryAddress != null">`p_delivery_address` = #{pDeliveryAddress}, </if> <if test="platformCode != null">`platform_code` = #{platformCode},</if>
<if test="userName != null">`user_name` = #{userName}, </if> <if test="pDeliveryAddress != null">`p_delivery_address` = #{pDeliveryAddress},</if>
<if test="userId != null">`user_id` = #{userId}, </if> <if test="userName != null">`user_name` = #{userName},</if>
<if test="createTime != null">`create_time` = #{createTime}, </if> <if test="userId != null">`user_id` = #{userId},</if>
<if test="realityPay != null">`reality_pay` = #{realityPay}, </if> <if test="createTime != null">`create_time` = #{createTime},</if>
<if test="pExpressNumber != null">`p_express_number` = #{pExpressNumber}</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> </set>
where relative_id = #{relativeId} where relative_id = #{relativeId}
</update>--> </update>
<update id="updates" parameterType="com.platform.vo.PlatformOrderVo" >
<update id="updates" parameterType="com.platform.vo.PlatformOrderVo">
update tb_cf_platform_order p left join tb_cf_express_template e on e.template_id=p.descripition_id 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 left join tb_cf_item_order_r i on i.order_id=p.order_id
<set> <set>
<if test="orderId != null">p.order_id = #{orderId}, </if> <if test="orderId != null">p.order_id = #{orderId},</if>
<if test="pOrderId != null">p.p_order_id = #{pOrderId}, </if> <if test="pOrderId != null">p.p_order_id = #{pOrderId},</if>
<if test="platformName != null">p.platform_name = #{platformName}, </if> <if test="platformName != null">p.platform_name = #{platformName},</if>
<if test="platformCode != null">p.platform_code = #{platformCode}, </if> <if test="platformCode != null">p.platform_code = #{platformCode},</if>
<if test="pDeliveryAddress != null">p.p_delivery_address = #{pDeliveryAddress}, </if> <if test="pDeliveryAddress != null">p.p_delivery_address = #{pDeliveryAddress},</if>
<if test="createTime != null">p.create_time = #{createTime}, </if> <if test="createTime != null">p.create_time = #{createTime},</if>
<if test="realityPay != null">p.reality_pay = #{realityPay}, </if> <if test="realityPay != null">p.reality_pay = #{realityPay},</if>
<if test="pExpressNumber != null">p.p_express_number = #{pExpressNumber},</if> <if test="pExpressNumber != null">p.p_express_number = #{pExpressNumber},</if>
<if test="descripitionId != null">p.descripition_id = #{descripitionId}</if> <if test="descripitionId != null">p.descripition_id = #{descripitionId},</if>
<if test="logisticsStatus != null">`logistics_status` = #{logisticsStatus}</if>
</set> </set>
where p.relative_id = #{relativeId} where p.relative_id = #{relativeId}
</update> </update>
......
...@@ -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 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论