blob: 271b7e3620ab1943d7a7f54e425fac439a22e388 [file] [log] [blame]
package io.seata.sample.controller;
import io.seata.sample.service.StorageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* @author jimin.jm@alibaba-inc.com
* @date 2019/06/14
*/
@RestController
public class StorageController {
@Autowired
private StorageService storageService;
@GetMapping(path = "/deduct")
public Boolean deduct(String commodityCode, Integer count) {
storageService.deduct(commodityCode, count);
return true;
}
}