Commit 08c8ca7e1f39bc6cee12122db9cc7980d2e9fb43

Authored by alexyang
1 parent 19eb03b9

remove code

titan-api/src/main/java/com/diligrp/titan/common/utils/SkuUtil.java
... ... @@ -364,8 +364,8 @@ public class SkuUtil {
364 364 // System.out.println(SkuUtil.decode("2t3on6CVif", false));
365 365 // System.out.println(SkuUtil.encode("2t3on6CVif",123123123));
366 366 // System.out.println(SkuUtil.decode("1aP75Z99Kmb", true));
367   - System.out.println(SkuUtil.getVersion("9NNcC936"));
368   - System.out.println(SkuUtil.getSkuEncWithOutVersion("9NNcC936"));
  367 + System.out.println(SkuUtil.getPid("1aRTwQcZcn4B",false));
  368 +// System.out.println(SkuUtil.getSkuEncWithOutVersion("9NNcC936"));
369 369  
370 370 // System.out.println(SkuUtil.decode("6HGkoES51V"));
371 371  
... ...
titan-api/src/main/java/com/diligrp/titan/common/utils/web/VelocitySupport.java
... ... @@ -126,14 +126,9 @@ public abstract class VelocitySupport {
126 126 }
127 127  
128 128 // 输入输出编码
129   - Template bodyVM = engine.getTemplate(viewVM,
130   - (String) engine.getProperty(VelocityEngine.INPUT_ENCODING));
131   - // 合并screen_content
132   - StringWriter screenContent = new StringWriter();
133   - bodyVM.merge(new VelocityContext(context), screenContent);
  129 +
134 130  
135 131 // 添加到默认布局中
136   - context.put(VELOCITY_SCREEN_CONTENT, screenContent.toString());
137 132  
138 133 return new ModelAndView(layout, context);
139 134 }
... ...
titan-api/src/main/java/com/diligrp/titan/web/ws/product/ProductWebservice.java
... ... @@ -124,37 +124,6 @@ public class ProductWebservice extends BaseWebservice {
124 124 }
125 125 }
126 126  
127   - /**
128   - * this method is 更新第三方商品
129   - *
130   - * @param request
131   - * @param response
132   - * @return
133   - * @createTime 2015年3月26日 上午11:29:32
134   - * @author yangjianjun
135   - */
136   - @RequestMapping(value = "/updatePopProduct", method = RequestMethod.POST)
137   - @ResponseBody
138   - public Object updatePopProduct(HttpServletRequest request, HttpServletResponse response) {
139   - long start = System.currentTimeMillis();
140   - BaseOutput<Object> output = new BaseOutput<Object>();
141   - try {
142   - PopProductInput input = getParamObject(request, PopProductInput.class);
143   - // 过滤属性参数
144   - handlerAttrParam(input.getSaleAtt());
145   - LogHelper.info(LogTypeEnum.PRODUCT, "调用接口updatePopProduct参数:{}", JSON.toJSONString(input));
146   - Map<String, Boolean> resultMap = productRestService.updatePopProduct(input);
147   - if (!resultMap.get("updateSuccess")) {
148   - output.failure(0, "更新商品失败");
149   - }
150   - } catch (Exception e) {
151   - LogHelper.error(LogTypeEnum.PRODUCT, e, "调用接口updatePopProduct异常!耗时:{}", System.currentTimeMillis() - start);
152   - output.failure(0, "更新商品失败," + e.getMessage());
153   - }
154   - LogHelper.info(LogTypeEnum.PRODUCT, "调用接口updatePopProduct成功!返回内容={},耗时:{}", JSON.toJSONString(output.getData()),
155   - System.currentTimeMillis() - start);
156   - return output;
157   - }
158 127  
159 128 /**
160 129 * this method is 批量更新商品状态
... ... @@ -202,49 +171,7 @@ public class ProductWebservice extends BaseWebservice {
202 171 }
203 172 }
204 173  
205   - /**
206   - * this method is 批量设置第三方商品自定义分类
207   - *
208   - * @param request
209   - * @param response
210   - * @return
211   - * @createTime 2015年3月26日 上午11:41:56
212   - * @author yangjianjun
213   - */
214   - @RequestMapping(value = "/setProductVirtualCid", method = RequestMethod.POST)
215   - @ResponseBody
216   - public Object setProductVirtualCid(HttpServletRequest request, HttpServletResponse response) {
217   - long start = System.currentTimeMillis();
218   - BaseOutput<Object> output = new BaseOutput<Object>();
219   - Map<String, Object> params = null;
220   - int result = -1;
221   - try {
222   - params = super.getParamObject(request, new TypeReference<HashMap<String, Object>>() {
223   -
224   - });
225   - LogHelper.info(LogTypeEnum.PRODUCT, "调用接口setProductVirtualCid参数:{}", JSON.toJSONString(params));
226   - List<Object> pids = (List<Object>) params.get("pids");
227   - List<Long> pidList = new ArrayList<Long>();
228   - for (Object pid : pids
229   - ) {
230   - if (pid instanceof Long) {
231   - pidList.add((Long) pid);
232   - }
233   - if (pid instanceof Integer) {
234   - pidList.add(Long.valueOf((Integer) pid));
235   - }
236   - }
237   - result = productRestService.setProductVirtualCid(pidList, Long.parseLong(String.valueOf(params.get("vcid"))));
238 174  
239   - LogHelper.info(LogTypeEnum.PRODUCT, "调用接口setProductVirtualCid成功!返回内容={},耗时:{}",
240   - JSON.toJSONString(output.getData()), System.currentTimeMillis() - start);
241   - return output;
242   - } catch (TitanError e) {
243   - LogHelper.error(LogTypeEnum.PRODUCT, e, "调用接口setProductVirtualCid异常!耗时:{}",
244   - System.currentTimeMillis() - start);
245   - return output.failure(e);
246   - }
247   - }
248 175  
249 176  
250 177 /**
... ... @@ -384,241 +311,6 @@ public class ProductWebservice extends BaseWebservice {
384 311 }
385 312  
386 313  
387   - /**
388   - * this method is 获取所有的设置的商品排序
389   - *
390   - * @param request
391   - * @param response
392   - * @return
393   - * @createTime 2015年3月26日 上午11:55:29
394   - * @author yangjianjun
395   - */
396   - @RequestMapping(value = "/getProductSearchSort", method = RequestMethod.POST)
397   - @ResponseBody
398   - public Object getProductSearchSort(HttpServletRequest request, HttpServletResponse response) {
399   - long start = System.currentTimeMillis();
400   - BaseOutput<List<ProductSearchSortOut>> output = new BaseOutput<List<ProductSearchSortOut>>();
401   - try {
402   - HashMap<String, Long> params = getParamObject(request,
403   - new TypeReference<HashMap<String, Long>>() {
404   -
405   - });
406   - LogHelper.info(LogTypeEnum.PRODUCT, "调用接口getProductSearchSort参数:{}", JSON.toJSONString(params));
407   - Long cid = params.get("cid");
408   - Integer type = params.get("type").intValue();
409   - if (cid == null || type == null) {
410   - return output.failure(TitanError.INVALID_PARAM_ERROR);
411   - }
412   - List<ProductSearchSortOut> searchSorts = productRestService.getProductSearchSort(cid, type);
413   - output.setData(searchSorts);
414   - } catch (TitanError e) {
415   - LogHelper.error(LogTypeEnum.PRODUCT, e, "调用接口getProductSearchSort异常!耗时:{}",
416   - System.currentTimeMillis() - start);
417   - return output.failure(e);
418   - }
419   - LogHelper.info(LogTypeEnum.PRODUCT, "调用接口getProductSearchSort成功!返回内容={},耗时:{}",
420   - JSON.toJSONString(output.getData()), System.currentTimeMillis() - start);
421   - return output;
422   - }
423   -
424   - /**
425   - * this method is 查询第三方店铺最新发布的商品概要信息
426   - *
427   - * @param request
428   - * @param response
429   - * @return
430   - * @createTime 2015年3月26日 上午11:56:48
431   - * @author yangjianjun
432   - */
433   - @RequestMapping(value = "/listLatestProduct", method = RequestMethod.POST)
434   - @ResponseBody
435   - public Object listLatestProduct(HttpServletRequest request, HttpServletResponse response) {
436   - long start = System.currentTimeMillis();
437   - BaseOutput<List<ProductInfoOut>> output = new BaseOutput<List<ProductInfoOut>>();
438   - try {
439   - Map<String, Long> params = getParamObject(request, new TypeReference<HashMap<String, Long>>() {
440   -
441   - });
442   - LogHelper.info(LogTypeEnum.PRODUCT, "调用接口listLatestProduct参数:{}", JSON.toJSONString(params));
443   - List<ProductInfoOut> products = productRestService
444   - .listLatestProduct(params.get("shopId"), params.get("num").intValue());
445   - output.setData(products);
446   - LogHelper.info(LogTypeEnum.PRODUCT, "调用接口listLatestProduct成功!返回内容={},耗时:{}",
447   - JSON.toJSONString(output.getData()), System.currentTimeMillis() - start);
448   - return output;
449   - } catch (TitanError e) {
450   - LogHelper
451   - .error(LogTypeEnum.PRODUCT, e, "调用接口listLatestProduct异常!耗时:{}", System.currentTimeMillis() - start);
452   - return output.failure(e);
453   - }
454   - }
455   -
456   - /**
457   - * this method is 查询上架自定义类目下的商品总数
458   - *
459   - * @param request
460   - * @param response
461   - * @return
462   - * @createTime 2015年3月26日 下午12:01:09
463   - * @author yangjianjun
464   - */
465   - @RequestMapping(value = "/countVirtualCatProducts", method = RequestMethod.POST)
466   - @ResponseBody
467   - public Object countVirtualCatProducts(HttpServletRequest request, HttpServletResponse response) {
468   - long start = System.currentTimeMillis();
469   - BaseOutput<Object> output = new BaseOutput<Object>();
470   - HashMap<String, Long> params = null;
471   - Long countProduct = -1l;
472   - try {
473   - params = getParamObject(request, new TypeReference<HashMap<String, Long>>() {
474   -
475   - });
476   - LogHelper.info(LogTypeEnum.PRODUCT, "调用接口countVirtualCatProducts参数:{}", JSON.toJSONString(params));
477   - countProduct = productRestService.countVirtualCatProducts(params.get("vcid"));
478   - if (countProduct < 0) {
479   - output.failure(500, "获取自定义类目上架商品数失败");
480   - }
481   - output.setData(countProduct);
482   - LogHelper.info(LogTypeEnum.PRODUCT, "调用接口countVirtualCatProducts成功!返回内容={},耗时:{}",
483   - JSON.toJSONString(output.getData()), System.currentTimeMillis() - start);
484   - return output;
485   - } catch (TitanError e) {
486   - LogHelper.error(LogTypeEnum.PRODUCT, e, "调用接口countVirtualCatProducts异常!耗时:{}",
487   - System.currentTimeMillis() - start);
488   - output.failure(e);
489   - return output;
490   - }
491   - }
492   -
493   - /**
494   - * this method is 获取商品描述信息
495   - *
496   - * @param request
497   - * @param response
498   - * @return
499   - * @createTime 2015年3月26日 上午11:58:36
500   - * @author yangjianjun
501   - */
502   - @RequestMapping(value = "/getProductDesc", method = RequestMethod.POST)
503   - @ResponseBody
504   - public Object getProductDesc(HttpServletRequest request, HttpServletResponse response) {
505   - long start = System.currentTimeMillis();
506   - BaseOutput<String> output = new BaseOutput<String>();
507   - try {
508   - HashMap<String, Long> params = getParamObject(request, new TypeReference<HashMap<String, Long>>() {
509   -
510   - });
511   - LogHelper.info(LogTypeEnum.PRODUCT, "调用接口getProductDesc参数:{}", JSON.toJSONString(params));
512   - String desc = productRestService.getProductDesc(params.get("pid"));
513   - output.setData(desc);
514   - LogHelper.info(LogTypeEnum.PRODUCT, "调用接口getProductDesc成功!耗时:{}", System.currentTimeMillis() - start);
515   - } catch (TitanError e) {
516   - LogHelper.error(LogTypeEnum.PRODUCT, e, "调用接口getProductDesc异常!耗时:{}", System.currentTimeMillis() - start);
517   - output.failure(e);
518   - }
519   - return output;
520   - }
521   -
522   - /**
523   - * this method is 获取商品描述信息
524   - *
525   - * @param request
526   - * @param response
527   - * @return
528   - * @createTime 2015年3月26日 上午11:58:36
529   - * @author yangjianjun
530   - */
531   - @RequestMapping(value = "/setProductDesc", method = RequestMethod.POST)
532   - @ResponseBody
533   - public Object setProductDesc(HttpServletRequest request, HttpServletResponse response) {
534   - long start = System.currentTimeMillis();
535   - BaseOutput<String> output = new BaseOutput<String>();
536   - try {
537   - HashMap<String, String> params = getParamObject(request, new TypeReference<HashMap<String, String>>() {
538   -
539   - });
540   - LogHelper.info(LogTypeEnum.PRODUCT, "调用接口setProductDesc参数:{}", JSON.toJSONString(params));
541   - productRestService.setProductDesc(Long.parseLong(params.get("pid")), params.get("desc"));
542   - LogHelper.info(LogTypeEnum.PRODUCT, "调用接口setProductDesc成功!耗时:{}", System.currentTimeMillis() - start);
543   - } catch (TitanError e) {
544   - LogHelper.error(LogTypeEnum.PRODUCT, e, "调用接口setProductDesc异常!耗时:{}", System.currentTimeMillis() - start);
545   - output.failure(e);
546   - }
547   - return output;
548   - }
549   -
550   -
551   - /**
552   - * this method is 店铺ID和商品状态取商品对应类目列表(用户中心三方商品查询)
553   - *
554   - * @param request
555   - * @param response
556   - * @return
557   - * @createTime 2015年4月27日 上午11:07:09
558   - * @author yangjianjun
559   - */
560   - @ResponseBody
561   - @RequestMapping(value = "/getPopProductCategroyByShopId", method = RequestMethod.POST)
562   - public Object getPopProductCategroyByShopId(HttpServletRequest request, HttpServletResponse response) {
563   - BaseOutput<Map<Integer, String>> outPut = new BaseOutput<Map<Integer, String>>();
564   - long start = System.currentTimeMillis();
565   - try {
566   - HashMap<String, Integer> params = getParamObject(request,
567   - new TypeReference<HashMap<String, Integer>>() {
568   - });
569   - Integer shopId = params.get("shopId");
570   - Integer pstatus = params.get("pstatus");
571   - LogHelper.info(LogTypeEnum.PRODUCT,
572   - "调用接口getPopProductCategroyByShopId参数:{}", JSON.toJSONString(params));
573   - Map<Integer, String> map = productRestService.getPopProductCategroyByShopId(shopId, pstatus);
574   - outPut.setData(map);
575   - } catch (TitanError e) {
576   - LogHelper.error(LogTypeEnum.PRODUCT, e,
577   - "调用接口getPopProductCategroyByShopId异常!耗时:{}",
578   - System.currentTimeMillis() - start);
579   - return outPut.failure(e);
580   - }
581   - LogHelper.info(LogTypeEnum.PRODUCT,
582   - "调用接口getPopProductCategroyByShopId成功!内容={},耗时:{}", JSON.toJSONString(outPut),
583   - System.currentTimeMillis() - start);
584   - return outPut;
585   - }
586   -
587   - /**
588   - * this method is 根据店铺ID统计店铺商品数量
589   - *
590   - * @param request
591   - * @param response
592   - * @return
593   - * @createTime 2015年4月27日 上午11:07:09
594   - * @author yangjianjun
595   - */
596   - @ResponseBody
597   - @RequestMapping(value = "/getCountByShopId", method = RequestMethod.POST)
598   - public Object getCountByShopId(HttpServletRequest request, HttpServletResponse response) {
599   - BaseOutput<Integer> outPut = new BaseOutput<Integer>();
600   - long start = System.currentTimeMillis();
601   - try {
602   - HashMap<String, Long> params = getParamObject(request,
603   - new TypeReference<HashMap<String, Long>>() {
604   - });
605   - Long shopId = params.get("shopId");
606   - LogHelper.info(LogTypeEnum.PRODUCT,
607   - "调用接口getCountByShopId参数:{}", JSON.toJSONString(params));
608   - int result = productRestService.getCountByShopId(shopId);
609   - outPut.setData(result);
610   - } catch (TitanError e) {
611   - LogHelper.error(LogTypeEnum.PRODUCT, e,
612   - "调用接口getCountByShopId异常!耗时:{}",
613   - System.currentTimeMillis() - start);
614   - return outPut.failure(e);
615   - }
616   - LogHelper.info(LogTypeEnum.PRODUCT,
617   - "调用接口getCountByShopId成功!内容={},耗时:{}", JSON.toJSONString(outPut),
618   - System.currentTimeMillis() - start);
619   - return outPut;
620   - }
621   -
622 314  
623 315 private void handlerAttrParam(List<AttributeOut> attrList) {
624 316 if (CollectionUtils.isEmpty(attrList))
... ...
titan-api/src/main/java/com/diligrp/titan/ws/product/impl/ProductRestServiceImpl.java
... ... @@ -430,7 +430,7 @@ public class ProductRestServiceImpl implements ProductRestService {
430 430 Map<String, ProductInfoOut> skuMap = new HashMap<String, ProductInfoOut>();
431 431 for (String sku : skus) {
432 432 //获取商品
433   - Long pid = SkuUtil.getPid(sku, true);
  433 + Long pid = SkuUtil.getPid(sku, false);
434 434 List<Long> pids = new ArrayList<Long>();
435 435 pids.add(pid);
436 436 List<ProductInfoOut> productInfoOutList = this.getProductInfo(pids, true);
... ...
titan-api/src/main/resources/sqlmap/Category.xml
... ... @@ -5,7 +5,7 @@
5 5  
6 6 <!-- category 所有查询列 -->
7 7 <sql id="QUERY_COLUMN_LIST">
8   - <![CDATA[id,name,jp,parent,template,icon,deal_type AS dealType,status,activate, `order`, note,product_img as productImg, shop_id as shopId]]>
  8 + <![CDATA[id,name,jp,parent,template,icon,status,activate, `order`, note,product_img as productImg, shop_id as shopId]]>
9 9 </sql>
10 10  
11 11 <!-- category 查询列来源表-->
... ...
titan-api/src/main/resources/sqlmap/pop/ProductPop.xml
... ... @@ -5,7 +5,7 @@
5 5  
6 6 <!-- product_pop 所有查询列 -->
7 7 <sql id="QUERY_COLUMN_LIST">
8   - <![CDATA[pid,name,product_type AS productType,index_top AS indexTop,cate_id AS cateId, countryArea,seller,seller_name AS sellerName,shop,shop_name AS shopName,publish_time AS publishTime,status,extend,ctime,utime]]>
  8 + <![CDATA[pid,name,product_type AS productType,index_top AS indexTop,cate_id AS cateId,seller,seller_name AS sellerName,shop,shop_name AS shopName,publish_time AS publishTime,status,extend,ctime,utime]]>
9 9 </sql>
10 10  
11 11 <!-- product_pop 查询列来源表-->
... ...
titan-api/src/main/resources/sqlmap/pop/ProductPopAttr.xml
... ... @@ -32,7 +32,7 @@
32 32 <result property="ctime" column="ctime"/>
33 33 <collection property="attrValueList" ofType="productPopAttrValue" javaType="ArrayList"
34 34 column="{attrId=attrId,pid=pid}"
35   - select="com.diligrp.titan.dao.product.pop.ProductPopAttrValueDao.findByAttrId">
  35 + select="ProductPopAttrValueDao.findByAttrId">
36 36 <result property="attrId" column="attr_id"/>
37 37 <result property="valueId" column="value_id"/>
38 38 <result property="ctime" column="ctime"/>
... ...
titan-api/src/main/resources/sqlmap/pop/ProductSkuPop.xml
... ... @@ -19,9 +19,7 @@
19 19 <if test="sku != null and sku != ''"><![CDATA[AND sku = #{sku}]]></if>
20 20 <if test="title != null and title != ''"><![CDATA[AND title = #{title}]]></if>
21 21 <if test="price != null and price != ''"><![CDATA[AND price = #{price}]]></if>
22   - <if test="store != null and store != ''"><![CDATA[AND store = #{store}]]></if>
23 22 <if test="storeUnit != null and storeUnit != ''"><![CDATA[AND store_unit = #{storeUnit}]]></if>
24   - <if test="miniPurchase != null and miniPurchase != ''"><![CDATA[AND mini_purchase = #{miniPurchase}]]></if>
25 23 <if test="pid != null and pid != ''"><![CDATA[AND pid = #{pid}]]></if>
26 24 <if test="sales != null and sales != ''"><![CDATA[AND sales = #{sales}]]></if>
27 25 <if test="status != null and status != ''"><![CDATA[AND status = #{status}]]></if>
... ... @@ -42,9 +40,7 @@
42 40 <if test="sku != null"><![CDATA[sku = #{sku},]]></if>
43 41 <if test="title != null"><![CDATA[title = #{title},]]></if>
44 42 <if test="price != null"><![CDATA[price = #{price},]]></if>
45   - <if test="store != null"><![CDATA[store = #{store},]]></if>
46 43 <if test="storeUnit != null"><![CDATA[store_unit = #{storeUnit},]]></if>
47   - <if test="miniPurchase != null"><![CDATA[mini_purchase = #{miniPurchase},]]></if>
48 44 <if test="pid != null"><![CDATA[pid = #{pid},]]></if>
49 45 <if test="sales != null"><![CDATA[sales = #{sales},]]></if>
50 46 <if test="status != null"><![CDATA[status = #{status},]]></if>
... ...
titan-sdk/pom.xml
... ... @@ -11,19 +11,6 @@
11 11 <name>titan-sdk</name>
12 12 <url>http://maven.apache.org</url>
13 13  
14   - <distributionManagement>
15   - <snapshotRepository>
16   - <id>nexus</id>
17   - <name>Nexus Snapshot</name>
18   - <url>http://10.28.10.127:8081/repository/maven-snapshots/</url>
19   - </snapshotRepository>
20   - <repository>
21   - <id>nexus</id>
22   - <name>Nexus Snapshot</name>
23   - <url>http://10.28.10.127:8081/repository/maven-releases/</url>
24   - </repository>
25   - </distributionManagement>
26   -
27 14  
28 15 <properties>
29 16 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
... ...
titan-sdk/src/main/java/com/diligrp/titan/sdk/TitanClient.java
... ... @@ -21,7 +21,7 @@ public class TitanClient {
21 21 private ProductService productService;
22 22 private CategoryService categoryService;
23 23 private AttributeService attributeService;
24   - private static String PATH_PERFIX = "http://titan.api.1n4j.com";
  24 + private static String PATH_PERFIX = "http://api.titan.zandeapp.com";
25 25  
26 26 /**
27 27 * 初始化TitanClient,用于获取商品库系统的各种服务
... ...
titan-sdk/src/main/java/com/diligrp/titan/sdk/domain/Product.java
... ... @@ -5,724 +5,214 @@ import java.util.List;
5 5  
6 6 public class Product {
7 7  
8   - /**
9   - * 商品ID
10   - */
11   - private Long pid;
12   - /**
13   - * 商品名称
14   - */
15   - private String name;
16   - /**
17   - * 商品类型(0普通商品,1拼购商品)
18   - */
19   - private int productType;
20   - /**
21   - * 商品是否存在样品(0无样品、1有样品)
22   - */
23   - private int productSample;
24   -
25   - /**
26   - * 分类ID
27   - */
28   - private Integer cid;
29   - /**
  8 + /**
  9 + * 商品ID
  10 + */
  11 + private Long pid;
  12 + /**
  13 + * 商品名称
  14 + */
  15 + private String name;
  16 + /**
  17 + * 商品类型(0普通商品,1拼购商品)
  18 + */
  19 + private int productType;
  20 + /**
  21 + * 分类ID
  22 + */
  23 + private Integer cid;
  24 + /**
30 25 * 商品分类
31 26 */
32 27 private Category categoryOut;
33   -
34   - /**
35   - * 虚拟分类ID
36   - */
37   - private Integer userDefined;
38   -
39   - /**
40   - * 子分类Id集
41   - */
42   - protected List<Integer> subclassification;
43   -
44   - /**
45   - * 子类目信息
46   - */
47   - private List<Category> childCategory;
48   - /**
49   - * 已销售量
50   - */
51   - private Integer salesNum;
52   - /**
53   - * 产地
54   - */
55   - private String productionAddr;
56   -
57   - /**
58   - * 产地ID
59   - */
60   - private Integer productionAddrId;
61   -
62   - /**
63   - * 所在地
64   - */
65   - private String localityAddr;
66   -
  28 +
67 29 /**
68   - * 所在地名称
  30 + * 卖家ID
69 31 */
70   - private String localityName;
71   -
72   - /**
73   - * 所在地ID
74   - */
75   - private Long localityArea;
76   -
  32 + private Long sellerID;
77 33 /**
78   - * 所在国家地
  34 + * 店铺ID
79 35 */
80   - private Long countryAreaId;
  36 + private Long vendorId;
  37 +
  38 +
81 39 /**
82   - * 商品发布地ID
  40 + * 状态 预览-2,删除-1,1=待审核,2=审核失败,
  41 + * 3=在售商品,4=仓库中商品,5=待上架,6=过期下架,7=手动下架 ProductStatus中有定义
83 42 */
84   - private Long publishedLocationID;
85   -
86   - /**
87   - * 销售类型,第三方或自营 10-自营 20-代销 30-第三方卖家
88   - */
89   - private String saleType;
90   -
91   - /**
92   - * 报价类型(1 常规格报价销售,2 价格区间销售)
93   - */
94   - private int quotationType;
95   - /**
96   - * 卖家ID
97   - */
98   - private Long sellerID;
99   - /**
100   - * 店铺ID
101   - */
102   - private Long vendorId;
  43 + private Integer status;
103 44  
104 45 /**
105   - * 备货时长
  46 + * 默认图片
106 47 */
107   - private String prepareTimeId;
108   - /**
109   - * 备货时长
110   - */
111   - private String prepareTime;
112   - /**
113   - * 第三方商品关联ID
114   - */
115   - private String foreignPid;
116   - /**
117   - * 状态 预览-2,删除-1,1=待审核,2=审核失败,
118   - * 3=在售商品,4=仓库中商品,5=待上架,6=过期下架,7=手动下架 ProductStatus中有定义
119   - */
120   - private Integer status;
121   - /**
122   - * 销售单位
123   - */
124   - private String saleUnit;
125   -
126   - /**
127   - * 销售单位ID号
128   - */
129   - private Integer storeUnit;
130   - /**
131   - * 默认图片
132   - */
133   - private String defaultPic;
134   - /**
135   - * 图片列表
136   - */
137   - private List<String> pictures;
138   - /**
139   - * 最低价格
140   - */
141   - private Integer minPrice;
142   - /**
143   - * 最高价格
144   - */
145   - private Integer maxPrice;
146   - /**
147   - * 商品有效期
148   - */
149   - private Integer indate;
150   -
151   - private String feedback;
152   -
153   - /**
154   - * 上架时间
155   - */
156   - private Date onSaleTime;
157   -
158   - /**
159   - * 上架模式, 放入仓库1,审核后立即上架2,指定上架时间3
160   - */
161   - private Integer publishMode;
162   - /**
163   - * 下架时间
164   - */
165   - private Date dropsTime;
166   - /**
167   - * 设置上架时间
168   - */
169   - private Date publishSettime;
170   -
171   - /**
172   - * sku列表
173   - */
174   - private List<Sku> skus;
175   -
176   - /**
177   - * 最小起批量
178   - */
179   - private Integer minNum ;
180   -
181   - /**
182   - * 总库存量
183   - */
184   - private Integer stockNum;
  48 + private String defaultPic;
  49 + /**
  50 + * 图片列表
  51 + */
  52 + private List<String> pictures;
185 53  
186 54 /**
187   - * 评论数量
  55 + * 上架时间
188 56 */
189   - protected Integer commentNum;
190   -
191   - /**
192   - * 商品报价列表
193   - */
194   - private List<ProductQuotation> productQuotation;
195   - /**
196   - * 描述属性
197   - */
198   - private List<Attribute> descAtt;
199   - /**
200   - * 销售属性
201   - */
202   - private List<Attribute> saleAtt;
203   -
204   - /**
205   - * 可搜索属性
206   - */
207   - private List<Attribute> searchAtt;
208   -
209   - /**
210   - * 商品认证
211   - */
212   - private List<ProductAuth> productAuth;
213   -
214   - /**
215   - * 商品视频
216   - */
217   - private Video video;
  57 + private Date onSaleTime;
218 58  
219 59 /**
220   - * 单箱数量
  60 + * sku列表
221 61 */
222   - private String singleBoxCount;
  62 + private List<Sku> skus;
223 63  
224 64 /**
225   - * 单箱重量
  65 + * 销售属性
226 66 */
227   - private String singleBoxWeight;
  67 + private List<Attribute> saleAtt;
  68 +
228 69  
229 70 /**
230   - * 是否是特价商品 1-不是 2-是 ProductStatus中有定义
  71 + * 创建时间
231 72 */
232   - private Integer hasSpecial;
233   -
  73 + private Date ctime;
234 74 /**
235   - * 是否允许合作市场以外的市场进行交割 1-允许 2-不允许 ProductStatus中有定义
  75 + * 更新时间
236 76 */
237   - private int isAllowDelivery;
238   -
239   - /**
240   - * 是否有第三方快递 1-没有 2-有 ProductStatus中有定义
241   - */
242   - private Integer hasExpress;
243   -
244   - /**
245   - * 单位重量精确到克
246   - */
247   - private Long unitTog;
248   -
249   - /**
250   - * 创建时间
251   - */
252   - private Date ctime;
253   - /**
254   - * 更新时间
255   - */
256   - private Date utime;
257   -
258   - /**
259   - * 商品拼购信息
260   - */
261   - private ProductPopGroupBuying productPopGroupBuying;
262   - /**
263   - * 商品样品信息
264   - */
265   - private ProductSample productSampleObj;
266   -
267   - public long getPid() {
268   - return pid;
269   - }
270   -
271   - public void setPid(Long pid) {
272   - this.pid = pid;
273   - }
274   -
275   - public String getName() {
276   - return name;
277   - }
278   - public List<ProductAuth> getProductAuth() {
279   - return productAuth;
280   - }
281   -
282   - public void setProductAuth(List<ProductAuth> productAuth) {
283   - this.productAuth = productAuth;
284   - }
285   -
286   - public void setName(String name) {
287   - this.name = name;
288   - }
289   -
290   - public Video getVideo() {
291   - return video;
  77 + private Date utime;
  78 +
  79 +
  80 + public long getPid() {
  81 + return pid;
292 82 }
293 83  
294   - public void setVideo(Video video) {
295   - this.video = video;
  84 + public void setPid(Long pid) {
  85 + this.pid = pid;
296 86 }
297 87  
298   - /**
299   - * 商品类目ID
300   - */
301   - public Integer getCid() {
302   - return cid;
303   - }
304   -
305   - public void setCid(Integer cid) {
306   - this.cid = cid;
307   - }
308   -
309   -
310   - public Category getCategoryOut() {
311   - return categoryOut;
312   - }
313   -
314   - public void setCategoryOut(Category categoryOut) {
315   - this.categoryOut = categoryOut;
316   - }
317   -
318   - public Integer getSalesNum() {
319   - return salesNum;
320   - }
321   -
322   - public void setSalesNum(Integer salesNum) {
323   - this.salesNum = salesNum;
324   - }
325   -
326   - public String getProductionAddr() {
327   - return productionAddr;
328   - }
329   -
330   - public void setProductionAddr(String productionAddr) {
331   - this.productionAddr = productionAddr;
332   - }
333   -
334   - public String getSaleType() {
335   - return saleType;
336   - }
337   -
338   - public void setSaleType(String saleType) {
339   - this.saleType = saleType;
340   - }
341   -
342   - public Long getSellerID() {
343   - return sellerID;
344   - }
345   -
346   - public void setSellerID(Long sellerID) {
347   - this.sellerID = sellerID;
348   - }
349   -
350   - public Long getVendorId() {
351   - return vendorId;
352   - }
353   -
354   - public void setVendorId(Long vendorId) {
355   - this.vendorId = vendorId;
356   - }
357   -
358   - public Integer getStatus() {
359   - return status;
360   - }
361   -
362   - public void setStatus(Integer status) {
363   - this.status = status;
364   - }
365   - public String getSaleUnit() {
366   - return saleUnit;
367   - }
368   - public void setSaleUnit(String saleUnit) {
369   - this.saleUnit = saleUnit;
370   - }
371   -
372   - public String getDefaultPic() {
373   - return defaultPic;
374   - }
375   -
376   - public void setDefaultPic(String defaultPic) {
377   - this.defaultPic = defaultPic;
378   - }
379   -
380   - public Integer getMinPrice() {
381   - return minPrice;
382   - }
383   -
384   - public void setMinPrice(Integer minPrice) {
385   - this.minPrice = minPrice;
386   - }
387   - public Integer getMaxPrice() {
388   - return maxPrice;
389   - }
390   -
391   - public void setMaxPrice(Integer maxPrice) {
392   - this.maxPrice = maxPrice;
393   - }
394   -
395   -
396   - public Date getOnSaleTime() {
397   - return onSaleTime;
398   - }
399   -
400   - public void setOnSaleTime(Date onSaleTime) {
401   - this.onSaleTime = onSaleTime;
402   - }
403   -
404   - public Date getDropsTime() {
405   - return dropsTime;
406   - }
407   -
408   - public void setDropsTime(Date dropsTime) {
409   - this.dropsTime = dropsTime;
410   - }
411   -
412   - public List<String> getPictures() {
413   - return pictures;
414   - }
415   -
416   - public void setPictures(List<String> pictures) {
417   - this.pictures = pictures;
418   - }
419   -
420   - public List<Sku> getSkus() {
421   - return skus;
422   - }
423   -
424   - public void setSkus(List<Sku> skus) {
425   - this.skus = skus;
426   - }
427   - public List<Attribute> getDescAtt() {
428   - return descAtt;
429   - }
430   -
431   - public void setDescAtt(List<Attribute> descAtt) {
432   - this.descAtt = descAtt;
433   - }
434   - public List<Attribute> getSaleAtt() {
435   - return saleAtt;
436   - }
437   -
438   - public void setSaleAtt(List<Attribute> saleAtt) {
439   - this.saleAtt = saleAtt;
440   - }
441   -
442   - public List<Attribute> getSearchAtt() {
443   - return searchAtt;
444   - }
445   -
446   - public void setSearchAtt(List<Attribute> searchAtt) {
447   - this.searchAtt = searchAtt;
448   - }
449   -
450   - public String getForeignPid() {
451   - return foreignPid;
452   - }
453   -
454   - public void setForeignPid(String foreignPid) {
455   - this.foreignPid = foreignPid;
456   - }
457   -
458   - public String getPrepareTime() {
459   - return prepareTime;
460   - }
461   -
462   - public void setPrepareTime(String prepareTime) {
463   - this.prepareTime = prepareTime;
464   - }
465   -
466   -
467   - public Integer getProductionAddrId() {
468   - return productionAddrId;
469   - }
470   -
471   - public void setProductionAddrId(Integer productionAddrId) {
472   - this.productionAddrId = productionAddrId;
473   - }
474   -
475   - public Integer getIndate() {
476   - return indate;
477   - }
478   - public void setIndate(Integer indate) {
479   - this.indate = indate;
480   - }
481   -
482   - public Integer getStoreUnit() {
483   - return storeUnit;
484   - }
485   -
486   - public void setStoreUnit(Integer storeUnit) {
487   - this.storeUnit = storeUnit;
488   - }
489   -
490   - public Integer getPublishMode() {
491   - return publishMode;
492   - }
493   -
494   - public void setPublishMode(Integer publishMode) {
495   - this.publishMode = publishMode;
496   - }
497   -
498   - public Date getPublishSettime() {
499   - return publishSettime;
500   - }
501   -
502   - public void setPublishSettime(Date publishSettime) {
503   - this.publishSettime = publishSettime;
504   - }
505   -
506   - public Date getCtime() {
507   - return ctime;
508   - }
509   -
510   - public void setCtime(Date ctime) {
511   - this.ctime = ctime;
512   - }
513   -
514   - public Date getUtime() {
515   - return utime;
516   - }
517   -
518   - public void setUtime(Date utime) {
519   - this.utime = utime;
520   - }
521   -
522   - public Integer getUserDefined() {
523   - return userDefined;
524   - }
525   -
526   - public void setUserDefined(Integer userDefined) {
527   - this.userDefined = userDefined;
528   - }
529   -
530   - public List<Integer> getSubclassification() {
531   - return subclassification;
532   - }
533   -
534   - public void setSubclassification(List<Integer> subclassification) {
535   - this.subclassification = subclassification;
536   - }
537   -
538   - public int getQuotationType() {
539   - return quotationType;
540   - }
541   -
542   - public void setQuotationType(int quotationType) {
543   - this.quotationType = quotationType;
544   - }
545   -
546   - public List<ProductQuotation> getProductQuotation() {
547   - return productQuotation;
548   - }
549   -
550   - public void setProductQuotation(List<ProductQuotation> productQuotation) {
551   - this.productQuotation = productQuotation;
552   - }
553   -
554   - public String getLocalityAddr() {
555   - return localityAddr;
556   - }
557   -
558   - public void setLocalityAddr(String localityAddr) {
559   - this.localityAddr = localityAddr;
560   - }
561   -
562   - public Long getCountryAreaId() {
563   - return countryAreaId;
564   - }
565   -
566   - public void setCountryAreaId(Long countryAreaId) {
567   - this.countryAreaId = countryAreaId;
568   - }
569   - public Integer getMinNum() {
570   - return minNum;
571   - }
572   -
573   - public void setMinNum(Integer minNum) {
574   - this.minNum = minNum;
575   - }
576   -
577   - public Integer getStockNum() {
578   - return stockNum;
579   - }
  88 + public String getName() {
  89 + return name;
  90 + }
580 91  
581   - public void setStockNum(Integer stockNum) {
582   - this.stockNum = stockNum;
583   - }
  92 + public void setName(String name) {
  93 + this.name = name;
  94 + }
584 95  
585   - public List<Category> getChildCategory() {
586   - return childCategory;
587   - }
  96 + /**
  97 + * 商品类目ID
  98 + */
  99 + public Integer getCid() {
  100 + return cid;
  101 + }
588 102  
589   - public void setChildCategory(List<Category> childCategory) {
590   - this.childCategory = childCategory;
591   - }
  103 + public void setCid(Integer cid) {
  104 + this.cid = cid;
  105 + }
592 106  
593   - public Long getPublishedLocationID() {
594   - return publishedLocationID;
595   - }
596 107  
597   - public void setPublishedLocationID(Long publishedLocationID) {
598   - this.publishedLocationID = publishedLocationID;
599   - }
  108 + public Category getCategoryOut() {
  109 + return categoryOut;
  110 + }
600 111  
601   - public String getFeedback() {
602   - return feedback;
603   - }
  112 + public void setCategoryOut(Category categoryOut) {
  113 + this.categoryOut = categoryOut;
  114 + }
604 115  
605   - public void setFeedback(String feedback) {
606   - this.feedback = feedback;
607   - }
608 116  
609   - public Integer getCommentNum() {
610   - return commentNum;
  117 + public Long getSellerID() {
  118 + return sellerID;
611 119 }
612 120  
613   - public void setCommentNum(Integer commentNum) {
614   - this.commentNum = commentNum;
  121 + public void setSellerID(Long sellerID) {
  122 + this.sellerID = sellerID;
615 123 }
616 124  
617   - public String getPrepareTimeId() {
618   - return prepareTimeId;
  125 + public Long getVendorId() {
  126 + return vendorId;
619 127 }
620 128  
621   - public void setPrepareTimeId(String prepareTimeId) {
622   - this.prepareTimeId = prepareTimeId;
  129 + public void setVendorId(Long vendorId) {
  130 + this.vendorId = vendorId;
623 131 }
624 132  
625   - public String getSingleBoxCount() {
626   - return singleBoxCount;
  133 + public Integer getStatus() {
  134 + return status;
627 135 }
628 136  
629   - public void setSingleBoxCount(String singleBoxCount) {
630   - this.singleBoxCount = singleBoxCount;
  137 + public void setStatus(Integer status) {
  138 + this.status = status;
631 139 }
632 140  
633   - public String getSingleBoxWeight() {
634   - return singleBoxWeight;
  141 + public String getDefaultPic() {
  142 + return defaultPic;
635 143 }
636 144  
637   - public void setSingleBoxWeight(String singleBoxWeight) {
638   - this.singleBoxWeight = singleBoxWeight;
  145 + public void setDefaultPic(String defaultPic) {
  146 + this.defaultPic = defaultPic;
639 147 }
640 148  
641   - public Integer getHasSpecial() {
642   - return hasSpecial;
  149 + public Date getOnSaleTime() {
  150 + return onSaleTime;
643 151 }
644 152  
645   - public void setHasSpecial(Integer hasSpecial) {
646   - this.hasSpecial = hasSpecial;
  153 + public void setOnSaleTime(Date onSaleTime) {
  154 + this.onSaleTime = onSaleTime;
647 155 }
648 156  
649   -// public void setExtend(String extend){
650   -// if(!"".equals(extend) && extend!=null){
651   -// String[] strings = extend.split("\\|");
652   -// this.setSingleBoxWeight("-1".equals(strings[0])?null:strings[0]);
653   -// this.setSingleBoxCount("-1".equals(strings[1])?null:strings[1]);
654   -// }
655   -// }
656 157  
657   - public Long getUnitTog() {
658   - return unitTog;
659   - }
  158 + public List<String> getPictures() {
  159 + return pictures;
  160 + }
660 161  
661   - public void setUnitTog(Long unitTog) {
662   - this.unitTog = unitTog;
663   - }
  162 + public void setPictures(List<String> pictures) {
  163 + this.pictures = pictures;
  164 + }
664 165  
665   - public Integer getHasExpress() {
666   - return hasExpress;
667   - }
  166 + public List<Sku> getSkus() {
  167 + return skus;
  168 + }
668 169  
669   - public void setHasExpress(Integer hasExpress) {
670   - this.hasExpress = hasExpress;
671   - }
  170 + public void setSkus(List<Sku> skus) {
  171 + this.skus = skus;
  172 + }
672 173  
673   - public String getLocalityName() {
674   - return localityName;
675   - }
  174 + public List<Attribute> getSaleAtt() {
  175 + return saleAtt;
  176 + }
676 177  
677   - public void setLocalityName(String localityName) {
678   - this.localityName = localityName;
679   - }
  178 + public void setSaleAtt(List<Attribute> saleAtt) {
  179 + this.saleAtt = saleAtt;
  180 + }
680 181  
681   - public int getIsAllowDelivery() {
682   - return isAllowDelivery;
683   - }
684 182  
685   - public void setIsAllowDelivery(int isAllowDelivery) {
686   - this.isAllowDelivery = isAllowDelivery;
687   - }
  183 + public Date getCtime() {
  184 + return ctime;
  185 + }
688 186  
689   - public ProductSample getProductSampleObj() {
690   - return productSampleObj;
691   - }
  187 + public void setCtime(Date ctime) {
  188 + this.ctime = ctime;
  189 + }
692 190  
693   - public void setProductSampleObj(ProductSample productSampleObj) {
694   - this.productSampleObj = productSampleObj;
695   - }
  191 + public Date getUtime() {
  192 + return utime;
  193 + }
696 194  
697   - public int getProductType() {
698   - return productType;
699   - }
  195 + public void setUtime(Date utime) {
  196 + this.utime = utime;
  197 + }
700 198  
701   - public void setProductType(int productType) {
702   - this.productType = productType;
703   - }
704 199  
705   - public int getProductSample() {
706   - return productSample;
707   - }
  200 +// public void setExtend(String extend){
  201 +// if(!"".equals(extend) && extend!=null){
  202 +// String[] strings = extend.split("\\|");
  203 +// this.setSingleBoxWeight("-1".equals(strings[0])?null:strings[0]);
  204 +// this.setSingleBoxCount("-1".equals(strings[1])?null:strings[1]);
  205 +// }
  206 +// }
708 207  
709   - public void setProductSample(int productSample) {
710   - this.productSample = productSample;
711   - }
712 208  
713   - public ProductPopGroupBuying getProductPopGroupBuying() {
714   - return productPopGroupBuying;
715   - }
  209 + public int getProductType() {
  210 + return productType;
  211 + }
716 212  
717   - public void setProductPopGroupBuying(ProductPopGroupBuying productPopGroupBuying) {
718   - this.productPopGroupBuying = productPopGroupBuying;
719   - }
  213 + public void setProductType(int productType) {
  214 + this.productType = productType;
  215 + }
720 216  
721   - public Long getLocalityArea() {
722   - return localityArea;
723   - }
724 217  
725   - public void setLocalityArea(Long localityArea) {
726   - this.localityArea = localityArea;
727   - }
728 218 }
... ...
titan-sdk/src/main/java/com/diligrp/titan/sdk/input/UpdateProductInput.java
... ... @@ -17,10 +17,6 @@ public class UpdateProductInput {
17 17 */
18 18 private String name;
19 19  
20   - /**
21   - * 区间报价商品价格区间
22   - */
23   - private List<PriceRangInput> priceRangs;
24 20  
25 21 /**
26 22 * 规格报价商品sku价格
... ... @@ -53,14 +49,6 @@ public class UpdateProductInput {
53 49 this.name = name;
54 50 }
55 51  
56   - public List<PriceRangInput> getPriceRangs() {
57   - return priceRangs;
58   - }
59   -
60   - public void setPriceRangs(List<PriceRangInput> priceRangs) {
61   - this.priceRangs = priceRangs;
62   - }
63   -
64 52 public List<SkuInfoInput> getSkuinfos() {
65 53 return skuinfos;
66 54 }
... ...
titan-sdk/src/main/java/com/diligrp/titan/sdk/service/CategoryService.java
... ... @@ -26,12 +26,6 @@ public interface CategoryService {
26 26 */
27 27 public BaseOutput<List<Category>> listAll(int cid,int shopId);
28 28  
29   - /**
30   - * 获取类目的面包屑
31   - * @param cid 父类目id,0表示根节点
32   - * @return {@link Category}
33   - */
34   - public BaseOutput<List<Category>> listCrumbs(int cid);
35 29  
36 30 /**
37 31 * 获取类目下一级子类目
... ... @@ -40,7 +34,6 @@ public interface CategoryService {
40 34 */
41 35 public BaseOutput<List<Category>> listChildren(int cid,int shopId);
42 36  
43   - public BaseOutput<Object> addCategory(Category category);
44 37  
45 38 /**
46 39 * 获取类目的属性
... ... @@ -59,13 +52,6 @@ public interface CategoryService {
59 52 */
60 53 public BaseOutput<HashMap<String, List<Attribute>>> listAttributes(int cid,boolean includeDel);
61 54  
62   - /**
63   - * 批量获取类目的属性与类目信息
64   - * @param cids
65   - * @return
66   - * @author celine
67   - */
68   - public BaseOutput<List<Category>> listCategoriesInfo(List<Integer> cids);
69 55  
70 56 /**
71 57 * 获取单个类目的属性与类目信息
... ...
titan-sdk/src/main/java/com/diligrp/titan/sdk/service/ProductService.java
... ... @@ -24,14 +24,7 @@ import java.util.Map;
24 24 */
25 25 public interface ProductService {
26 26  
27   - /**
28   - * 查询上架自定义类目下的商品总数
29   - * @param vcid 自定义商品分类id
30   - * @return
31   - * @createTime 2014年6月10日 上午10:44:59
32   - * @author celine
33   - */
34   - BaseOutput<Long> countVirtualCatProducts(long vcid);
  27 +
35 28  
36 29  
37 30 /**
... ... @@ -61,12 +54,6 @@ public interface ProductService {
61 54 */
62 55 BaseOutput<Object> insertPopProduct(PopProductView product, String sellerId);
63 56  
64   - /**
65   - * 更新第三方卖家商品
66   - * @param product {@link PopProductView}卖家商品信息
67   - * @return
68   - */
69   - BaseOutput<Object> updatePopProduct(PopProductView product);
70 57  
71 58 /**
72 59 * 更新商品上下架状态
... ... @@ -91,15 +78,6 @@ public interface ProductService {
91 78 */
92 79 BaseOutput<List<Product>> listLatestProduct(long shop, int num);
93 80  
94   - /**
95   - * 批量设置买卖对接商品的自定义分类
96   - * @param pids 买卖对接商品ID列表
97   - * @param vcid 自定义分类ID
98   - * @return
99   - * @createTime 2014年6月12日 下午4:28:03
100   - * @author celine
101   - */
102   - BaseOutput<Object> setProductVirtualCid(List<Long> pids, long vcid);
103 81  
104 82 /**
105 83 * this method is 删除商品信息(第三方产品)
... ... @@ -111,24 +89,6 @@ public interface ProductService {
111 89 */
112 90 BaseOutput<Object> delProductInfo(List<Long> pids, String sellerID);
113 91  
114   - /**
115   - * this method is 根据分类ID获取设置好的商品搜索排序
116   - *@param type 排序类型
117   - *@param cid 排序类型标识
118   - * @return
119   - * @createTime 2014年9月18日 上午11:04:01
120   - * @author chenzhiwei
121   - */
122   - BaseOutput<List<ProductSearchSort>> getProductSearchSort(Long cid, TopTypeEnum type);
123   -
124   - /**
125   - * this method is 更新规格报价商品价格
126   - * @param input
127   - * @return
128   - * @createTime 2015年4月20日 下午5:48:42
129   - * @author yjj
130   - */
131   - BaseOutput<Object> updatePrice(ProductPriceInput input);
132 92  
133 93  
134 94  
... ... @@ -142,43 +102,9 @@ public interface ProductService {
142 102 * @author yjj
143 103 */
144 104 PageOutput<List<Product>> searchListPopProducts(PopProductSearchInput input, Integer page, Integer pageSize);
145   -
146   - /**
147   - * this method is 店铺id和商品状态查询商品上所挂类目名称
148   - * @param shopId
149   - * @param pstatus
150   - * @return
151   - * @createTime 2015年4月20日 下午7:55:31
152   - * @author yjj
153   - */
154   - BaseOutput<Map<Integer,String>> getPopProductCategroyByShopId(int shopId, int pstatus);
155   -
156   - /**
157   - * 获取商品详情
158   - * @param pid
159   - * @return
160   - */
161   - BaseOutput<String> getProductDesc(long pid);
162   -
163   - /**
164   - * 设置商品详情
165   - * @param pid
166   - * @return
167   - */
168   - BaseOutput<String> setProductDesc(long pid, String desc);
169   -
170   - /**
171   - * 获取商品详情
172   - * @return
173   - */
174   - PageOutput<List<Product>> getAllProductPop(int currPage, int pageSize, String[] defindResult);
175   -
176   - /**
177   - *根据店铺ID获取商品数量
178   - * @param shopId
179   - * @return
180   - */
181   - BaseOutput<Integer> getCountByShopId(Long shopId);
  105 +
  106 +
  107 +
182 108  
183 109  
184 110 /**
... ...
titan-sdk/src/main/java/com/diligrp/titan/sdk/service/StockService.java deleted 100644 → 0
1   -package com.diligrp.titan.sdk.service;
2   -
3   -import com.diligrp.titan.sdk.domain.StockInfo;
4   -import com.diligrp.titan.sdk.input.SkuChangeInput;
5   -import com.diligrp.titan.sdk.output.BaseOutput;
6   -
7   -import java.util.List;
8   -
9   -/**
10   - *
11   - * <B>Description</B> 商品库存服务<br />
12   - * <B>Copyright</B> Copyright (c) 2014 www.diligrp.com All rights reserved. <br />
13   - * 本软件源代码版权归地利集团,未经许可不得任意复制与传播.<br />
14   - * <B>Company</B> 地利集团
15   - * @createTime 2014年5月16日 下午4:50:01
16   - * @author dili-guwenwu
17   - */
18   -public interface StockService {
19   -
20   - /**
21   - * 查询sku的库存状态,支持批量查询
22   - * @param skus sku列表
23   - * @return {@link StockInfo}sku库存信息
24   - */
25   - public BaseOutput<List<StockInfo>> getStockInfo(List<String> skus);
26   -
27   - /**
28   - * 减少sku的库存量,支持批量操作
29   - * @param decraseSkus {@link SkuChangeInput}修改的sku列表和修改数量
30   - * @param serialNum 流水号,服务保证一个流水号只成功一次
31   - * @return
32   - */
33   - public BaseOutput<Object> decraseStockNum(Long serialNum, List<SkuChangeInput> decraseSkus);
34   -
35   - /**
36   - *
37   - * 增加sku的库存量,支持批量操作
38   - * @param serialNum 流水号,服务保证一个流水号只成功一次
39   - * @param incraseSkus {@link SkuChangeInput} 修改的sku列表和修改数量
40   - * @return
41   - */
42   - public BaseOutput<Object> incraseStockNum(Long serialNum, List<SkuChangeInput> incraseSkus);
43   -
44   - /**
45   - * 扣减供应商库存
46   - * @param serialNum
47   - * @param decraseSkus
48   - * @return
49   - * @createTime 2014年6月9日 上午10:51:59
50   - * @author celine
51   - */
52   - public BaseOutput<Object> decraseSupStockNum(List<SkuChangeInput> decraseSkus);
53   -
54   - /**
55   - * 增加供应商库存
56   - * @param serialNum
57   - * @param incraseSkus
58   - * @return
59   - * @createTime 2014年6月9日 上午10:52:24
60   - * @author celine
61   - */
62   - public BaseOutput<Object> incraseSupStockNum(List<SkuChangeInput> incraseSkus);
63   -}
titan-sdk/src/main/java/com/diligrp/titan/sdk/service/impl/CategoryServiceImpl.java
... ... @@ -34,16 +34,6 @@ public class CategoryServiceImpl extends ServiceExcutor implements CategoryServi
34 34 }
35 35  
36 36 @Override
37   - public BaseOutput<List<Category>> listCrumbs(int cid) {
38   - BaseOutput<List<Category>> outPut = new BaseOutput<List<Category>>();
39   - Map<String, Integer> params = new HashMap<String, Integer>();
40   - params.put("cid", cid);
41   - outPut = execute("/category/listCrumbs", params, outPut, new TypeReference<BaseOutput<List<Category>>>() {
42   - });
43   - return outPut;
44   - }
45   -
46   - @Override
47 37 public BaseOutput<List<Category>> listChildren(int cid, int shopId) {
48 38 BaseOutput<List<Category>> output = new BaseOutput<List<Category>>();
49 39 Map<String, Integer> params = new HashMap<String, Integer>();
... ... @@ -54,13 +44,6 @@ public class CategoryServiceImpl extends ServiceExcutor implements CategoryServi
54 44 return output;
55 45 }
56 46  
57   - @Override
58   - public BaseOutput<Object> addCategory(Category category) {
59   - BaseOutput<Object> output = new BaseOutput<Object>();
60   - output = execute("/category/insertCategory", category, output, new TypeReference<BaseOutput<Object>>() {
61   - });
62   - return output;
63   - }
64 47  
65 48 @Override
66 49 public BaseOutput<HashMap<String, List<Attribute>>> listAttributes(int cid) {
... ... @@ -84,16 +67,6 @@ public class CategoryServiceImpl extends ServiceExcutor implements CategoryServi
84 67 }
85 68  
86 69 @Override
87   - public BaseOutput<List<Category>> listCategoriesInfo(List<Integer> cids) {
88   - BaseOutput<List<Category>> outPut = new BaseOutput<List<Category>>();
89   - Map<String, List<Integer>> params = new HashMap<String, List<Integer>>();
90   - params.put("cids", cids);
91   - outPut = execute("/category/listCategoriesInfo", params, outPut, new TypeReference<BaseOutput<List<Category>>>() {
92   - });
93   - return outPut;
94   - }
95   -
96   - @Override
97 70 public BaseOutput<Category> getCategoryInfo(int cid) {
98 71 BaseOutput<Category> outPut = new BaseOutput<Category>();
99 72 Map<String, Integer> params = new HashMap<String, Integer>();
... ...
titan-sdk/src/main/java/com/diligrp/titan/sdk/service/impl/ProductServiceImpl.java
... ... @@ -53,13 +53,6 @@ public class ProductServiceImpl extends ServiceExcutor implements ProductService
53 53 return output;
54 54 }
55 55  
56   - @Override
57   - public BaseOutput<Object> updatePopProduct(PopProductView product) {
58   - BaseOutput<Object> output = new BaseOutput<Object>();
59   - output = execute("/product/updatePopProduct", product, output, new TypeReference<BaseOutput<Object>>() {
60   - });
61   - return output;
62   - }
63 56  
64 57 @Override
65 58 public BaseOutput<Map<String, Product>> getSkuInfoMap(List<String> skus) {
... ... @@ -71,15 +64,6 @@ public class ProductServiceImpl extends ServiceExcutor implements ProductService
71 64 return output;
72 65 }
73 66  
74   - @Override
75   - public BaseOutput<Long> countVirtualCatProducts(long vcid) {
76   - BaseOutput<Long> output = new BaseOutput<Long>();
77   - HashMap<String, Long> params = new HashMap<String, Long>();
78   - params.put("vcid", vcid);
79   - output = execute("/product/countVirtualCatProducts", params, output, new TypeReference<BaseOutput<Long>>() {
80   - });
81   - return output;
82   - }
83 67  
84 68 @Override
85 69 public BaseOutput<Object> updatePopProductStatus(int status, List<Long> pids, long sellerId) {
... ... @@ -93,16 +77,6 @@ public class ProductServiceImpl extends ServiceExcutor implements ProductService
93 77 return output;
94 78 }
95 79  
96   - @Override
97   - public BaseOutput<Object> setProductVirtualCid(List<Long> pids, long vcid) {
98   - BaseOutput<Object> output = new BaseOutput<Object>();
99   - HashMap<String, Object> params = new HashMap<String, Object>();
100   - params.put("pids", pids);
101   - params.put("vcid", vcid);
102   - output = execute("/product/setProductVirtualCid", params, output, new TypeReference<BaseOutput<Object>>() {
103   - });
104   - return output;
105   - }
106 80  
107 81  
108 82  
... ... @@ -117,25 +91,6 @@ public class ProductServiceImpl extends ServiceExcutor implements ProductService
117 91 return output;
118 92 }
119 93  
120   - @Override
121   - public BaseOutput<List<ProductSearchSort>> getProductSearchSort(Long cid,TopTypeEnum type) {
122   - BaseOutput<List<ProductSearchSort>> output = new BaseOutput<List<ProductSearchSort>>();
123   - HashMap<String, Object> params = new HashMap<String, Object>();
124   - params.put("cid",cid);
125   - params.put("type",type.getCode());
126   - output = execute("/product/getProductSearchSort", params, output, new TypeReference<BaseOutput<List<ProductSearchSort>>>() {
127   - });
128   - return output;
129   - }
130   -
131   - @Override
132   - public BaseOutput<Object> updatePrice(ProductPriceInput input) {
133   - BaseOutput<Object> output = new BaseOutput<Object>();
134   - output = execute("/product/updatePrice", input,
135   - output, new TypeReference<BaseOutput<Object>>() {
136   - });
137   - return output;
138   - }
139 94  
140 95  
141 96 @Override
... ... @@ -146,60 +101,6 @@ public class ProductServiceImpl extends ServiceExcutor implements ProductService
146 101 });
147 102 return output;
148 103 }
149   - @Override
150   - public BaseOutput<Map<Integer, String>> getPopProductCategroyByShopId(
151   - int shopId, int pstatus) {
152   - BaseOutput<Map<Integer, String>> output = new BaseOutput<Map<Integer, String>>();
153   - HashMap<String, Integer> params = new HashMap<String, Integer>();
154   - params.put("shopId", shopId);
155   - params.put("pstatus", pstatus);
156   - output = execute("/product/getPopProductCategroyByShopId", params, output, new TypeReference<BaseOutput<Map<Integer, String>>>() {
157   - });
158   - return output;
159   - }
160   -
161   - @Override
162   - public BaseOutput<String> getProductDesc(long pid) {
163   - BaseOutput<String> output = new BaseOutput<String>();
164   - HashMap<String, Long> params = new HashMap<String, Long>();
165   - params.put("pid", pid);
166   - output = execute("/product/getProductDesc", params, output, new TypeReference<BaseOutput<String>>() {
167   - });
168   - return output;
169   - }
170   -
171   - @Override
172   - public BaseOutput<String> setProductDesc(long pid,String desc) {
173   - BaseOutput<String> output = new BaseOutput<String>();
174   - HashMap<String, String> params = new HashMap<String, String>();
175   - params.put("pid", String.valueOf(pid));
176   - params.put("desc", desc);
177   - output = execute("/product/setProductDesc", params, output, new TypeReference<BaseOutput<String>>() {
178   - });
179   - return output;
180   - }
181   -
182   - @Override
183   - public PageOutput<List<Product>> getAllProductPop(int currPage, int pageSize, String[] defindResult) {
184   - PageOutput<List<Product>> output = new PageOutput<List<Product>>();
185   - HashMap<String, Object> params = new HashMap<String, Object>();
186   - params.put("page", currPage);
187   - params.put("pageSize", pageSize);
188   - params.put("defindResult", defindResult);
189   - output = execute("/product/getAllProductPop", params, output, new TypeReference<PageOutput<List<Product>>>() {
190   - });
191   - return output;
192   - }
193   -
194   - @Override
195   - public BaseOutput<Integer> getCountByShopId(Long shopId) {
196   - BaseOutput<Integer> output = new BaseOutput<Integer>();
197   - HashMap<String, Long> params = new HashMap<String, Long>();
198   - params.put("shopId", shopId);
199   - output = execute("/product/getCountByShopId", params, output, new TypeReference<BaseOutput<Integer>>() {
200   - });
201   - return output;
202   - }
203 104  
204 105  
205 106 @Override
... ...
titan-sdk/src/main/java/com/diligrp/titan/sdk/service/impl/StockServiceImpl.java deleted 100644 → 0
1   -package com.diligrp.titan.sdk.service.impl;
2   -
3   -import com.alibaba.fastjson.TypeReference;
4   -import com.diligrp.titan.sdk.domain.StockInfo;
5   -import com.diligrp.titan.sdk.input.SkuChangeInput;
6   -import com.diligrp.titan.sdk.output.BaseOutput;
7   -import com.diligrp.titan.sdk.service.ServiceExcutor;
8   -import com.diligrp.titan.sdk.service.StockService;
9   -
10   -import java.util.List;
11   -
12   -public class StockServiceImpl extends ServiceExcutor implements StockService {
13   -
14   - public StockServiceImpl(String accesskey, String secretkey) {
15   - super(accesskey, secretkey);
16   - }
17   -
18   - public StockServiceImpl(String accesskey, String secretkey,int timeOut) {
19   - super(accesskey, secretkey,timeOut);
20   - }
21   -
22   - @Override
23   - public BaseOutput<List<StockInfo>> getStockInfo(List<String> skus) {
24   - BaseOutput<List<StockInfo>> output = new BaseOutput<List<StockInfo>>();
25   - output = execute("/stock/info", skus, output, new TypeReference<BaseOutput<List<StockInfo>>>() {
26   - });
27   - return output;
28   - }
29   -
30   - @Override
31   - public BaseOutput<Object> decraseStockNum(Long serialNum, List<SkuChangeInput> decraseSkus) {
32   - BaseOutput<Object> output = new BaseOutput<Object>();
33   - output = execute("/stock/decrase/" + serialNum, decraseSkus, output, new TypeReference<BaseOutput<Object>>() {
34   - });
35   - return output;
36   - }
37   -
38   - @Override
39   - public BaseOutput<Object> incraseStockNum(Long serialNum, List<SkuChangeInput> incraseSkus) {
40   - BaseOutput<Object> output = new BaseOutput<Object>();
41   - output = execute("/stock/incrase/" + serialNum, incraseSkus, output, new TypeReference<BaseOutput<Object>>() {
42   - });
43   - return output;
44   - }
45   -
46   - @Override
47   - public BaseOutput<Object> decraseSupStockNum(List<SkuChangeInput> decraseSkus) {
48   - BaseOutput<Object> output = new BaseOutput<Object>();
49   - output = execute("/stock/decraseSup", decraseSkus, output, new TypeReference<BaseOutput<Object>>() {
50   - });
51   - return output;
52   - }
53   -
54   - @Override
55   - public BaseOutput<Object> incraseSupStockNum(List<SkuChangeInput> incraseSkus) {
56   - BaseOutput<Object> output = new BaseOutput<Object>();
57   - output = execute("/stock/incraseSup", incraseSkus, output, new TypeReference<BaseOutput<Object>>() {
58   - });
59   - return output;
60   - }
61   -}
titan-sdk/src/test/java/com/diligrp/titan/sdk/TestCategoryService.java
... ... @@ -99,34 +99,7 @@ public class TestCategoryService {
99 99 JSON.toJSONString(output));
100 100 }
101 101  
102   - /**
103   - * this method is 获取类目的面包屑
104   - *
105   - * @createTime 2014年7月22日 下午4:08:55
106   - * @author yangjianjun
107   - */
108   - @Test
109   - public void testListCrumbs() {
110   - BaseOutput<List<Category>> output = categoryService.listCrumbs(1);
111   - logger.info("Test category listCrumbs:" +
112   - JSON.toJSONString(output));
113   - }
114 102  
115   - /**
116   - * this method is 批量获取类目的属性与类目信息
117   - *
118   - * @createTime 2014年7月22日 下午4:12:33
119   - * @author yangjianjun
120   - */
121   - @Test
122   - public void testListCategoriesInfo() {
123   - List<Integer> cids = new ArrayList<Integer>();
124   - cids.add(1);
125   - cids.add(2);
126   - BaseOutput<List<Category>> output = categoryService.listCategoriesInfo(cids);
127   - logger.info("Test category listCategoriesInfo:" +
128   - JSON.toJSONString(output));
129   - }
130 103  
131 104 /**
132 105 * this method is 获取单个类目的属性与类目信息
... ... @@ -160,7 +133,7 @@ public class TestCategoryService {
160 133 */
161 134 @Test
162 135 public void testSearchCategoryInfo() {
163   - BaseOutput<List<Category>> output = categoryService.searchCategoryInfo("");
  136 + BaseOutput<List<Category>> output = categoryService.searchCategoryInfo("");
164 137 logger.info(JSON.toJSONString(output));
165 138 }
166 139  
... ...
titan-sdk/src/test/java/com/diligrp/titan/sdk/TestProductService.java
... ... @@ -25,7 +25,7 @@ public class TestProductService {
25 25 static String accesskey = "9c379f079214447fad2959c4621cd6feVb797oH1";
26 26 static String secretkey = "5e998dbbafb44ca783099afcdead40fa7A3Vf7Fh";
27 27  
28   - static TitanClient client = new TitanClient(accesskey, secretkey, "http://127.0.0.1");
  28 + static TitanClient client = new TitanClient(accesskey, secretkey, "http://api.titan.zandeapp.com");
29 29 // static TitanClient client = new TitanClient(accesskey, secretkey);
30 30 static ProductService product = client.getProductService();
31 31  
... ... @@ -91,7 +91,7 @@ public class TestProductService {
91 91 @Test
92 92 public void getSkuInfoMap() {
93 93 List<String> skus = new ArrayList<String>();
94   - skus.add("iNlROUCy");
  94 + skus.add("1aRTwQcZcn4B");
95 95 BaseOutput<Map<String, Product>> base = client.getProductService().getSkuInfoMap(skus);
96 96 System.out.println(base);
97 97 }
... ... @@ -106,25 +106,7 @@ public class TestProductService {
106 106 // }
107 107 }
108 108  
109   - @Test
110   - public void getSearchSort() {
111   - client.getProductService().getProductSearchSort(1l, TopTypeEnum.CATE);
112   - }
113 109  
114   - @Test
115   - public void updatePopProduct() {
116   -// //
117   -// List<Long> pids = new ArrayList<Long>();
118   -// pids.add(1000005985L);
119   -// BaseOutput<List<Product>> base = client.getProductService().getProductInfo(pids, null);
120   -// Product product=base.getData().get(0);
121   -
122   - PopProductView popProductView = new PopProductView();
123   - popProductView.setPid(1000005985L);
124   - popProductView.setCid(69);
125   -
126   - System.out.println(client.getProductService().updatePopProduct(popProductView));
127   - }
128 110  
129 111 @Test
130 112 public void testInsertPopProduct() {
... ...