Authored by wujiexiang

Merge branch 'test6.9.5' of http://git.yoho.cn/ufo/yohoufo-fore into test6.9.5

... ... @@ -19,4 +19,6 @@ public interface ProductMapper {
List<Product> selectByIds(List<Integer> ids);
List<Product> selectByProductCode(@Param("productCode") String productCode);
String selectIntroByProductId(Integer id);
}
\ No newline at end of file
... ...
... ... @@ -90,4 +90,9 @@
from product
where product_code = #{productCode,jdbcType=VARCHAR}
</select>
<select id="selectIntroByProductId" parameterType="java.lang.Integer" resultType="java.lang.String">
select product_intro
from product_intro
where product_id = #{productId} limit 1
</select>
</mapper>
\ No newline at end of file
... ...
... ... @@ -366,11 +366,13 @@ public class AppraiseService {
buyerOrderMapper.updatePlatformDeliveryStatusByOrderCode(orderCode, buyerOrder.getUid(),
EnumPlatformDeliveryStatus.delivery_to_seller.getCode(), DateUtil.getCurrentTimeSecond());
});
//发送消息
inBoxFacade.sendCancelledProductToSellerByCenter(sellerUid, wayBillCode);
//清缓存
cleanCacheAfterUpdateStatus(buyerOrder.getOrderCode(), buyerOrder.getUid(), buyerOrder.getSellerUid());
SellerOrderGoods sellerOrderGoods = cleanCacheAfterUpdateStatus(buyerOrder.getOrderCode(), buyerOrder.getUid(), buyerOrder.getSellerUid());
//发送消息
inBoxFacade.sendCancelledProductToSellerByCenter(sellerUid,orderCode, sellerOrderGoods,wayBillCode);
return apiResponse;
}
... ...
... ... @@ -81,6 +81,10 @@ public class InBoxFacade {
InBoxResponse resp = inBoxSDK.addInbox(req);
logger.info("record buyerOrderNotPayed inbox msg, buyerUid {}, orderCode {}, resp {}",
buyerUid, orderCode, resp);
//push
SendMessageRspBo bo = ufoSendService.buyerNotPay(String.valueOf(buyerUid),String.valueOf(orderCode));
logger.info("record buyerOrderNotPayed push buyer uid is {}, orderCode is {}, result is {}", buyerUid, orderCode, JSON.toJSONString(bo));
});
} catch (Exception e) {
logger.warn("InBoxFacade buyerOrderNotPayed error inbox msg, buyerUid {}, orderCode {} ",
... ... @@ -132,6 +136,10 @@ public class InBoxFacade {
Product product = productMapper.selectByPrimaryKey(psog.getProductId());
String productCode = product.getProductCode();
//发push
SendMessageRspBo bo = ufoSendService.sellerDeliverNotice(String.valueOf(buyerUid),String.valueOf(orderCode));
logger.info("record sellerDeliver2Depot push buyer uid is {}, orderCode is {}, result is {}", buyerUid, orderCode, JSON.toJSONString(bo));
//sms
String phone = userProxyService.getMobile(buyerUid);
if (StringUtils.isBlank(phone)){
... ... @@ -176,6 +184,11 @@ public class InBoxFacade {
logger.info("record noticeBuyerWhenDeliveryGoodsToBuyer inbox msg, buyerUid {}, orderCode {}, prdName {},SellerOrderGoods {} resp {}",
buyerUid, orderCode, prdName, JSON.toJSONString(psog), resp);
//发push
SendMessageRspBo bo = ufoSendService.platformDeliverBuyer(String.valueOf(buyerUid),String.valueOf(orderCode));
logger.info("record noticeBuyerWhenDeliveryGoodsToBuyer push buyer uid is {}, orderCode is {}, result is {}", buyerUid, orderCode, JSON.toJSONString(bo));
//seller notice
... ... @@ -519,6 +532,13 @@ public class InBoxFacade {
logger.info("record buyerQualityCheckNotPass inbox msg, buyerUid {} ,orderCode {},prdName {} ,resp {}",
buyerUid, orderCode, prdName ,resp);
//瑕疵确认超时,发push
if(outTimeFlag){
//发push
SendMessageRspBo bo = ufoSendService.buyerConfirmFlawExceed(String.valueOf(buyerUid),String.valueOf(orderCode));
logger.info("record buyerQualityCheckNotPass push buyer uid is {}, orderCode is {},outTimeFlag {}, result is {}", buyerUid, orderCode,outTimeFlag, JSON.toJSONString(bo));
}
//短信
String phone = userProxyService.getMobile(buyerUid);
if (StringUtils.isBlank(phone)){
... ... @@ -1162,11 +1182,11 @@ public class InBoxFacade {
/**
* 鉴定中心把 买家取消(卖家已发货给中心)的物品,顺丰到付寄给卖家
*/
public void sendCancelledProductToSellerByCenter(int sellerUid,String wayBillCode){
public void sendCancelledProductToSellerByCenter(int sellerUid,Long orderCode,SellerOrderGoods sog,String wayBillCode){
try {
executorService.execute(() -> {
logger.info("record sendCancelledProductToSeller inbox sms msg,sellerUid {}, wayBillCode {}",
sellerUid, wayBillCode);
logger.info("record sendCancelledProductToSeller inbox sms msg,sellerUid {},orderCode {},sellerOrderGoods {}, wayBillCode {}",
sellerUid, orderCode,sog,wayBillCode);
String phone = userProxyService.getMobile(sellerUid);
logger.info("sendCancelledProductToSeller wayBillCode sms send get phone {},sellerUid {}, wayBillCode {}",
... ... @@ -1176,8 +1196,12 @@ public class InBoxFacade {
sellerUid,wayBillCode);
return;
}
String prdName = sog.getProductName();
String sizeName = sog.getSizeName();
Product product = productMapper.selectByPrimaryKey(sog.getProductId());
String productCode = product.getProductCode();
List<String> mobileList = Arrays.asList(phone);
String content = getReplacedContent(InboxBusinessTypeEnum.SMS_CANCELED_BY_BUYER_AFTER_RECEIVED.getContent(),wayBillCode);
String content = getReplacedContent(InboxBusinessTypeEnum.SMS_CANCELED_BY_BUYER_AFTER_RECEIVED.getContent(),prdName,sizeName,productCode,orderCode,wayBillCode);
sendSmsService.smsSendByMobile(content, mobileList);
logger.info("record sendCancelledProductToSeller inbox sms msg end,sellerUid {}, wayBillCode {}, phone {},",
... ... @@ -1274,6 +1298,11 @@ public class InBoxFacade {
executorService.execute(() -> {
InBoxResponse inBoxResponse = inBoxSDK.addInbox(inboxMessage);
logger.info("noticeBuyerOfSellerShamSendOut inbox send success, message is {} res is {}", inboxMessage, inBoxResponse);
//发push
SendMessageRspBo bo = ufoSendService.sellerFalseDeliver(String.valueOf(uid),String.valueOf(orderCode));
logger.info("record noticeBuyerOfSellerShamSendOut push buyer uid is {}, orderCode is {}, result is {}", uid, orderCode, JSON.toJSONString(bo));
String phone = userProxyService.getMobile(uid);
if (StringUtils.isBlank(phone)) {
logger.warn("noticeBuyerOfSellerShamSendOut sms send fail,uid {} can not find phone", uid);
... ... @@ -1300,6 +1329,11 @@ public class InBoxFacade {
executorService.execute(() -> {
InBoxResponse inBoxResponse = inBoxSDK.addInbox(inboxMessage);
logger.info("noticeBuyerOfSellerSendOutTimeout inbox send success, message is {} res is {}", inboxMessage, inBoxResponse);
//发push
SendMessageRspBo bo = ufoSendService.sellerDeliverHours(String.valueOf(uid),String.valueOf(orderCode));
logger.info("record noticeBuyerOfSellerSendOutTimeout push buyer uid is {}, orderCode is {}, result is {}", uid, orderCode, JSON.toJSONString(bo));
String phone = userProxyService.getMobile(uid);
if (StringUtils.isBlank(phone)) {
logger.warn("noticeBuyerOfSellerSendOutTimeout sms send fail,uid {} can not find phone", uid);
... ...
... ... @@ -4,6 +4,9 @@ import com.alibaba.fastjson.JSONObject;
import com.yoho.core.config.ConfigReader;
import com.yoho.error.exception.ServiceException;
import com.yoho.tools.docs.ApiOperation;
import com.yoho.tools.docs.ApiParam;
import com.yoho.tools.docs.ApiResp;
import com.yoho.tools.docs.ApiRespCode;
import com.yohobuy.ufo.model.ProductInfo;
import com.yohobuy.ufo.model.request.StoragePriceBo;
import com.yohobuy.ufo.model.request.product.ProductImportTranItemBo;
... ... @@ -30,6 +33,7 @@ import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;
import java.util.Collection;
import java.util.List;
... ... @@ -84,6 +88,18 @@ public class ProductController {
return new ApiResponse.ApiResponseBuilder().data(resp).code(200).message("product data").build();
}
@ApiOperation(name = "ufo.product.intro", desc = "商品详情页下半部分")
@ApiParam(name="product_id",required = true,desc="商品id",type=Integer.class)
@ApiResp(dataClazz=ModelAndView.class, desc="商品详情")
@ApiRespCode(code=200,desc="调用成功")
@IgnoreSignature
@IgnoreSession
@RequestMapping(params = "method=ufo.product.intro")
public ModelAndView queryProductIntro(@RequestParam(value = "product_id", required = true) Integer productId) {
LOG.info("queryProductIntro method=ufo.product.intro product id is:{}", productId);
return productService.queryProductIntro(productId);
}
@ApiOperation(name = "ufo.product.series.template", desc = "商品系列列表")
@IgnoreSignature
@IgnoreSession
... ...
... ... @@ -12,6 +12,7 @@ import com.yohoufo.dal.product.model.StoragePrice;
import com.yohoufo.product.model.SkupInfo;
import com.yohoufo.product.response.*;
import com.yohobuy.ufo.model.response.StorageDataResp;
import org.springframework.web.servlet.ModelAndView;
public interface ProductService {
... ... @@ -104,4 +105,6 @@ public interface ProductService {
SecondHandProductResp querySecondHandProductData(Integer skup);
ProductDetailResp queryProductInStockNewBriefById(Integer productId);
ModelAndView queryProductIntro(Integer productId);
}
... ...
... ... @@ -30,6 +30,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.ui.ModelMap;
import org.springframework.util.CollectionUtils;
import com.alibaba.fastjson.JSONObject;
... ... @@ -42,6 +43,7 @@ import com.yohoufo.common.utils.UfoStringUtils;
import com.yohobuy.ufo.model.response.StorageDataResp;
import com.yohoufo.product.service.ProductSearchService;
import com.yohoufo.product.service.ProductService;
import org.springframework.web.servlet.ModelAndView;
@Service
... ... @@ -161,6 +163,28 @@ public class ProductServiceImpl implements ProductService {
}
@Override
public ModelAndView queryProductIntro(Integer productId){
if (null == productId) {
ModelMap model = new ModelMap();
model.addAttribute("code", "404");
model.addAttribute("info", "no data");
return new ModelAndView("error", model);
}
Product product = productMapper.selectByPrimaryKey(productId);
if (null == product) {
ModelMap model = new ModelMap();
model.addAttribute("code", "404");
model.addAttribute("info", "no data");
return new ModelAndView("error", model);
}
String intro = productMapper.selectIntroByProductId(productId);
ModelMap model = new ModelMap();
model.addAttribute("title", product.getProductName());
model.addAttribute("productIntro",intro);
return new ModelAndView("product-desc-app", model);
}
@Override
public StorageLeastPriceResp queryStorageLeastPrice(Integer storageId) {
StoragePrice storagePrice = storagePriceMapper.selectLeastPrice(storageId);
if (storagePrice == null) {
... ...
{{# code}}
<h2 class="goodsName"><span>{{.}}</span></h2>
{{/ code}}
{{# info}}
<h1 class="goodsSubtitle"><span>{{.}}</span></h1>
{{/ info}}
... ...
<!DOCTYPE html>
<html style="font-size: 20px;">
<head>
<meta charset="utf-8">
<title>{{title}}</title>
<meta name="viewport" content="width=device-width, initial-scale=1,user-scalable=yes">
<meta http-equiv="cleartype" content="on">
<meta content="telephone=no" name="format-detection" />
<script type="text/javascript">
(function(d,c){var e=d.documentElement,a="orientationchange" in window?"orientationchange":"resize",b=function(){var f=e.clientWidth;if(!f){return}if(f>=640){e.style.fontSize="40px"}else{e.style.fontSize=40*(f/640)+"px"}};if(!d.addEventListener){return}b();c.addEventListener(a,b,false);d.addEventListener("DOMContentLoaded",b,false)})(document,window);
</script>
<link rel="dns-prefetch" href="//cdn.yoho.cn">
<link rel="dns-prefetch" href="//static.yohobuy.com">
<link rel="dns-prefetch" href="//img12.static.yhbimg.com">
<link rel="dns-prefetch" href="//img13.static.yhbimg.com">
<!--
<link rel="stylesheet" href="http://cdn.yoho.cn/myohobuy/{{version}}/index.css">
-->
<link rel="stylesheet" href="{{httpType}}://cdn.yoho.cn/app-webview/{{version}}/index.css">
<style>
.good-detail-page .model {
width: 100%;
height: auto;
border-bottom: 1px solid #e0e0e0;
overflow: hidden;
margin-bottom: 0.75rem;
}
.good-detail-page .model .portrait {
width: 4.375rem;
float: left;
margin-bottom: 0.375rem;
}
.good-detail-page .model .portrait span {
text-align: center;
font-size: 0.6rem;
display: block;
height: 1.55rem;
line-height: 1.7rem;
color: #444;
}
.good-detail-page .model .portrait img {
display: block;
max-width: 100%;
border: 0;
width: 3.1rem;
height: 3.1rem;
border-radius: 2.75rem;
margin-top: 2.1rem;
margin-left: 0.55rem;
}
.good-detail-page .model .info-list {
margin-left: 4.75rem;
}
.good-detail-page .model .info-list .list-title {
display: block;
width: 6.25rem;
height: 1rem;
background: #eee;
line-height: 1rem;
text-align: center;
margin: 0.25rem 0 0.75rem;
}
.good-detail-page .model .detail-info {
width: 48%;
height: 1.25rem;
line-height: 1.25rem;
display: inline-block;
}
.good-detail-page .model .detail-info .info-name {
color: #b0b0b0;
font-size: 0.6rem;
}
.good-detail-page .model .detail-info:nth-child(2) {
width: 100%;
}
.good-detail-page .remind-tips {
padding-left: 0.45rem;
font-size: 0.55rem;
color: #e9221a;
margin-bottom: 0.75rem;
}
.good-detail-page .remind-tips img {
width: 0.7rem;
float: left;
}
.good-detail-page .remind-tips .wash-tags {
line-height: 0.75rem;
height: 0.75rem;
height: 0.75rem;
margin-left: 0.25rem;
}
.good-detail-page .goods-desc .service.surpass-not-support {
background: url("http://img11.static.yhbimg.com/article/2017/07/19/14/016ec56db99be8633d5e9b1aa66b6ffab1.png") no-repeat;
background-size: 100%;
}
.good-detail-page .page-block .pro-detail * {
font-size: 0.7rem !important;
color: #444;
line-height: 1rem !important;
margin-bottom: 1rem;
letter-spacing: 0.03rem;
word-break: break-all;
}
.good-detail-page .maybe-like {
border-top: none;
padding-left: 0;
}
.good-detail-page .maybe-like .title{
color: #444;
font-size: 0.8rem;
line-height: 2.2rem;
text-align: center;
margin-left: -0.375rem;
}
.good-detail-page .recommend-for-you .title {
margin-left: -0.375rem;
}
.good-detail-page .page-block .pro-detail {
font-size: 14px;
}
.good-detail-page .goods-discount {
padding-top: 0;
margin-bottom: 0.5rem;
}
.good-detail-page .product-detail {
margin-top: 0;
margin-bottom: 0.5rem;
}
.good-detail-page .page-block {
margin-bottom: 0.5rem;
}
strong,b {
font-weight: bold;
}
.good-detail-page .price-desc-detail {
padding: 0.25rem 0;
color: #b0b0b0;
font-size: 0.5rem;
margin-top: 0.1rem;
}
.good-detail-page .price-desc-detail p {
line-height: 1.45;
padding: 0.125rem 0;
}
.good-detail-page .price-desc-detail .price-item-name {
line-height: 1.5;
color: #444;
padding-bottom: 0;
}
.good-detail-page .price-desc-detail .price-item-content {
font-weight: 300;
}
.good-detail-page .price-desc-detail .price-summary {
margin: 0.1rem 0;
font-weight: 300;
}
</style>
<link rel="apple-touch-icon-precomposed" href="http://static.yohobuy.com/m/v1/img/touch/apple-touch-icon-144x144-precomposed-new.png">
<link rel="apple-touch-startup-image" sizes="640x920" href="http://static.yohobuy.com/m/v1/img/startup/startup-retina.png" media="screen and (max-device-width: 480px) and (-webkit-min-device-pixel-ratio: 2)">
<link rel="apple-touch-startup-image" sizes="320x460" href="http://static.yohobuy.com/m/v1/img/startup/startup.png" media="screen and (max-device-width: 320)">
</head>
<body>
{{{productIntro}}}
<!--<div class="good-detail-page yoho-page">
<div id="app-detail" class="hide">
<div id="productDesc">
<div class="goods-desc page-block">
<p>{{{productIntro}}}</p>
</div>
</div>
</div>-->
</body>
</html>
... ...