Authored by mali

鉴定服务

@@ -870,4 +870,15 @@ public class ProductController { @@ -870,4 +870,15 @@ public class ProductController {
870 LOG.info("in ufo.product.createSeek2BuyStorage req {}", seekToBuyStorageBo); 870 LOG.info("in ufo.product.createSeek2BuyStorage req {}", seekToBuyStorageBo);
871 return seekToBuyStorageService.createSeek2BuyStorage(seekToBuyStorageBo); 871 return seekToBuyStorageService.createSeek2BuyStorage(seekToBuyStorageBo);
872 } 872 }
  873 +
  874 + @ApiOperation(name = "ufo.product.info.data", desc = "skn信息")
  875 + @RequestMapping(params = "method=ufo.product.info.data")
  876 + public ProductInfo queryProductInfo(@RequestParam(value = "product_id") Integer productId) {
  877 + if (productId == null) {
  878 + LOG.info("in method=ufo.product.info.data productId Is Null");
  879 + return null;
  880 + }
  881 + LOG.info("in method=ufo.product.info.data productId = {}", productId);
  882 + return productService.queryProductInfo(productId);
  883 + }
873 } 884 }
@@ -7,6 +7,7 @@ import java.util.Map; @@ -7,6 +7,7 @@ import java.util.Map;
7 7
8 import com.alibaba.fastjson.JSONObject; 8 import com.alibaba.fastjson.JSONObject;
9 import com.yoho.core.dal.datasource.annotation.Database; 9 import com.yoho.core.dal.datasource.annotation.Database;
  10 +import com.yohobuy.ufo.model.ProductInfo;
10 import com.yohobuy.ufo.model.request.StoragePriceBo; 11 import com.yohobuy.ufo.model.request.StoragePriceBo;
11 import com.yohobuy.ufo.model.response.ProductDetailResp; 12 import com.yohobuy.ufo.model.response.ProductDetailResp;
12 import com.yohobuy.ufo.model.response.StorageInfoResp; 13 import com.yohobuy.ufo.model.response.StorageInfoResp;
@@ -115,4 +116,11 @@ public interface ProductService { @@ -115,4 +116,11 @@ public interface ProductService {
115 ModelAndView queryProductIntro(Integer productId); 116 ModelAndView queryProductIntro(Integer productId);
116 117
117 List<JSONObject> queryOtherSizeList(Integer productId, Integer goodsId); 118 List<JSONObject> queryOtherSizeList(Integer productId, Integer goodsId);
  119 +
  120 + /**
  121 + * 根据编码查询货号 名称 和图片
  122 + * @param productId
  123 + * @return
  124 + */
  125 + ProductInfo queryProductInfo(Integer productId);
118 } 126 }
@@ -1897,4 +1897,28 @@ public class ProductServiceImpl implements ProductService { @@ -1897,4 +1897,28 @@ public class ProductServiceImpl implements ProductService {
1897 ProductProfit productProfit = productProfitMapper.selectByProductId(productId); 1897 ProductProfit productProfit = productProfitMapper.selectByProductId(productId);
1898 return null == productProfit ? null : productProfit.getProfitRate(); 1898 return null == productProfit ? null : productProfit.getProfitRate();
1899 } 1899 }
  1900 +
  1901 + /**
  1902 + * 根据编码查询货号 名称 和图片
  1903 + * @param productId
  1904 + * @return
  1905 + */
  1906 + public ProductInfo queryProductInfo(Integer productId) {
  1907 + ProductInfo resp = new ProductInfo();
  1908 +
  1909 + Product product = productMapper.selectByPrimaryKey(productId);
  1910 + if (product != null) {
  1911 + resp.setProductId(product.getId());
  1912 + resp.setProductName(product.getProductName());
  1913 + resp.setProductCode(product.getProductCode());
  1914 + }
  1915 +
  1916 + List<Goods> goods = goodsMapper.selectByProductIds(Lists.newArrayList(productId));
  1917 + if (org.apache.commons.collections.CollectionUtils.isNotEmpty(goods)) {
  1918 + resp.setColorImage(goods.get(0).getColorImage());
  1919 +
  1920 + }
  1921 +
  1922 + return resp;
  1923 + }
1900 } 1924 }