提交 057e9402 authored 作者: 吴德鹏's avatar 吴德鹏

修复代购bug

上级 7557785c
......@@ -117,4 +117,6 @@ public interface TbCfOrderDao extends BaseDao<TbCfOrderEntity> {
TbCfOrderEntity queryOrderById(String orderId);
int getOrderCount(@Param("orderId") String orderId,@Param("flag") Integer flag);
}
......@@ -141,6 +141,14 @@ public class TbCfOrderServiceImpl implements TbCfOrderService {
tbCfItemOrderREntity3.setDeliveryTime(new Date());
tbCfItemOrderRDao.updateDeliveryTime(tbCfItemOrderREntity3);
}
int totalOrderCount = tbCfOrderDao.getOrderCount(tbCfPlatformOrder.getOrderId(), null);
int deliveryCount = tbCfOrderDao.getOrderCount(tbCfPlatformOrder.getOrderId(), 10);
if (deliveryCount == totalOrderCount) {
TbCfOrderEntity tbCfOrderEntity = new TbCfOrderEntity();
tbCfOrderEntity.setOrderId(tbCfPlatformOrder.getOrderId());
tbCfOrderEntity.setDeliveryFlag(DeliveryStatusEnum.PURCHASE.getValue());
tbCfOrderDao.updates(tbCfOrderEntity);
}
if (res > 0) {
tbCfPlatformOrder = tbCfPlatformOrderDao.queryObject(tbCfPlatformOrder.getOrdersId());
}
......
......@@ -511,6 +511,12 @@
select t2.*
from tb_cf_item_order_r t1 left join tb_cf_item_detail t2 on t2.item_id=t1.item_id where t1.order_id =#{orderId} and t1.enable_flag=1
</select>
<select id="getOrderCount" resultType="int">
select count(1) from tb_cf_item_order_r where order_id=#{orderId}
<if test="flag!=null">
and delivery_flag=#{flag}
</if>
</select>
<update id="updateDeliveryTime" parameterType="com.platform.entity.TbCfOrderEntity">
update tb_cf_order o left join tb_cf_item_order_r r on r.order_id=o.order_id
......
......@@ -2,13 +2,13 @@
#jdbc.username=root
#jdbc.password=root
#jdbc.url=jdbc:mysql://47.106.242.175:3306/chinafrica?allowMultiQueries=true&useSSL=false&useUnicode=true&characterEncoding=UTF-8
#jdbc.username=root
#jdbc.password=diaoyun666
jdbc.url=jdbc:mysql://47.106.242.175:3306/afrishop_test?allowMultiQueries=true&useSSL=false&useUnicode=true&characterEncoding=UTF-8
jdbc.username=root
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.username: root
jdbc.password: Diaoyunnuli.8
#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.password: Diaoyunnuli.8
jdbc.initialSize=5
jdbc.maxActive=30
......
......@@ -2,13 +2,13 @@
#jdbc.username=root
#jdbc.password=root
#jdbc.url=jdbc:mysql://47.106.242.175:3306/chinafrica?allowMultiQueries=true&useSSL=false&useUnicode=true&characterEncoding=UTF-8
#jdbc.username=root
#jdbc.password=diaoyun666
jdbc.url=jdbc:mysql://47.106.242.175:3306/afrishop_test?allowMultiQueries=true&useSSL=false&useUnicode=true&characterEncoding=UTF-8
jdbc.username=root
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.username: root
jdbc.password: Diaoyunnuli.8
#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.password: Diaoyunnuli.8
jdbc.initialSize=5
jdbc.maxActive=30
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论