Authored by Lixiaodi

Merge branch 'test6.9.16' of http://git.yoho.cn/ufo/ufo-platform into test6.9.16

Showing 42 changed files with 530 additions and 33 deletions
... ... @@ -2,6 +2,7 @@ package com.yoho.order.dal;
import java.util.List;
import com.yoho.product.model.ProductNameAndImgReq;
import org.apache.ibatis.annotations.Param;
import com.yoho.order.model.SellerOrder;
... ... @@ -10,8 +11,14 @@ import com.yoho.order.model.SellerOrder;
* Created by caoyan on 2018/9/12.
*/
public interface SellerOrderMapper {
List<SellerOrder> selectBySkups(@Param("skupList") List<Integer> skupList);
SellerOrder selectBySkup(@Param("skup") Integer skup);
SellerOrder selectByOrderCode(@Param("orderCode") String orderCode);
int updateOrderGoodsNameAndImg(ProductNameAndImgReq productNameAndImgReq);
int countByOrderGoodsNameAndImg(ProductNameAndImgReq productNameAndImgReq);
}
... ...
... ... @@ -2,6 +2,7 @@ package com.yoho.order.dal;
import com.yoho.order.model.TradeBillsReq;
import com.yoho.order.model.TradeBills;
import com.yoho.order.model.TradeBillsTransferOutTradeNo;
import org.apache.ibatis.annotations.Param;
import java.util.List;
... ... @@ -12,7 +13,10 @@ import java.util.List;
public interface TradeBillsMapper {
int selectCountByCondition(@Param("billsTradeReq") TradeBillsReq req);
List<TradeBills> selectByConditionWithPage(@Param("billsTradeReq") TradeBillsReq req);
List<TradeBillsTransferOutTradeNo> selectTransferOutTradeNoByOrderCodes(@Param("orderCodes") List<Long> orderCodes);
}
... ...
package com.yoho.order.model;
import lombok.Data;
import java.math.BigDecimal;
/**
* 交易流水表
*/
@Data
public class TradeBillsTransferOutTradeNo {
private Integer id;
private String outTradeNo;
private Long orderCode;
}
... ...
package com.yoho.product.model;
import lombok.Data;
import java.util.List;
/**
* @Author: 杨长江
* @Date: 2019-11-15 19:01
* @Description: 同步订单商品名称和图片请求类
*/
@Data
public class ProductNameAndImgReq {
/**
* 名称
*/
private String productName;
/**
* 图片地址
*/
private String imgUrl;
/**
* storages
*/
private List<Integer> storages;
}
... ...
package com.yoho.ufo.dal;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.annotations.Param;
... ... @@ -97,4 +98,5 @@ public interface ProductMapper {
@Param("product") Product product,
@Param("start") int start,
@Param("rows") int rows);
}
\ No newline at end of file
... ...
... ... @@ -358,5 +358,4 @@
limit #{buyerOrderReq.start},#{buyerOrderReq.size}
</if>
</select>
</mapper>
\ No newline at end of file
... ...
... ... @@ -349,6 +349,4 @@
</if>
limit #{start}, #{rows}
</select>
</mapper>
\ No newline at end of file
... ...
... ... @@ -24,18 +24,54 @@
select <include refid="Base_Column_List" />
from seller_order where id = #{id}
</select>
<select id="selectBySkups" resultMap="BaseResultMap">
select <include refid="Base_Column_List" />
from seller_order where id in
from seller_order where skup in
<foreach collection="skupList" item="skup" open="(" close=")" separator=",">
#{skup}
#{skup}
</foreach>
</select>
<select id="selectBySkup" resultMap="BaseResultMap">
select <include refid="Base_Column_List" />
from seller_order where skup = #{skup}
</select>
<select id="selectByOrderCode" resultMap="BaseResultMap">
select <include refid="Base_Column_List" />
from seller_order where order_code = #{orderCode}
</select>
<update id="updateOrderGoodsNameAndImg" parameterType="com.yoho.product.model.ProductNameAndImgReq">
UPDATE
seller_order_goods sog
SET sog.image_url = #{imgUrl},
sog.product_name = #{productName}
WHERE
(sog.image_url != #{imgUrl} OR sog.product_name != #{productName} )
AND sog.attributes NOT IN ( 5, 6 )
AND sog.is_del = 1
AND sog.status in (0,1)
AND sog.storage_id IN
<foreach collection="storages" close=")" open="(" item="item" separator=",">
#{item}
</foreach>
LIMIT 100
</update>
<select id="countByOrderGoodsNameAndImg" parameterType="com.yoho.product.model.ProductNameAndImgReq" resultType="int">
SELECT
count(1)
FROM seller_order_goods sog
WHERE
(sog.image_url != #{imgUrl} OR sog.product_name != #{productName} )
AND sog.attributes NOT IN ( 5, 6 )
AND sog.is_del = 1
AND sog.status in (0,1)
AND sog.storage_id IN
<foreach collection="storages" close=")" open="(" item="item" separator=",">
#{item}
</foreach>
</select>
</mapper>
\ No newline at end of file
... ...
... ... @@ -84,4 +84,25 @@
limit #{billsTradeReq.start},#{billsTradeReq.size}
</select>
<select id="selectTransferOutTradeNoByOrderCodes" resultType="com.yoho.order.model.TradeBillsTransferOutTradeNo">
select tb.id,
CASE t.interface_type
WHEN 2 THEN
concat(t.id, '_', tb.id)
WHEN 3 THEN
'钱包'
END
as outTradeNo,
order_code as orderCode
FROM
trade_bills tb
LEFT JOIN orders_pay_transfer t ON t.buyer_order_code = tb.order_code
where tb.order_code in
<foreach collection="orderCodes" item="orderCode" open="(" close=")" separator=",">
#{orderCode}
</foreach>
AND tb.trade_status != 100
and t.interface_type = 2
</select>
</mapper>
\ No newline at end of file
... ...
... ... @@ -30,6 +30,7 @@ import com.yohobuy.ufo.model.user.resp.AuthorizeResultRespVO;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.elasticsearch.common.collect.Lists;
import org.elasticsearch.common.collect.Maps;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
... ... @@ -241,9 +242,8 @@ public class TradeBillsServiceImpl implements ITradeBillsService {
req.setOrderCode2(Optional.of(req.getOrderCode())
.map(e->buyerOrderGoodsMapper.selectByOrderCodeOne(e.toString()))
.map(e->e.getSkup())
.map(e->sellerOrderMapper.selectBySkups(Lists.newArrayList(e)))
.filter(CollectionUtils::isNotEmpty)
.map(e->e.get(0).getOrderCode())
.map(skup->sellerOrderMapper.selectBySkup(skup))
.map(sellerOrder->sellerOrder.getOrderCode())
.map(Long::valueOf)
.orElse(null));
}
... ... @@ -258,9 +258,10 @@ public class TradeBillsServiceImpl implements ITradeBillsService {
if (CollectionUtils.isEmpty(tradeBillsList)) {
return null;
}
Map<Integer, String> outTradeNoMap = getTransferOutTradeNoMap(tradeBillsList);
PageResponseBO<TradeBillsResp> result = new PageResponseBO<>();
result.setList(convertToResp(tradeBillsList));
result.setList(convertToResp(tradeBillsList,outTradeNoMap));
result.setPage(req.getPage());
result.setSize(req.getSize());
result.setTotal(total);
... ... @@ -268,6 +269,25 @@ public class TradeBillsServiceImpl implements ITradeBillsService {
return result;
}
private Map<Integer, String> getTransferOutTradeNoMap(List<TradeBills> tradeBillsList) {
List<Long> orderCodes = tradeBillsList.stream()
.filter(item-> {
MoneyTypeEnum moneyTypeEnum = MoneyTypeEnum.getMoneyTypeByUserTypeAndTradeType(item.getUserType(), item.getTradeType());
return moneyTypeEnum == MoneyTypeEnum.deposit_rebate
|| moneyTypeEnum == MoneyTypeEnum.buyer_compensatoryPayment
|| moneyTypeEnum == MoneyTypeEnum.seller_goodsPayment
|| moneyTypeEnum == MoneyTypeEnum.seller_compensatoryPayment ;
})
.map(TradeBills::getOrderCode)
.collect(Collectors.toList());
if(CollectionUtils.isEmpty(orderCodes)){
return Maps.newHashMap();
}
return tradeBillsMapper.selectTransferOutTradeNoByOrderCodes(orderCodes)
.stream()
.collect(Collectors.toMap(TradeBillsTransferOutTradeNo::getId,TradeBillsTransferOutTradeNo::getOutTradeNo));
}
public AuthorizeResultRespVO queryAuthorizeInfoByUid(Integer uid){
if(uid==null||uid<=0){
return null;
... ... @@ -328,7 +348,8 @@ public class TradeBillsServiceImpl implements ITradeBillsService {
}
private List<TradeBillsResp> convertToResp(List<TradeBills> tradeBillsList) {
private List<TradeBillsResp> convertToResp(List<TradeBills> tradeBillsList,Map<Integer,String> outTradeNoMap) {
return tradeBillsList.stream()
.map(item -> {
TradeBillsResp resp = new TradeBillsResp();
... ... @@ -340,7 +361,7 @@ public class TradeBillsServiceImpl implements ITradeBillsService {
resp.setPaidOrderCode(Optional.ofNullable(item.getPaidOrderCode())
.filter(e -> e > 0)
.map(Object::toString)
.orElse("-"));
.orElseGet(() -> outTradeNoMap.getOrDefault(item.getId(), outTradeNoMap.getOrDefault(item.getDealRelateId(), "-"))));
resp.setAmount(item.getAmount());
resp.setIncomeOutcome(item.getIncomeOutcome());
resp.setCreateTimeStr(null == item.getCreateTime() ? StringUtils.EMPTY
... ...
... ... @@ -193,4 +193,15 @@ public class ProductController {
Map<Integer, Integer> countInfo = productService.queryBatchProductStorageCount(productIdList);
return new com.yoho.ufo.service.model.ApiResponse.ApiResponseBuilder().code(200).message("查询成功").data(countInfo).build();
}
/**
* 同步订单商品信息(订单商品的名称和图片)
* @param productId 商品编码
* @return ApiResponse
*/
@RequestMapping(value = "/updateOrderGoodsNameAndImg",method = RequestMethod.POST)
public ApiResponse updateOrderGoodsNameAndImg(Integer productId){
return productService.updateOrderGoodsNameAndImg(productId);
}
}
... ...
... ... @@ -49,4 +49,6 @@ public interface IProductService {
List<String> queryProductImageList(Integer skup);
Map<Integer, Integer> queryBatchProductStorageCount(List<Integer> productIdList);
ApiResponse<Integer> updateOrderGoodsNameAndImg(Integer productId);
}
... ...
... ... @@ -8,6 +8,8 @@ import java.util.stream.Collectors;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.yoho.order.dal.SellerOrderMapper;
import com.yoho.product.model.ProductNameAndImgReq;
import com.yoho.ufo.dal.model.*;
import com.yohobuy.ufo.model.order.bo.SellerBo;
import org.apache.commons.collections.CollectionUtils;
... ... @@ -112,7 +114,10 @@ public class ProductServiceImpl implements IProductService, ApplicationContextAw
@Autowired
private BatchService batchService;
@Autowired
private SellerOrderMapper sellerOrderMapper;
private static final Integer NOT_SYN_CALENDER = 0;
@Override
... ... @@ -1461,6 +1466,54 @@ public class ProductServiceImpl implements IProductService, ApplicationContextAw
return CollectionUtil.extractMap(storages, Storage::getProductId, Storage::getStorageNum);
}
@Override
public ApiResponse<Integer> updateOrderGoodsNameAndImg(Integer productId) {
if(productId == null){
return new ApiResponse<>(400,"商品编号不能为空");
}
//根据productId获取货品信息
Product product = productMapper.selectByPrimaryKey(productId);
if(Objects.isNull(product)){
return new ApiResponse<>(400,"货品不存在");
}
//根据货品id获取商品
List<Integer> productIds = new ArrayList<>(2);
productIds.add(product.getId());
List<Goods> goodsList = goodsMapper.selectByProductId(productIds);
if(goodsList.isEmpty()){
return new ApiResponse<>(400,"商品不存在");
}
Goods goods = goodsList.get(0);
//根据goodsId获取仓库列表
List<Storage> storageList = storageMapper.selectByGoodsId(goods.getId());
if(storageList.isEmpty()){
return new ApiResponse<>(400,"仓库不存在");
}
//仓库id集合
List<Integer> storageIds = storageList.stream().map(Storage::getId).collect(Collectors.toList());
//封装请求实体
ProductNameAndImgReq productNameAndImgReq = new ProductNameAndImgReq();
productNameAndImgReq.setProductName(product.getProductName());
productNameAndImgReq.setImgUrl(goods.getColorImage());
productNameAndImgReq.setStorages(storageIds);
int count = sellerOrderMapper.countByOrderGoodsNameAndImg(productNameAndImgReq);
int n = 0;
//批次更新,每次更新100行,防止一次更新的数据量太大,占用锁时间太长
while(count > 0){
n += sellerOrderMapper.updateOrderGoodsNameAndImg(productNameAndImgReq);
count = count - 100;
}
LOGGER.info("synchronize seller_order_goods image_url and product_name Affected rows----------->{}",n);
return new ApiResponse<>(200,"同步成功",n);
}
private String getMaxLen(String str, int len) {
if (str == null) {
return "";
... ...
<!DOCTYPE html>
<div id="tt" class="easyui-layout" fit="true" style="overflow-y: scroll">
<form name="updateUserCoupon" id="updateUserCoupon" method="post">
<input type="hidden" name="couponId" id="couponId" />
<input type="hidden" name="uid" id="editUid" />
<input type="hidden" name="couponCode" id="editCouponCode" />
<input type="hidden" name="endTime" id="endTime">
<div style="margin-top: 20px;margin-left: 30px">
<table border="0" style="width:95%;margin-top:5px;line-height:30px;" id="tab">
<tr style="height: 60px">
<td width="20%">Token</td>
<td width="60%">
<input id="couponToken" disabled="disabled" class="easyui-textbox" style="width: 380px;"/></td>
</tr>
<tr style="height: 60px">
<td width="20%">名称</td>
<td width="60%">
<input id="couponName" disabled="disabled" class="easyui-textbox" style="width: 380px;"/></td>
</tr>
<tr style="height: 60px">
<td><span class="requriedInput">*</span>使用期限</td>
<td width="60%">
<input disabled="disabled" id="startTimeStr" type="text" />
-
<input id="endTimeStr" type="text" >
</td>
</tr>
<tr style="height: 60px">
<td width="20%">优惠券说明</td>
<td width="60%">
<input id="remark" disabled="disabled" class="easyui-textbox" style="width: 380px;"/></td>
</tr>
</table>
</div>
</form>
</div>
<script src = "/ufoPlatform/js/jquery/easyui/myPlugins/easyui.hp.myDatebox.js" />
<script>
$(function () {
$('#startTimeStr').datetimebox({});
$('#endTimeStr').datetimebox({});
if (couponId != null) {
$.post(contextPath + "/coupon/queryUserCoupons", {
couponId: couponId
}, function (data) {
var obj = data.data.userCoupons[0];
$("#updateUserCoupon #startTimeStr").datetimebox('setValue',obj.startTimeStr);
$("#updateUserCoupon #endTimeStr").datetimebox('setValue',obj.endTimeStr);
$("#updateUserCoupon #remark").textbox('setValue',obj.remark);
$("#updateUserCoupon #couponName").textbox('setValue',obj.couponName);
$("#updateUserCoupon #couponToken").textbox('setValue',obj.couponToken);
$("#updateUserCoupon #editCouponCode").val(obj.couponCode);
$("#updateUserCoupon #couponId").val(obj.couponId);
$("#updateUserCoupon #editUid").val(obj.uid);
$("#updateUserCoupon #endTime").val(obj.endTime);
});
}
});
</script>
\ No newline at end of file
... ...
... ... @@ -37,6 +37,7 @@
</div>
<script type="text/javascript">
var couponId;
$(function () {
$("#uid").textbox({
prompt: "UID"
... ... @@ -93,6 +94,16 @@
formatter: function (value, rowData) {
return value == 1 ? '已使用' : '未使用';
}
}, {
title: "操作",
field: "operations",
width: 80,
align: "center",
formatter: function (value, rowData) {
var str = "<a role='edit' dataId='" + rowData.couponId + "' style='margin-left:10px;background-color: #5bc0de'>延期</a>";
str += "<a role='del' dataCode='" + rowData.couponCode + "' dataUid='" + rowData.uid + "' style='margin-left:10px;background-color: red'>作废</a>";
return str;
}
}]],
cache: false,
pagination: true,
... ... @@ -101,10 +112,126 @@
idField: "id",
singleSelect: false,
checkOnSelect: false,
onLoadSuccess: function () {}
onLoadSuccess: function () {
// 编辑
$(this).myDatagrid("getPanel").find("a[role='edit']").linkbutton({
iconCls: "icon-edit",
onClick: function () {
var id = $(this).attr("dataId");
editRow(id);
}
});
// 作废
$(this).myDatagrid("getPanel").find("a[role='del']").linkbutton({
iconCls: "icon-more",
onClick: function () {
var couponCode = $(this).attr("dataCode");
var uid = $(this).attr("dataUid");
invalidCoupon(couponCode,uid);
}
});
}
});
//延迟发券modal
function editRow(id) {
couponId = id;
var div = $("<div>").appendTo($(document.body));
var title = "编辑优惠券";
var message = "确认修改吗?";
$(div).myDialog({
width: "680px",
height: "450px",
title: title,
href: contextPath + "/html/coupon/editUserCoupon.html?time_version=" + new Date().getTime(),
queryParams: {
id: id
},
modal: true,
collapsible: true,
cache: false,
buttons: [{
id: "saveBtn",
text: "保存",
handler: function () {
$.messager.confirm("确认", message, function (flag) {
if (flag) {
var endTimeStr = $('#updateUserCoupon #endTimeStr').datetimebox('getValue');
if (endTimeStr == '' || endTimeStr == null || endTimeStr == undefined) {
$.messager.alert("提示", '优惠券截止时间不能为空!', "error");
return false;
}
$('#updateUserCoupon #endTime').val(new Date(endTimeStr).getTime()/1000);
var url = contextPath + "/coupon/updateUserCoupon";
$("#updateUserCoupon").form("submit", {
url: url,
onSubmit: function () {
if (!$("#updateUserCoupon").form("validate")) {
return false;
}
$.messager.progress({
title: "正在执行",
msg: "正在执行,请稍后..."
});
return true;
},
success: function (data) {
$.messager.progress("close");
data = JSON.parse(data);
if (data.code == 200) {
$(div).dialog("close");
$.messager.show({
title: "提示",
msg: title + "成功!",
height: 120
});
} else {
$.messager.alert("失败", data.message, "error");
}
}
});
}
});
}
}, {
text: "关闭",
iconCls: "icon-cancel",
handler: function () {
$(div).dialog("close");
}
}]
});
}
function invalidCoupon(couponCode,uid) {
var message = "确定要作废吗?";
var msg = "操作成功";
$.messager.confirm("确认", message, function (flag) {
if (flag) {
$.messager.progress({
title: "正在执行",
msg: "正在执行,请稍后...",
interval: 500,
text: ""
});
$.post(contextPath + "/coupon/invalidateUserCoupon", {
"uid": uid,
"couponCode": couponCode
}, function (data) {
$.messager.progress("close");
if (data.code == 200) {
$.messager.show({
title: "提示",
msg: msg,
height: 120
});
} else {
$.messager.alert("失败", data.message, "error");
}
}, "json");
}
});
}
// 搜索
$("#searchLinkButton").linkbutton({
onClick: function () {
... ...
... ... @@ -5,7 +5,7 @@
<title>ufo后台管理</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0">
<link href="css/vendors.f3f566c7ebfba974ad02.css" rel="stylesheet"><link href="css/coupon.f3f566c7ebfba974ad02.css" rel="stylesheet"></head>
<link href="css/vendors.3bcd4f3014ecc5533548.css" rel="stylesheet"><link href="css/coupon.3bcd4f3014ecc5533548.css" rel="stylesheet"></head>
<body>
<div id="app"></div>
... ... @@ -22,6 +22,6 @@
<script type="text/javascript" src="js/vendors.f3f566c7ebfba974ad02.js"></script><script type="text/javascript" src="js/coupon.f3f566c7ebfba974ad02.js"></script></body>
<script type="text/javascript" src="js/vendors.3bcd4f3014ecc5533548.js"></script><script type="text/javascript" src="js/coupon.3bcd4f3014ecc5533548.js"></script></body>
</html>
... ...
... ... @@ -5,7 +5,7 @@
<title>ufo后台管理</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0">
<link href="css/vendors.f3f566c7ebfba974ad02.css" rel="stylesheet"><link href="css/price-compare.f3f566c7ebfba974ad02.css" rel="stylesheet"></head>
<link href="css/vendors.3bcd4f3014ecc5533548.css" rel="stylesheet"><link href="css/price-compare.3bcd4f3014ecc5533548.css" rel="stylesheet"></head>
<body>
<div id="app"></div>
... ... @@ -19,6 +19,6 @@
<script type="text/javascript" src="js/vendors.f3f566c7ebfba974ad02.js"></script><script type="text/javascript" src="js/price-compare.f3f566c7ebfba974ad02.js"></script></body>
<script type="text/javascript" src="js/vendors.3bcd4f3014ecc5533548.js"></script><script type="text/javascript" src="js/price-compare.3bcd4f3014ecc5533548.js"></script></body>
</html>
... ...
... ... @@ -5,7 +5,7 @@
<title>ufo后台管理</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0">
<link href="css/vendors.f3f566c7ebfba974ad02.css" rel="stylesheet"><link href="css/resource-edit-new.f3f566c7ebfba974ad02.css" rel="stylesheet"></head>
<link href="css/vendors.3bcd4f3014ecc5533548.css" rel="stylesheet"><link href="css/resource-edit-new.3bcd4f3014ecc5533548.css" rel="stylesheet"></head>
<body>
<div id="app"></div>
... ... @@ -19,6 +19,6 @@
<script type="text/javascript" src="js/vendors.f3f566c7ebfba974ad02.js"></script><script type="text/javascript" src="js/resource-edit-new.f3f566c7ebfba974ad02.js"></script></body>
<script type="text/javascript" src="js/vendors.3bcd4f3014ecc5533548.js"></script><script type="text/javascript" src="js/resource-edit-new.3bcd4f3014ecc5533548.js"></script></body>
</html>
... ...
... ... @@ -5,7 +5,7 @@
<title>ufo后台管理</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0">
<link href="css/vendors.f3f566c7ebfba974ad02.css" rel="stylesheet"><link href="css/resource-edit.f3f566c7ebfba974ad02.css" rel="stylesheet"></head>
<link href="css/vendors.3bcd4f3014ecc5533548.css" rel="stylesheet"><link href="css/resource-edit.3bcd4f3014ecc5533548.css" rel="stylesheet"></head>
<body>
<div id="app"></div>
... ... @@ -19,6 +19,6 @@
<script type="text/javascript" src="js/vendors.f3f566c7ebfba974ad02.js"></script><script type="text/javascript" src="js/resource-edit.f3f566c7ebfba974ad02.js"></script></body>
<script type="text/javascript" src="js/vendors.3bcd4f3014ecc5533548.js"></script><script type="text/javascript" src="js/resource-edit.3bcd4f3014ecc5533548.js"></script></body>
</html>
... ...
... ... @@ -5,7 +5,7 @@
<title>ufo后台管理</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0">
<link href="css/vendors.f3f566c7ebfba974ad02.css" rel="stylesheet"><link href="css/resource-list.f3f566c7ebfba974ad02.css" rel="stylesheet"></head>
<link href="css/vendors.3bcd4f3014ecc5533548.css" rel="stylesheet"><link href="css/resource-list.3bcd4f3014ecc5533548.css" rel="stylesheet"></head>
<body>
<div id="app"></div>
... ... @@ -19,6 +19,6 @@
<script type="text/javascript" src="js/vendors.f3f566c7ebfba974ad02.js"></script><script type="text/javascript" src="js/resource-list.f3f566c7ebfba974ad02.js"></script></body>
<script type="text/javascript" src="js/vendors.3bcd4f3014ecc5533548.js"></script><script type="text/javascript" src="js/resource-list.3bcd4f3014ecc5533548.js"></script></body>
</html>
... ...
... ... @@ -5,7 +5,7 @@
<title>ufo后台管理</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0">
<link href="css/vendors.f3f566c7ebfba974ad02.css" rel="stylesheet"><link href="css/send-coupon.f3f566c7ebfba974ad02.css" rel="stylesheet"></head>
<link href="css/vendors.3bcd4f3014ecc5533548.css" rel="stylesheet"><link href="css/send-coupon.3bcd4f3014ecc5533548.css" rel="stylesheet"></head>
<body>
<div id="app"></div>
... ... @@ -19,6 +19,6 @@
<script type="text/javascript" src="js/vendors.f3f566c7ebfba974ad02.js"></script><script type="text/javascript" src="js/send-coupon.f3f566c7ebfba974ad02.js"></script></body>
<script type="text/javascript" src="js/vendors.3bcd4f3014ecc5533548.js"></script><script type="text/javascript" src="js/send-coupon.3bcd4f3014ecc5533548.js"></script></body>
</html>
... ...
... ... @@ -5,7 +5,7 @@
<title>ufo后台管理</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0">
<link href="css/vendors.f3f566c7ebfba974ad02.css" rel="stylesheet"><link href="css/send-record.f3f566c7ebfba974ad02.css" rel="stylesheet"></head>
<link href="css/vendors.3bcd4f3014ecc5533548.css" rel="stylesheet"><link href="css/send-record.3bcd4f3014ecc5533548.css" rel="stylesheet"></head>
<body>
<div id="app"></div>
... ... @@ -22,6 +22,6 @@
<script type="text/javascript" src="https://cdn.yoho.cn/20190712/xlsx.full.min.js"> </script>
<script type="text/javascript" src="js/vendors.f3f566c7ebfba974ad02.js"></script><script type="text/javascript" src="js/send-record.f3f566c7ebfba974ad02.js"></script></body>
<script type="text/javascript" src="js/vendors.3bcd4f3014ecc5533548.js"></script><script type="text/javascript" src="js/send-record.3bcd4f3014ecc5533548.js"></script></body>
</html>
... ...
... ... @@ -5,7 +5,7 @@
<title>ufo后台管理</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0">
<link href="css/vendors.f3f566c7ebfba974ad02.css" rel="stylesheet"><link href="css/shop.f3f566c7ebfba974ad02.css" rel="stylesheet"></head>
<link href="css/vendors.3bcd4f3014ecc5533548.css" rel="stylesheet"><link href="css/shop.3bcd4f3014ecc5533548.css" rel="stylesheet"></head>
<body>
<div id="app"></div>
... ... @@ -19,6 +19,6 @@
<script type="text/javascript" src="js/vendors.f3f566c7ebfba974ad02.js"></script><script type="text/javascript" src="js/shop.f3f566c7ebfba974ad02.js"></script></body>
<script type="text/javascript" src="js/vendors.3bcd4f3014ecc5533548.js"></script><script type="text/javascript" src="js/shop.3bcd4f3014ecc5533548.js"></script></body>
</html>
... ...
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8"/>
<title>Yoho!Buy运营平台</title>
<script src="/ufoPlatform/js/include.js"></script>
</head>
<body class="easyui-layout" fit="true">
<div region="north" style="height: 230px">
<script>
document.write(addHead('辅助工具', ''));
</script>
<style>
.div_search input {
margin-top: 20px;
}
.div_search .textbox {
margin-top: 20px;
}
.div_search .easyui-linkbutton {
margin-top: 20px;
}
</style>
<div style="margin-left: 30px;" class="div_search">
<input id="productId" type="text"/>
<a id="syncButton" class="easyui-linkbutton btn-info" data-options="iconCls:'icon-search'">同步订单商品信息</a>
</div>
</div>
<script type="text/javascript">
$(function () {
$("#productId").textbox({
prompt: "货品编号"
});
// 同步
$("#syncButton").linkbutton({
onClick: function () {
var param = getParams();
updateOrderGoodsNameAndImg(param);
}
});
//同步订单商品的图片地址和商品名称
function updateOrderGoodsNameAndImg(param) {
$.ajax({
type: 'POST',
url: contextPath + '/product/updateOrderGoodsNameAndImg',
data: param,
success: function (result) {
if(result.code == 200){
window.self.$.messager.show({
title : "提示",
msg : "更新完成,共更新" + result.data + "条数据"
});
$("#productId").textbox('setValue', '');
}else {
window.self.$.messager.alert("失败", result.message, "error");
}
}
});
}
/**
* 提取参数
*/
function getParams() {
var productId = $('#productId').textbox('getValue');
var param = {};
if (undefined !== productId && null !== productId && "" !== productId) {
param.productId = productId;
}
return param;
}
});
</script>
</body>
</html>
\ No newline at end of file
... ...