Authored by mali

Merge branch 'test6.9.0' into test6.9.1

Conflicts:
	pom.xml
... ... @@ -20,4 +20,6 @@ public interface QiniuLiveRecordMapper {
void updateDiscardVideo(@Param("orderCode")Long orderCode, @Param("showFlag")Integer showFlag);
int insertInitRecord(QiniuLiveRecord record);
int updateVideoUrl(@Param("id")Integer id, @Param("vedioUrl")String vedioUrl, @Param("updateTime")Integer updateTime);
}
\ No newline at end of file
... ...
... ... @@ -18,5 +18,7 @@ public interface StoredSellerMapper {
List<Integer> selectUidByCertName(@Param("certName") String certName);
StoredSeller selectUid(@Param("uid") Integer uid);
List<Integer> selectUidByCertNameAndUid(@Param("merchantName") String merchantName, @Param("uid") String uid);
}
... ...
... ... @@ -103,7 +103,15 @@ public class BuyerOrderReq extends PageRequestBO{
private Integer date;//查询包裹日期
private String buyerStartTime; //买家下单开始时间
private String buyerEndTime; //买家下单结束时间
private Integer endTime; // 鉴定视频的结束时间
private Integer cameraCode; // 鉴定视频的摄像头编号
private Integer clientType; //订单来源 1-PC,3-iphone, 4-android, 5-ipad, 6-h5, 7-miniapp
private Integer attributes; //订单类型 1-普通现货订单,2-线下店订单,3-急速发货订单,4-普通预售
}
... ...
... ... @@ -41,6 +41,16 @@ public class QiniuLiveRecord {
private Integer cameraCode;
private String vedioUrl; // 新方式生成的视频文件链接
public String getVedioUrl() {
return vedioUrl;
}
public void setVedioUrl(String vedioUrl) {
this.vedioUrl = vedioUrl;
}
public Integer getCameraCode() {
return cameraCode;
}
... ...
... ... @@ -92,9 +92,18 @@
<if test="buyerOrderReq.sellerUid != null and buyerOrderReq.sellerUid != 0 ">
and a.seller_uid = #{buyerOrderReq.sellerUid}
</if>
<if test="buyerOrderReq.clientType != null and buyerOrderReq.clientType != '' ">
and a.client_type = #{buyerOrderReq.clientType}
</if>
<if test="buyerOrderReq.status != null ">
and a.status = #{buyerOrderReq.status}
</if>
<if test="buyerOrderReq.buyerStartTime != null ">
and a.create_time &gt; #{buyerOrderReq.buyerStartTime}
</if>
<if test="buyerOrderReq.buyerEndTime != null ">
and a.create_time &lt; #{buyerOrderReq.buyerEndTime}
</if>
<if test="buyerOrderReq.attributesList != null and buyerOrderReq.attributesList.size() >0">
and a.attributes in
<foreach collection="buyerOrderReq.attributesList" item="attributes" open="(" close=")" separator=",">
... ... @@ -171,7 +180,7 @@
LEFT JOIN buyer_order_goods b
ON( b.order_code=a.order_code)
LEFT JOIN seller_order_goods c
ON( c.id=b.skup)
ON( c.id=b.skup)
</if>
<if test="buyerOrderReq.sellerWaybillCode != null and buyerOrderReq.sellerWaybillCode != ''">
LEFT JOIN express_record d
... ...
... ... @@ -20,10 +20,11 @@
<result column="product_id" property="productId" jdbcType="INTEGER" />
<result column="show_flag" property="showFlag" jdbcType="INTEGER" />
<result column="camera_code" property="cameraCode" javaType="INTEGER" />
<result column="video_url" property="vedioUrl" jdbcType="VARCHAR" />
</resultMap>
<sql id="Base_Column_List" >
id, order_code, skup, seller_order_code, depot_no, start_time, end_time, persist_id,
vedio_file_url, create_time, update_time, pid, status, storage_id, goods_id, product_id, show_flag, camera_code
vedio_file_url, create_time, update_time, pid, status, storage_id, goods_id, product_id, show_flag, camera_code, video_url
</sql>
<select id="selectByOrderCodes" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
select
... ... @@ -94,4 +95,10 @@
set show_flag = #{showFlag,jdbcType=INTEGER}
where order_code = #{orderCode, jdbcType=INTEGER}
</update>
<update id="updateVideoUrl">
update qiniu_live_record
set video_url = #{vedioUrl,jdbcType=VARCHAR}, update_time =#{updateTime, jdbcType=INTEGER}
where id = #{id, jdbcType=INTEGER}
</update>
</mapper>
\ No newline at end of file
... ...
... ... @@ -63,6 +63,10 @@
<select id="selectUidByCertName" resultType="java.lang.Integer">
select uid from stored_seller where cert_name=#{certName}
</select>
<select id="selectUid" resultMap="BaseResultMap" parameterType="com.yoho.order.model.StoredSellerReqVo">
select <include refid="Base_Column_List" />
from stored_seller where valid_status = 1 and uid=#{uid}
</select>
<select id="selectUidByCertNameAndUid" resultType="java.lang.Integer">
select uid from stored_seller where 1=1
<if test="merchantName != null and merchantName != ''">
... ...
package com.yoho.ufo.order.constant;
public enum ClientTypeEnum {
IPHONE(3, "iphone"),
ANDROID(4, "android"),
MINIAPP(7, "miniapp");
private Integer code;
private String name;
ClientTypeEnum(Integer code, String name){
this.code = code;
this.name = name;
}
public static String getName(Integer code){
if(null == code){
return null;
}
for(ClientTypeEnum clientType : ClientTypeEnum.values()){
if(clientType.code.equals(code)){
return clientType.name;
}
}
return null;
}
}
... ...
... ... @@ -127,4 +127,18 @@ public class UfoLiveController {
return new ApiResponse.ApiResponseBuilder().code(200).message("作废成功").build();
}
/**
* 薛超使用的另一套视频文件方案
* @param req
* @return
*/
@RequestMapping(value = "/updateVideoUrl")
public ApiResponse updateVideoUrl(QNliveReq req) {
LOGGER.info("updateVideoUrl method in. req is {}", req);
int result = ufoLiveService.updateVideoUrl(req.getId(), req.getVedioFileUrl());
return new ApiResponse.ApiResponseBuilder().code(result > 0 ? 200 : 400).message(result > 0 ? "更新成功" : "更新失败").build();
}
}
... ...
... ... @@ -14,6 +14,8 @@ import java.util.stream.Collectors;
import javax.annotation.Resource;
import com.yoho.order.dal.*;
import com.yoho.order.model.*;
import com.yoho.core.dal.datasource.annotation.Database;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
... ... @@ -38,41 +40,6 @@ import com.yoho.core.redis.cluster.operations.nosync.YHValueOperations;
import com.yoho.core.redis.cluster.operations.serializer.RedisKeyBuilder;
import com.yoho.core.rest.client.ServiceCaller;
import com.yoho.error.exception.ServiceException;
import com.yoho.order.dal.AppraiseAddressMapper;
import com.yoho.order.dal.AreaMapper;
import com.yoho.order.dal.BuyerOrderGoodsMapper;
import com.yoho.order.dal.BuyerOrderMapper;
import com.yoho.order.dal.BuyerOrderMetaMapper;
import com.yoho.order.dal.ExpressCompanyMapper;
import com.yoho.order.dal.ExpressInfoMapper;
import com.yoho.order.dal.ExpressRecordMapper;
import com.yoho.order.dal.OrderOperateRecordMapper;
import com.yoho.order.dal.OrdersPayMapper;
import com.yoho.order.dal.QiniuLiveRecordMapper;
import com.yoho.order.dal.QualityCheckMapper;
import com.yoho.order.dal.SellerOrderGoodsMapper;
import com.yoho.order.dal.SellerOrderMapper;
import com.yoho.order.dal.SellerOrderMetaMapper;
import com.yoho.order.dal.SignForPackageMapper;
import com.yoho.order.model.AppraiseAddress;
import com.yoho.order.model.Area;
import com.yoho.order.model.BuyerOrder;
import com.yoho.order.model.BuyerOrderFeedback;
import com.yoho.order.model.BuyerOrderGoods;
import com.yoho.order.model.BuyerOrderMeta;
import com.yoho.order.model.BuyerOrderReq;
import com.yoho.order.model.ExpressCompany;
import com.yoho.order.model.ExpressInfo;
import com.yoho.order.model.ExpressRecord;
import com.yoho.order.model.OrderOperateRecord;
import com.yoho.order.model.OrdersPay;
import com.yoho.order.model.QiniuLiveRecord;
import com.yoho.order.model.QualityCheck;
import com.yoho.order.model.QualityCheckResp;
import com.yoho.order.model.SellerOrder;
import com.yoho.order.model.SellerOrderGoods;
import com.yoho.order.model.SellerOrderMeta;
import com.yoho.order.model.SignForPackage;
import com.yoho.service.model.order.request.OrderRequest;
import com.yoho.ufo.constants.PlatformConstant;
import com.yoho.ufo.constants.RedisKeyConstants;
... ... @@ -165,6 +132,9 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService {
@Autowired
private QualityCheckMapper qualityCheckMapper;
@Autowired
private StoredSellerMapper storedSellerMapper;
@Autowired
private BuyerOrderFeedbackService buyerOrderFeedbackService;
... ... @@ -411,7 +381,7 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService {
public PageResponseBO<BuyerOrderResp> queryOrderList(BuyerOrderReq req) {
buildParam(req);
int total = buyerOrderMapper.selectTotalByCondition(req);
if(total == 0) {
return null;
... ... @@ -1506,7 +1476,6 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService {
resp.setStatusStr(Constant.convertOrderStatusStr(buyerOrder.getStatus()));
resp.setPayStatus("未支付");//支付状态
resp.setChannel(Objects.equals(buyerOrder.getAttributes(), 2) ? 2 : 1); //1,线上订单; 2,门店订单
resp.setCreateTimeStr(DateUtil.int2DateStr(buyerOrder.getCreateTime(), "yyyy-MM-dd HH:mm:ss"));
resp.setBuyerUid(buyerOrder.getUid());
... ... @@ -1586,7 +1555,17 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService {
resp.setShipFee(String.format("%.2f", buyerOrder.getShipFee().doubleValue()));
resp.setAmount(String.format("%.2f", buyerOrder.getAmount().doubleValue()));
resp.setCouponCutAmount(goods.getCouponCutAmount().compareTo(BigDecimal.valueOf(0))==0 ? "-" : goods.getCouponCutAmount().toString());
resp.setStorageId(sellerGoods.getStorageId());
resp.setProductId(sellerGoods.getProductId());
//查询商品的货号
Product product = productMapper.selectByPrimaryKey(sellerGoods.getProductId());
resp.setProductCode((null != product && StringUtils.isNotEmpty(product.getProductCode()))? product.getProductCode() : "");
//查询卖家身份,超级入驻,普通入驻,普通卖家
StoredSeller storedSeller = storedSellerMapper.selectUid(sellerGoods.getUid());
resp.setStoreSellerEntryType((null != storedSeller && null != storedSeller.getEntryType())? storedSeller.getEntryType() : 0);
resp.setPlatformReceiveGoodsAddress(appraiseAddressMapper.selectAddressByType(sellerGoods.getDepotNo()));
//买家收货时间
... ... @@ -2354,6 +2333,7 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService {
case 4: return "android";
case 5: return "ipad";
case 6: return "h5";
case 7: return "miniapp";
default: return "";
}
}
... ... @@ -2561,6 +2541,10 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService {
}
}
if(null != req.getAttributes() && 0 != req.getAttributes()){
req.setAttributesList(Arrays.asList(req.getAttributes()));
}
if(StringUtils.isNotEmpty(req.getMobile())) {
Integer uid = getUidByMobile(req.getMobile());
if(null != uid) {
... ... @@ -2583,6 +2567,18 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService {
req.setSellerUid(uid);
}
}
if(null != req.getBuyerStartTime() && "NaN".equals(req.getBuyerStartTime())){
req.setBuyerStartTime(null);
}else if(StringUtils.isNotEmpty(req.getBuyerStartTime())){
req.setBuyerStartTime(req.getBuyerStartTime().substring(0, 10));
}
if(null != req.getBuyerEndTime() && "NaN".equals(req.getBuyerEndTime())){
req.setBuyerEndTime(null);
}else if(StringUtils.isNotEmpty(req.getBuyerEndTime())){
req.setBuyerEndTime(req.getBuyerEndTime().substring(0, 10));
}
}
... ...
... ... @@ -261,4 +261,9 @@ public class UfoLiveService {
public void dicardVedio(Long orderCode) {
qiniuLiveRecordMapper.updateDiscardVideo(orderCode, 0);
}
public int updateVideoUrl(Integer id, String vedioUrl) {
return qiniuLiveRecordMapper.updateVideoUrl(id, vedioUrl, DateUtil.getCurrentTimeSeconds());
}
}
... ...
... ... @@ -20,6 +20,7 @@
<list>
<value>platformLogin.do</value>
<value>logout.do</value>
<value>updateVideoUrl</value>
</list>
</property>
</bean>
... ...
... ... @@ -69,7 +69,22 @@
<encoder>
<pattern>%-1relative - %d{HH:mm:ss.SSS} [%thread] %-5level %logger{0}:%line -- %msg%n</pattern>
</encoder>
</appender>
</appender>
<!-- 数据库请求超时 appender -->
<appender name="DATABASE_STAT" class="ch.qos.logback.core.rolling.RollingFileAppender">
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>${catalina.home}/logs/%d{yyyy-MM-dd}/database-stat.log</fileNamePattern>
<!-- 日志最大的保存天数 -->
<maxHistory>${maxHistory}</maxHistory>
</rollingPolicy>
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
<maxFileSize>${maxFileSize}</maxFileSize>
</triggeringPolicy>
<encoder>
<pattern>%-1relative - %d{HH:mm:ss.SSS} [%thread] %-5level %logger{0}:%line -- %msg%n</pattern>
</encoder>
</appender>
<!-- DEBUG级别日志 appender -->
<appender name="DEBUG" class="ch.qos.logback.core.rolling.RollingFileAppender">
... ... @@ -251,6 +266,12 @@
<appender-ref ref="DATABASE_TIMEOUT"/>
</logger>
<!--数据库操作统计-->
<logger name="com.yoho.core.dal.datasource.DatabaseOperationProfile" additivity="true">
<level value="DEBUG"/>
<appender-ref ref="DATABASE_STAT"/>
</logger>
<logger name="com.yoho.core.rest.client.finder.zookeeper.CuratorXDiscoveryClientWrapper" additivity="true">
<level value="INFO"/>
<appender-ref ref="STDOUT"/>
... ...
... ... @@ -80,15 +80,19 @@
<td><label>详细地址:</label><span id="sellerRebackAddressDetail"></span></td>
<td><label>寄回手机号码:</label><span id="sellerRebackMobile"></span></td>
<td><label>邮政编码:</label><span id="sellerZipCode"></span></td>
<td><label>身份信息:</label><span id="storeSellerType"></span></td>
</tr>
</table>
<h2>订单商品</h2>
<table class="sub-info" border="1" bordercolor="#ddd" cellspacing="0" width="100%" cellpadding="8">
<tr>
<th>商品编码</th>
<th>SKU</th>
<th>SKU-P</th>
<th>商品图片</th>
<th>商品名称</th>
<th>货号</th>
<th>颜色</th>
<th>尺码</th>
<th>销售价</th>
... ... @@ -98,9 +102,12 @@
<th>买家实付</th>
</tr>
<tr>
<td><span id="sku"></span></td>
<td><span id="productId"></span></td>
<td><span id="skup"></span></td>
<td><img id="productImage" height='78px;' width='59px;' /></td>
<td><span id="productName"></span></td>
<td><span id="productCode"></span></td>
<td><span id="colorName"></span></td>
<td><span id="sizeName"></span></td>
<td><span id="goodsPrice"></span></td>
... ... @@ -365,10 +372,20 @@ function getOrderInfo(orderCode){
$("#sellerRebackAddressDetail").html(result.data.sellerRebackAddressDetail);
$("#sellerRebackMobile").html(result.data.sellerRebackMobile);
$("#sellerZipCode").html(result.data.sellerZipCode);
var storeSellerIdentity = "普通卖家";
if(1 == result.data.storeSellerEntryType){
storeSellerIdentity = "入驻卖家";
}else if(2 == result.data.storeSellerEntryType){
storeSellerIdentity = "超级卖家";
}
$("#storeSellerType").html(storeSellerIdentity);
//商品信息
$("#skup").html(result.data.skup);
$("#productId").html(result.data.productId);
$("#sku").html(result.data.storageId);
$("#skup").html(result.data.skup);
$("#productImage").attr("src", result.data.productImage);
$("#productName").html(result.data.productName);
$("#productCode").html(result.data.productCode);
$("#colorName").html(result.data.colorName);
$("#sizeName").html(result.data.sizeName);
$("#goodsPrice").html(result.data.goodsPrice);
... ...
... ... @@ -11,11 +11,10 @@
<style type="text/css">
.nav li {float:left; list-style:none;}
.nav li a{float:left;text-decoration:none;padding:0.2em 1.6em;border-right:1px solid white;color:black; font-size:14px;}
</style>
</style>
</head>
<body class="easyui-layout">
<div region="north" style="height:360px;">
<div region="north" style="height:410px;">
<script>
document.write(addHead('订单管理', '订单列表'));
</script>
... ... @@ -41,16 +40,16 @@
<hr style="border:1px solid #ddd;"><br>
<div style="border:1px solid #ddd;border-radius:5px 5px 5px 5px;">
<div style="margin-left: 10px;margin-top: 20px;margin-bottom: 20px">
<label>订单编号:</label>
<label>订单编号:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label>
<input id="orderCode" type="text" class="easyui-textbox" style="width:150px">
<label>买家UID:</label>
<label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;买家UID:</label>
<input id="buyerUid" type="text" class="easyui-textbox" style="width:150px"/>
<label>卖家快递单号:</label>
<input id="sellerWaybillCode" type="text" class="easyui-textbox" style="width:150px"/>
<label>订单状态:</label>
<label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;订单状态:</label>
<select id="status" class="easyui-combobox" style="width:250px;" >
<option value="">全部</option>
<option value="0">待买家付款</option>
... ... @@ -80,16 +79,16 @@
<br><br>
<label>商品编码:</label>
<label>商品编码:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label>
<input id="productId" type="text" class="easyui-textbox" style="width:150px"/>
<label> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SKU:</label>
<label> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SKU:</label>
<input id="sku" type="text" class="easyui-textbox" style="width:150px"/>
<label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SKU-P:</label>
<input id="skup" type="text" class="easyui-textbox" style="width:150px"/>
<label>订单渠道:</label>
<label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;订单渠道:</label>
<select id="channel" class="easyui-combobox" style="width:250px;">
<option value="">全部</option>
<option value="1">线上发货</option>
... ... @@ -98,14 +97,39 @@
<br><br>
<label>买家手机号:</label>
<label>买家手机号:&nbsp;&nbsp;&nbsp;</label>
<input id="buyerMobile" type="text" class="easyui-textbox" style="width:150px"/>
<label>卖家手机号:</label>
<input id="sellerMobile" type="text" class="easyui-textbox" style="width:150px"/>
<a id="searchBtn" class="btn-info">查询</a>
<a id="allBtn" class="btn-success">全部</a>
<label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;卖家uid:</label>
<input id="sellerUid" type="text" class="easyui-textbox" style="width:150px"/>
<label>平台快递单号:</label>
<input id="platformWaybillCode" type="text" class="easyui-textbox" style="width:230px"/>
<br><br>
<label>订单来源:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label>
<select id="clientType" class="easyui-combobox" style="width:150px;" >
<option value="">全部</option>
<option value="3">iphone</option>
<option value="4">android</option>
<option value="5">miniapp</option>
</select>
<label>&nbsp;&nbsp;&nbsp;&nbsp;订单类型:</label>
<select id="attributes" class="easyui-combobox" style="width:150px;" >
<option value="">全部</option>
<option value="1">普通现货订单</option>
<option value="2">线下店订单</option>
<option value="3">急速发货订单</option>
<option value="4">普通预售</option>
</select>
<label>买家下单时间:</label>
<input id="buyerStartTime" type="text">
<input id="buyerEndTime" type="text">
<a id="searchBtn" class="btn-info">查询</a>
<a id="allBtn" class="btn-success">全部</a>
</div>
</div>
</div>
... ... @@ -120,7 +144,11 @@ $(function() {
$(this).siblings('li').removeClass('selected'); // 删除其他兄弟元素的样式
$(this).addClass('selected'); // 添加当前元素的样式
});
//渲染开始时间和结束时间
$('#buyerStartTime').datetimebox({});
$('#buyerEndTime').datetimebox({});
//tab状态对应的数量
getCountByNavStatus();
... ... @@ -137,7 +165,13 @@ $(function() {
skup : $("#skup").val(),
sellerWaybillCode : $("#sellerWaybillCode").val(),
buyerMobile : $("#buyerMobile").val(),
sellerMobile : $("#sellerMobile").val()
sellerMobile : $("#sellerMobile").val(),
sellerUid: $("#sellerUid").val(),
platformWaybillCode : $("#platformWaybillCode").val(),
clientType : $("#clientType").myCombobox("getValue"),
attributes : $("#attributes").myCombobox("getValue"),
buyerStartTime : new Date($('#buyerStartTime').datetimebox('getValue')).getTime(),
buyerEndTime : new Date($('#buyerEndTime').datetimebox('getValue')).getTime()
});
}
});
... ... @@ -314,6 +348,12 @@ function switchOrderStatus(navStatus){
$("#sku").textbox('setValue','');
$("#mobile").textbox('setValue','');
$("#skup").textbox('setValue','');
$("#sellerUid").textbox('setValue','');
$("#platformWaybillCode").textbox('setValue','');
$("#clientType").combobox('setValue','');
$("#attributes").combobox('setValue','');
$("#buyerStartTime").datetimebox('setValue','');
$("#buyerEndTime").datetimebox('setValue','');
$("#orderListTable").datagrid("load", {
navStatus : navStatus
});
... ...