|
|
@ -3,16 +3,21 @@ package cn.chjyj.szwh.controller.task; |
|
|
import cn.chjyj.szwh.controller.BaseController; |
|
|
import cn.chjyj.szwh.controller.BaseController; |
|
|
import cn.chjyj.szwh.service.GoodsService; |
|
|
import cn.chjyj.szwh.service.GoodsService; |
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
|
|
|
import org.apache.commons.logging.Log; |
|
|
|
|
|
import org.apache.commons.logging.LogFactory; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.web.bind.annotation.RequestMapping; |
|
|
import org.springframework.web.bind.annotation.RequestMapping; |
|
|
import org.springframework.web.bind.annotation.RestController; |
|
|
import org.springframework.web.bind.annotation.RestController; |
|
|
|
|
|
|
|
|
|
|
|
import java.util.Date; |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 任务控制器 |
|
|
* 任务控制器 |
|
|
*/ |
|
|
*/ |
|
|
@RestController |
|
|
@RestController |
|
|
@RequestMapping("/task/Goods") |
|
|
@RequestMapping("/task/Goods") |
|
|
public class TaskGoodsController extends BaseController { |
|
|
public class TaskGoodsController extends BaseController { |
|
|
|
|
|
private static Log log = LogFactory.getLog(TaskGoodsController.class); |
|
|
@Autowired |
|
|
@Autowired |
|
|
private GoodsService goodsService; |
|
|
private GoodsService goodsService; |
|
|
|
|
|
|
|
|
@ -22,6 +27,7 @@ public class TaskGoodsController extends BaseController { |
|
|
*/ |
|
|
*/ |
|
|
@RequestMapping("/getApiGoods") |
|
|
@RequestMapping("/getApiGoods") |
|
|
public JSONObject getApiGoods(){ |
|
|
public JSONObject getApiGoods(){ |
|
|
|
|
|
log.info("远程采集商品信息:TASKGOODS:"+new Date()); |
|
|
int ret = goodsService.getApiGoods(); |
|
|
int ret = goodsService.getApiGoods(); |
|
|
jsonObject.put("data",ret); |
|
|
jsonObject.put("data",ret); |
|
|
jsonObject.put("code",200); |
|
|
jsonObject.put("code",200); |
|
|
|