blob: 7a2feb45c3e3b2b6a0f83fb42d8044174637c8ba [file] [log] [blame]
package io.seata.sample.controller;
import io.seata.sample.service.AccountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* @author jimin.jm@alibaba-inc.com
* @date 2019/06/14
*/
@RestController
public class AccountController {
@Autowired
private AccountService accountService;
@RequestMapping(value = "/reduce", produces = "application/json")
public Boolean debit(String userId, int money) {
accountService.reduce(userId, money);
return true;
}
}