File tree Expand file tree Collapse file tree
dubbo-hmily-demo/dubbo-account/src/main/java/io/dobson/account/service/impl Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33import io .dobson .account .entity .AccountInfo ;
44import io .dobson .account .mapper .AccountInfoMapper ;
55import io .dobson .account .service .AccountService ;
6+ import lombok .extern .slf4j .Slf4j ;
67import org .apache .dubbo .config .annotation .DubboService ;
8+ import org .dromara .hmily .annotation .HmilyTCC ;
79import org .springframework .stereotype .Service ;
810
911import javax .annotation .Resource ;
1012
1113@ Service
1214@ DubboService (version = "1.0.0" )
15+ @ Slf4j
1316public class AccountServiceImpl implements AccountService {
1417
1518 @ Resource
1619 private AccountInfoMapper accountInfoMapper ;
1720
1821 @ Override
22+ @ HmilyTCC (confirmMethod = "confirmMethod" , cancelMethod = "cancelMethod" )
1923 public boolean pay (AccountInfo accountInfo ) {
2024 return accountInfoMapper .exchange (accountInfo );
2125 }
26+
27+ public void confirmMethod (){
28+ log .info ("confirm 交易操作================" );
29+ }
30+
31+ public void cancelMethod (){
32+ log .info ("cancel 交易操作==================" );
33+ }
2234}
You can’t perform that action at this time.
0 commit comments