|  | @@ -7,6 +7,7 @@ import com.yonge.cooleshow.auth.api.entity.SysUser;
 | 
	
		
			
				|  |  |  import com.yonge.cooleshow.biz.dal.dto.req.WithdrawalReq;
 | 
	
		
			
				|  |  |  import com.yonge.cooleshow.biz.dal.dto.search.TeacherWithdrawalSearch;
 | 
	
		
			
				|  |  |  import com.yonge.cooleshow.biz.dal.entity.UserWithdrawalCallback;
 | 
	
		
			
				|  |  | +import com.yonge.cooleshow.biz.dal.enums.DealStatusEnum;
 | 
	
		
			
				|  |  |  import com.yonge.cooleshow.biz.dal.service.UserWithdrawalService;
 | 
	
		
			
				|  |  |  import com.yonge.cooleshow.biz.dal.support.PageUtil;
 | 
	
		
			
				|  |  |  import com.yonge.cooleshow.biz.dal.vo.UserWithdrawalVo;
 | 
	
	
		
			
				|  | @@ -29,6 +30,7 @@ import org.slf4j.LoggerFactory;
 | 
	
		
			
				|  |  |  import org.springframework.beans.factory.annotation.Autowired;
 | 
	
		
			
				|  |  |  import org.springframework.beans.factory.annotation.Value;
 | 
	
		
			
				|  |  |  import org.springframework.http.HttpStatus;
 | 
	
		
			
				|  |  | +import org.springframework.util.CollectionUtils;
 | 
	
		
			
				|  |  |  import org.springframework.web.bind.annotation.*;
 | 
	
		
			
				|  |  |  import springfox.documentation.annotations.ApiIgnore;
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -120,6 +122,7 @@ public class UserWithdrawalController extends BaseController {
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      /**
 | 
	
		
			
				|  |  |       * 异步回调接收-提现
 | 
	
		
			
				|  |  | +     *
 | 
	
		
			
				|  |  |       * @param content
 | 
	
		
			
				|  |  |       * @param request
 | 
	
		
			
				|  |  |       * @return
 | 
	
	
		
			
				|  | @@ -151,6 +154,7 @@ public class UserWithdrawalController extends BaseController {
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      /**
 | 
	
		
			
				|  |  |       * 异步回调接收-签署协议
 | 
	
		
			
				|  |  | +     *
 | 
	
		
			
				|  |  |       * @param content
 | 
	
		
			
				|  |  |       * @param request
 | 
	
		
			
				|  |  |       * @return
 | 
	
	
		
			
				|  | @@ -164,12 +168,30 @@ public class UserWithdrawalController extends BaseController {
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  |              Map<String, Object> map = JSONObject.parseObject(content);
 | 
	
		
			
				|  |  |              String jsonStr = (String) map.get("content");
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +            String return_code = (String) map.get("return_code");
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |              Map<String, Object> record = JSONObject.parseObject(jsonStr);
 | 
	
		
			
				|  |  | -            userWithdrawalService.contractCallback(record);
 | 
	
		
			
				|  |  | +            if (CollectionUtils.isEmpty(record) || null == record.get("serialNo")) {
 | 
	
		
			
				|  |  | +                log.error("签署失败,返回合同编号为空 {}", content);
 | 
	
		
			
				|  |  | +                return "failed";
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +            if ("T".equals(return_code)) {
 | 
	
		
			
				|  |  | +                userWithdrawalService.contractCallback(
 | 
	
		
			
				|  |  | +                        DealStatusEnum.SCCESS.getCode(), record.get("serialNo").toString(),
 | 
	
		
			
				|  |  | +                        record.get("contractUrl").toString(), null);
 | 
	
		
			
				|  |  | +                return "success";
 | 
	
		
			
				|  |  | +            } else {
 | 
	
		
			
				|  |  | +                String return_message = StringUtil.get(map.get("return_message"));
 | 
	
		
			
				|  |  | +                userWithdrawalService.contractCallback(
 | 
	
		
			
				|  |  | +                        DealStatusEnum.FAILED.getCode(), record.get("serialNo").toString(), null, return_message);
 | 
	
		
			
				|  |  | +                return "failed";
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  |          } catch (Exception e) {
 | 
	
		
			
				|  |  |              log.error("签署失败e:{}", e);
 | 
	
		
			
				|  |  |              return "failed";
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  | -        return "success";
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  }
 |