|
|
@@ -177,6 +177,21 @@ public class ChinaumsSenselessPayService extends SuperService {
|
|
|
return ResultContent.buildFail("银联请求失败");
|
|
|
}
|
|
|
|
|
|
+ public boolean isSigned(String projectOid, String userId){
|
|
|
+ String accountName = orgPayAccountService.queryOgPayAccount(projectOid, PaymentType.UnionFrictionlessPay);
|
|
|
+ com.github.microservice.pay.client.ret.ResultContent<AccountModel> accountModelResultContent = payProductAccountService.get(accountName);
|
|
|
+ if (!accountModelResultContent.getState().equals(ResultState.Success)) {
|
|
|
+ throw new RuntimeException(accountModelResultContent.getMsg());
|
|
|
+ }
|
|
|
+ ChinaumsSenselessConf conf = (ChinaumsSenselessConf) accountModelResultContent.getContent().getConf();
|
|
|
+ String mid = conf.getMchId();
|
|
|
+ ChinaumsSenselessUserSignInfo topByUserIdAndMidAndExpire = chinaumsSenselessUserSignInfoDao.findTopByUserIdAndMidAndExpire(userId, mid, false);
|
|
|
+ if (topByUserIdAndMidAndExpire.getContractState().equals(ContractState.SIGNED)) {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 解约
|
|
|
*/
|