提交 5b840a11 authored 作者: luojie's avatar luojie

订单修改完成。

上级 ffab217b
...@@ -231,4 +231,24 @@ public class TbCfOrderController { ...@@ -231,4 +231,24 @@ public class TbCfOrderController {
tbCfOrderListService.closeOrder(orderId); tbCfOrderListService.closeOrder(orderId);
return R.ok(); return R.ok();
} }
/**
* 备注订单
*/
@GetMapping("/memoOrder/{orderId}")
@RequiresPermissions("tbcforder:info")
@ResponseBody
public R memoOrder(@PathVariable("orderId") String orderId) {
OrderBasicVo memoOrderVo = tbCfOrderListService.getMemoOrder(orderId);
return R.ok().put("data", memoOrderVo);
}
/**
* 保存或更新备注信息
*/
@PostMapping("/memoOrder")
@RequiresPermissions("tbcforder:info")
@ResponseBody
public R saveOrUpdatemMemoOrder(@RequestBody OrderBasicVo memoOrderVo) {
int res = tbCfOrderListService.saveOrUpdatemMemoOrder(memoOrderVo);
return R.ok().put("result", res);
}
} }
...@@ -2,8 +2,6 @@ package com.platform.dao; ...@@ -2,8 +2,6 @@ package com.platform.dao;
import com.platform.entity.TbCfItemDetailEntity; import com.platform.entity.TbCfItemDetailEntity;
import com.platform.entity.TbCfOrderEntity; import com.platform.entity.TbCfOrderEntity;
import com.platform.entity.TbCfPlatformOrderEntity;
import org.apache.ibatis.annotations.Param;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.List; import java.util.List;
...@@ -74,4 +72,5 @@ public interface TbCfOrderDao extends BaseDao<TbCfOrderEntity> { ...@@ -74,4 +72,5 @@ public interface TbCfOrderDao extends BaseDao<TbCfOrderEntity> {
BigDecimal queryOrderPriceYesterday(); BigDecimal queryOrderPriceYesterday();
int updateOrder(String orderId); int updateOrder(String orderId);
} }
package com.platform.dao; package com.platform.dao;
import com.platform.entity.TbCfOrderListEntity; import com.platform.entity.TbCfOrderListEntity;
import com.platform.utils.Query;
import com.platform.vo.DeliveryOrderVo; import com.platform.vo.DeliveryOrderVo;
import com.platform.vo.OrderBasicVo; import com.platform.vo.OrderBasicVo;
...@@ -36,4 +35,8 @@ public interface TbCfOrderListDao extends BaseDao<TbCfOrderListEntity> { ...@@ -36,4 +35,8 @@ public interface TbCfOrderListDao extends BaseDao<TbCfOrderListEntity> {
int queryTotal(Map<String, Object> map); int queryTotal(Map<String, Object> map);
int closeOrder(String orderId); int closeOrder(String orderId);
OrderBasicVo getMemoOrder(String orderId);
int saveOrUpdatemMemoOrder(OrderBasicVo memoOrderVo);
} }
...@@ -137,6 +137,18 @@ public class TbCfOrderEntity implements Serializable { ...@@ -137,6 +137,18 @@ public class TbCfOrderEntity implements Serializable {
* 商品品名 * 商品品名
*/ */
private String descripitionName; private String descripitionName;
/**
* 订单备注
*/
private String remarkInfo;
public String getRemarkInfo() {
return remarkInfo;
}
public void setRemarkInfo(String remarkInfo) {
this.remarkInfo = remarkInfo;
}
/** /**
* 设置:订单id * 设置:订单id
......
package com.platform.service; package com.platform.service;
import com.platform.entity.TbCfOrderListEntity; import com.platform.entity.TbCfOrderListEntity;
import com.platform.utils.Query;
import com.platform.vo.DeliveryOrderVo; import com.platform.vo.DeliveryOrderVo;
import com.platform.vo.OrderBasicVo; import com.platform.vo.OrderBasicVo;
...@@ -40,4 +39,8 @@ public interface TbCfOrderListService { ...@@ -40,4 +39,8 @@ public interface TbCfOrderListService {
int queryTotal(Map<String, Object> map); int queryTotal(Map<String, Object> map);
int closeOrder(String orderId); int closeOrder(String orderId);
OrderBasicVo getMemoOrder(String orderId);
int saveOrUpdatemMemoOrder(OrderBasicVo memoOrderVo);
} }
...@@ -111,4 +111,5 @@ public interface TbCfOrderService { ...@@ -111,4 +111,5 @@ public interface TbCfOrderService {
BigDecimal queryOrderPriceYesterday(); BigDecimal queryOrderPriceYesterday();
int deleteOrder(String orderId); int deleteOrder(String orderId);
} }
...@@ -3,12 +3,12 @@ package com.platform.service.impl; ...@@ -3,12 +3,12 @@ package com.platform.service.impl;
import com.platform.dao.TbCfOrderListDao; import com.platform.dao.TbCfOrderListDao;
import com.platform.entity.TbCfOrderListEntity; import com.platform.entity.TbCfOrderListEntity;
import com.platform.service.TbCfOrderListService; import com.platform.service.TbCfOrderListService;
import com.platform.utils.Query;
import com.platform.vo.DeliveryOrderVo; import com.platform.vo.DeliveryOrderVo;
import com.platform.vo.OrderBasicVo; import com.platform.vo.OrderBasicVo;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -57,4 +57,16 @@ public class TbCfOrderListServiceImpl implements TbCfOrderListService { ...@@ -57,4 +57,16 @@ public class TbCfOrderListServiceImpl implements TbCfOrderListService {
public int closeOrder(String orderId) { public int closeOrder(String orderId) {
return tbCfOrderListDao.closeOrder(orderId); return tbCfOrderListDao.closeOrder(orderId);
} }
@Override
public OrderBasicVo getMemoOrder(String orderId) {
return tbCfOrderListDao.getMemoOrder(orderId);
}
@Override
public int saveOrUpdatemMemoOrder(OrderBasicVo memoOrderVo) {
memoOrderVo.setUpdateTime(new Date());
return tbCfOrderListDao.saveOrUpdatemMemoOrder(memoOrderVo);
}
} }
...@@ -11,7 +11,6 @@ import com.platform.utils.IdUtil; ...@@ -11,7 +11,6 @@ import com.platform.utils.IdUtil;
import com.platform.utils.ShiroUtils; import com.platform.utils.ShiroUtils;
import com.platform.utils.StringUtils; import com.platform.utils.StringUtils;
import com.platform.vo.PlatformOrderVo; import com.platform.vo.PlatformOrderVo;
import io.swagger.models.auth.In;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -123,6 +122,7 @@ public class TbCfOrderServiceImpl implements TbCfOrderService { ...@@ -123,6 +122,7 @@ public class TbCfOrderServiceImpl implements TbCfOrderService {
TbCfOrderEntity tbCfOrderEntity = new TbCfOrderEntity(); TbCfOrderEntity tbCfOrderEntity = new TbCfOrderEntity();
tbCfOrderEntity.setOrderId(tbCfPlatformOrder.getOrderId()); tbCfOrderEntity.setOrderId(tbCfPlatformOrder.getOrderId());
tbCfOrderEntity.setOrderStatus(OrderStatusEnum.SHIPPED.getValue()); tbCfOrderEntity.setOrderStatus(OrderStatusEnum.SHIPPED.getValue());
tbCfOrderEntity.setDeliveryFlag(DeliveryStatusEnum.PURCHASE.getValue());
tbCfOrderDao.updates(tbCfOrderEntity); tbCfOrderDao.updates(tbCfOrderEntity);
} }
//更新发货时间,如果原值为空就更新,否则保留原值 //更新发货时间,如果原值为空就更新,否则保留原值
......
...@@ -29,8 +29,26 @@ public class OrderBasicVo implements Serializable { ...@@ -29,8 +29,26 @@ public class OrderBasicVo implements Serializable {
private BigDecimal realityPay; private BigDecimal realityPay;
private Date orderTime; private Date orderTime;
private Integer orderStatus; private Integer orderStatus;
private String remarkInfo;
private Date updateTime;
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public String getRemarkInfo() {
return remarkInfo;
}
public void setRemarkInfo(String remarkInfo) {
this.remarkInfo = remarkInfo;
}
public Integer getOrderStatus() { public Integer getOrderStatus() {
return orderStatus; return orderStatus;
} }
......
...@@ -56,6 +56,14 @@ public class PlatformOrderVo implements Serializable{ ...@@ -56,6 +56,14 @@ public class PlatformOrderVo implements Serializable{
private String userName; private String userName;
public String getRelativeId() {
return relativeId;
}
public void setRelativeId(String relativeId) {
this.relativeId = relativeId;
}
public String getOrdersId() { public String getOrdersId() {
return ordersId; return ordersId;
} }
...@@ -64,15 +72,14 @@ public class PlatformOrderVo implements Serializable{ ...@@ -64,15 +72,14 @@ public class PlatformOrderVo implements Serializable{
this.ordersId = ordersId; this.ordersId = ordersId;
} }
public String getRelativeId() { public String getOrderId() {
return relativeId; return orderId;
} }
public void setRelativeId(String relativeId) { public void setOrderId(String orderId) {
this.relativeId = relativeId; this.orderId = orderId;
} }
public String getpOrderId() { public String getpOrderId() {
return pOrderId; return pOrderId;
} }
...@@ -105,7 +112,6 @@ public class PlatformOrderVo implements Serializable{ ...@@ -105,7 +112,6 @@ public class PlatformOrderVo implements Serializable{
this.pDeliveryAddress = pDeliveryAddress; this.pDeliveryAddress = pDeliveryAddress;
} }
public String getDescripitionId() { public String getDescripitionId() {
return descripitionId; return descripitionId;
} }
...@@ -130,7 +136,6 @@ public class PlatformOrderVo implements Serializable{ ...@@ -130,7 +136,6 @@ public class PlatformOrderVo implements Serializable{
this.realityPay = realityPay; this.realityPay = realityPay;
} }
public String getpExpressNumber() { public String getpExpressNumber() {
return pExpressNumber; return pExpressNumber;
} }
...@@ -154,12 +159,4 @@ public class PlatformOrderVo implements Serializable{ ...@@ -154,12 +159,4 @@ public class PlatformOrderVo implements Serializable{
public void setUserName(String userName) { public void setUserName(String userName) {
this.userName = userName; this.userName = userName;
} }
public String getOrderId() {
return orderId;
}
public void setOrderId(String orderId) {
this.orderId = orderId;
}
} }
...@@ -287,7 +287,8 @@ ...@@ -287,7 +287,8 @@
<update id="updates" parameterType="com.platform.entity.TbCfOrderEntity"> <update id="updates" parameterType="com.platform.entity.TbCfOrderEntity">
update tb_cf_order update tb_cf_order
<set> <set>
<if test="orderStatus != null">order_status = #{orderStatus} </if> <if test="orderStatus != null">order_status = #{orderStatus}, </if>
<if test="deliveryFlag != null">delivery_flag = #{deliveryFlag} </if>
</set> </set>
where order_id =#{orderId} where order_id =#{orderId}
</update> </update>
......
...@@ -115,7 +115,7 @@ ...@@ -115,7 +115,7 @@
select select
r.order_item_id ordersId, r.order_item_id ordersId,
r.order_id, o.order_id,
i.item_id, i.item_id,
o.order_no, o.order_no,
i.item_img, i.item_img,
...@@ -166,7 +166,9 @@ ...@@ -166,7 +166,9 @@
c.coupon_id, c.coupon_id,
o.reality_pay, o.reality_pay,
o.order_time, o.order_time,
o.order_status o.order_status,
o.remark_info,
o.update_time
from tb_cf_order o from tb_cf_order o
LEFT JOIN tb_cf_finance f on f.order_id=o.order_id LEFT JOIN tb_cf_finance f on f.order_id=o.order_id
LEFT JOIN tb_cf_coupon c on c.coupon_id=o.coupon_id LEFT JOIN tb_cf_coupon c on c.coupon_id=o.coupon_id
...@@ -198,4 +200,22 @@ ...@@ -198,4 +200,22 @@
update tb_cf_order set order_status=60 where order_id=#{orderId} update tb_cf_order set order_status=60 where order_id=#{orderId}
</update> </update>
<select id="getMemoOrder" resultType="com.platform.vo.OrderBasicVo">
select
order_id,
remark_info,
update_time
from tb_cf_order where order_id=#{orderId}
</select>
<update id="saveOrUpdatemMemoOrder" parameterType="com.platform.vo.OrderBasicVo">
update
tb_cf_order
<set>
<if test="orderId != null">order_id = #{orderId}, </if>
<if test="remarkInfo != null">remark_info= #{remarkInfo}, </if>
<if test="updateTime != null">update_time = #{updateTime}, </if>
</set>
where order_id=#{orderId}
</update>
</mapper> </mapper>
\ No newline at end of file
...@@ -139,7 +139,9 @@ function eyeImages(data) { ...@@ -139,7 +139,9 @@ function eyeImages(data) {
* @param name * @param name
*/ */
function handleResetForm(vue, name) { function handleResetForm(vue, name) {
if (vue.$refs[name]!==undefined) {
vue.$refs[name].resetFields(); vue.$refs[name].resetFields();
}
}; };
......
...@@ -331,7 +331,7 @@ let vm = new Vue({ ...@@ -331,7 +331,7 @@ let vm = new Vue({
} }
}); });
}, },
/*获取订单的代购信息*/ /* /!*获取订单的代购信息*!/
getAgentInfo: function (ordersId) { getAgentInfo: function (ordersId) {
// debugger // debugger
Ajax.request({ Ajax.request({
...@@ -362,9 +362,9 @@ let vm = new Vue({ ...@@ -362,9 +362,9 @@ let vm = new Vue({
} }
} }
}); });
}, },*/
//新增或者修改代购信息 //新增或者修改代购信息
saveOrUpdateAgentInfo: function () { /* saveOrUpdateAgentInfo: function () {
let that = this; let that = this;
if(vm.agentInfo.descripitionId){ if(vm.agentInfo.descripitionId){
Ajax.request({ Ajax.request({
...@@ -390,7 +390,7 @@ let vm = new Vue({ ...@@ -390,7 +390,7 @@ let vm = new Vue({
alert("保存失败,请选择商品品名"); alert("保存失败,请选择商品品名");
} }
}, },*/
reload: function (event) { reload: function (event) {
vm.showList = true; vm.showList = true;
let orderNo=vm.orderNo; let orderNo=vm.orderNo;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论