提交 7789db9f 作者: zhenjie

用户删除订单、优化

上级 4047dffe
...@@ -47,4 +47,6 @@ public interface UavOrderDao { ...@@ -47,4 +47,6 @@ public interface UavOrderDao {
UavOrderPayDO getUavOrderPayById(Integer id); UavOrderPayDO getUavOrderPayById(Integer id);
void updateUavOrderProportion(Integer id, Integer proportion); void updateUavOrderProportion(Integer id, Integer proportion);
void closeShowUavOrder(Integer id);
} }
package com.mmc.oms.model.dto.uav; package com.mmc.oms.model.dto.uav;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
...@@ -38,8 +39,10 @@ public class UavOrderExpressDTO implements Serializable { ...@@ -38,8 +39,10 @@ public class UavOrderExpressDTO implements Serializable {
@ApiModelProperty(value = "发货-收货详细地址") @ApiModelProperty(value = "发货-收货详细地址")
private String takeAddress; private String takeAddress;
@ApiModelProperty(value = "发货-平台操作发货时间") @ApiModelProperty(value = "发货-平台操作发货时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone="GMT+8")
private Date sendTime; private Date sendTime;
@ApiModelProperty(value = "取件时间") @ApiModelProperty(value = "取件时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone="GMT+8")
private Date receiveTime; private Date receiveTime;
@ApiModelProperty(value = "是否已取件,0未取,1已取") @ApiModelProperty(value = "是否已取件,0未取,1已取")
private Integer receive; private Integer receive;
......
package com.mmc.oms.model.dto.uav; package com.mmc.oms.model.dto.uav;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
...@@ -37,6 +38,7 @@ public class UavOrderPayDTO implements Serializable { ...@@ -37,6 +38,7 @@ public class UavOrderPayDTO implements Serializable {
@ApiModelProperty(value = "未通过原因") @ApiModelProperty(value = "未通过原因")
private String refuseReason; private String refuseReason;
@ApiModelProperty(value = "提交时间") @ApiModelProperty(value = "提交时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone="GMT+8")
private Date createTime; private Date createTime;
@ApiModelProperty(value = "0微信支付,1支付宝,2线下支付凭证") @ApiModelProperty(value = "0微信支付,1支付宝,2线下支付凭证")
private Integer payType; private Integer payType;
......
package com.mmc.oms.model.dto.uav; package com.mmc.oms.model.dto.uav;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
...@@ -45,5 +46,6 @@ public class UavOrderSkuDTO implements Serializable { ...@@ -45,5 +46,6 @@ public class UavOrderSkuDTO implements Serializable {
@ApiModelProperty("商品规格编号") @ApiModelProperty("商品规格编号")
private String skuNo; private String skuNo;
@ApiModelProperty("下单时间") @ApiModelProperty("下单时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone="GMT+8")
private Date createTime; private Date createTime;
} }
...@@ -35,6 +35,9 @@ public class UavOrderQO implements Serializable { ...@@ -35,6 +35,9 @@ public class UavOrderQO implements Serializable {
@ApiModelProperty(value = "商家id", hidden = true) @ApiModelProperty(value = "商家id", hidden = true)
private Integer thirdBackUserAccountId; private Integer thirdBackUserAccountId;
@ApiModelProperty(value = "订单是否展示给用户", hidden = true)
private Integer show;
@ApiModelProperty(value = "开始时间") @ApiModelProperty(value = "开始时间")
private String startTime; private String startTime;
......
...@@ -342,6 +342,7 @@ public class UavOrderServiceImpl implements UavOrderService { ...@@ -342,6 +342,7 @@ public class UavOrderServiceImpl implements UavOrderService {
@Override @Override
public ResultBody listByUid(UavOrderQO uavOrderQO, BaseAccountDTO currentAccount) { public ResultBody listByUid(UavOrderQO uavOrderQO, BaseAccountDTO currentAccount) {
uavOrderQO.setUserAccountId(currentAccount.getUserAccountId()); uavOrderQO.setUserAccountId(currentAccount.getUserAccountId());
uavOrderQO.setShow(1);
int count = uavOrderDao.countList(uavOrderQO); int count = uavOrderDao.countList(uavOrderQO);
if (count == 0) { if (count == 0) {
return ResultBody.success(PageResult.buildPage(uavOrderQO.getPageNo(), uavOrderQO.getPageSize(), count)); return ResultBody.success(PageResult.buildPage(uavOrderQO.getPageNo(), uavOrderQO.getPageSize(), count));
...@@ -634,6 +635,12 @@ public class UavOrderServiceImpl implements UavOrderService { ...@@ -634,6 +635,12 @@ public class UavOrderServiceImpl implements UavOrderService {
@Override @Override
public ResultBody removeUavOrder(Integer id) { public ResultBody removeUavOrder(Integer id) {
return null; UavOrderDO uavOrderDO = uavOrderDao.detail(id);
if (!uavOrderDO.getStatusCode().toString().equals(UavOrderStatus.FINISH.getCode().toString()) ||
!uavOrderDO.getStatusCode().toString().equals(UavOrderStatus.CLOSE.getCode().toString())) {
return ResultBody.error("不可删除!");
}
uavOrderDao.closeShowUavOrder(id);
return ResultBody.success();
} }
} }
...@@ -146,6 +146,10 @@ ...@@ -146,6 +146,10 @@
update uav_order set proportion = #{proportion} where id = #{id} update uav_order set proportion = #{proportion} where id = #{id}
</update> </update>
<update id="closeShowUavOrder">
update uav_order set show = 0 where id = #{id}
</update>
<select id="detail" resultType="com.mmc.oms.entity.uav.UavOrderDO"> <select id="detail" resultType="com.mmc.oms.entity.uav.UavOrderDO">
select <include refid="uav_order_column" /> from uav_order where id = #{id} select <include refid="uav_order_column" /> from uav_order where id = #{id}
</select> </select>
...@@ -207,6 +211,9 @@ ...@@ -207,6 +211,9 @@
<if test="endTime != null"> <if test="endTime != null">
and #{endTime} >= create_time and #{endTime} >= create_time
</if> </if>
<if test="show != null">
and #{show} = show
</if>
</select> </select>
<select id="list" resultMap="uavOrderResultMap" parameterType="com.mmc.oms.model.qo.uav.UavOrderQO"> <select id="list" resultMap="uavOrderResultMap" parameterType="com.mmc.oms.model.qo.uav.UavOrderQO">
...@@ -235,6 +242,9 @@ ...@@ -235,6 +242,9 @@
<if test="endTime != null"> <if test="endTime != null">
and #{endTime} >= uo.create_time and #{endTime} >= uo.create_time
</if> </if>
<if test="show != null">
and #{show} = show
</if>
order by uo.id desc order by uo.id desc
limit #{pageNo}, #{pageSize} limit #{pageNo}, #{pageSize}
</select> </select>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论