| | |
| | | import com.ks.goldcorn.exception.GoldAppException; |
| | | import com.ks.goldcorn.exception.GoldTradeException; |
| | | import com.ks.goldcorn.exception.GoldUserException; |
| | | import com.ks.goldcorn.service.remote.GoldCornBalanceService; |
| | | import com.ks.goldcorn.service.remote.GoldCornTradeService; |
| | | import com.yeshi.buwan.domain.vip.OrderType; |
| | | import com.yeshi.buwan.domain.vip.OrderRecord; |
| | |
| | | @Resource |
| | | private SystemConfigService systemConfigService; |
| | | |
| | | @Reference(version = "1.0") |
| | | @Reference(version = "1.0", check = false) |
| | | private GoldCornTradeService goldCornTradeService; |
| | | |
| | | @Reference(version = "1.0", check = false) |
| | | private GoldCornBalanceService goldCornBalanceService; |
| | | |
| | | public void init(String uid) throws Exception { |
| | | goldCornBalanceService.init(getAppCode(), getUid(uid)); |
| | | } |
| | | |
| | | |
| | | /** |
| | |
| | | return appCode; |
| | | } |
| | | |
| | | public long getBalance(String uid) { |
| | | try { |
| | | Long count = goldCornBalanceService.getBalance(getAppCode(), getUid(uid)); |
| | | if (count == null) { |
| | | init(uid); |
| | | } |
| | | return count == null ? 0 : count; |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return 0; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 金币消耗 |