blob: fe0052250ff28e938a2ba9968df2e5d5a8252892 [file] [log] [blame]
package io.seata.sample.controller;
import io.seata.sample.service.StockService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* Description:
*
* @author fangliangsheng
* @date 2019/3/28
*/
@RestController
public class StockController {
@Autowired
private StockService stockService;
@GetMapping(path = "/deduct")
public Boolean deduct(String commodityCode, Integer count) {
stockService.deduct(commodityCode, count);
return true;
}
}