Browse Source

Merge branch 'master' of http://git.dayaedu.com/yonge/cooleshow

liujunchi 3 years ago
parent
commit
828b3a8b60

+ 4 - 4
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/UserWithdrawalServiceImpl.java

@@ -185,7 +185,7 @@ public class UserWithdrawalServiceImpl extends ServiceImpl<UserWithdrawalDao, Us
             if (authOperaReq.getPass()) {
                 //请求三方接口
                 HttpResponseResult<Boolean> withdraw = withdrawSdk.withdraw(
-                        build.getId().toString(), build.getBankName(), build.getPhone(), withdrawalUser.getIdCardNo(),
+                        build.getId().toString(), build.getRealName(), build.getPhone(), withdrawalUser.getIdCardNo(),
                         build.getActualAmount().multiply(new BigDecimal("100")).intValue(), build.getBankCard(), null
                 );
                 if (withdraw.getStatus() && withdraw.getData()) {
@@ -218,16 +218,16 @@ public class UserWithdrawalServiceImpl extends ServiceImpl<UserWithdrawalDao, Us
         if (detail == null) {
             return HttpResponseResult.failed("提现记录不存在");
         }
-        if (!detail.getAuthStatus().equals(AuthStatusEnum.PASS)) {
+        if (!AuthStatusEnum.PASS.equals(detail.getAuthStatus())) {
             return HttpResponseResult.failed("提现记录未审核");
         }
-        if (detail.getTradeStatus().equals(TradeStatusEnum.succeeded)) {
+        if (TradeStatusEnum.succeeded.equals(detail.getTradeStatus())) {
             return HttpResponseResult.failed("提现已经交易成功");
         }
 
         //不用审核的,需要请求三方
         HttpResponseResult<Boolean> withdraw = withdrawSdk.withdraw(
-                detail.getId().toString(), detail.getBankName(), detail.getPhone(), user.getIdCardNo(),
+                detail.getId().toString(), detail.getRealName(), detail.getPhone(), user.getIdCardNo(),
                 detail.getActualAmount().multiply(new BigDecimal("100")).intValue(), detail.getBankCard(), null
         );
         if (withdraw.getStatus() && withdraw.getData()) {

+ 10 - 1
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/vo/UserWithdrawalVo.java

@@ -11,7 +11,8 @@ import io.swagger.annotations.ApiModelProperty;
 @ApiModel(value = "UserWithdrawalVo对象", description = "账户结算表查询视图对象")
 public class UserWithdrawalVo extends UserWithdrawal {
 	private static final long serialVersionUID = 1L;
-
+	@ApiModelProperty("银行卡用户 ")
+	private String realName;
 	@ApiModelProperty("银行卡号 ")
 	private String bankCard;
 	@ApiModelProperty("银行名称 ")
@@ -63,4 +64,12 @@ public class UserWithdrawalVo extends UserWithdrawal {
 	public void setVerifyUser(String verifyUser) {
 		this.verifyUser = verifyUser;
 	}
+
+	public String getRealName() {
+		return realName;
+	}
+
+	public void setRealName(String realName) {
+		this.realName = realName;
+	}
 }

+ 1 - 1
cooleshow-user/user-biz/src/main/resources/config/mybatis/UserBankCardMapper.xml

@@ -18,7 +18,7 @@
     <sql id="baseColumns">
          t.id_ as id
         , t.user_id_ as userId
-        , t.name_ as name
+        , t.name_ as `name`
         , t.bank_name_ as bankName
         , t.bank_card_ as bankCard
         , t.phone_ as phone

+ 4 - 2
cooleshow-user/user-biz/src/main/resources/config/mybatis/UserBindingTeacherMapper.xml

@@ -9,11 +9,12 @@
         su.avatar_ AS avatar,
         su.phone_ AS phone,
         (SELECT group_concat(name_) FROM `subject` WHERE find_in_set(id_,s.subject_id_)) AS subjectName,
-        IFNULL(TIMESTAMPDIFF(DAY,b.last_end_class_,NOW()),TIMESTAMPDIFF(DAY,b.created_time_,NOW())) AS lastEndClass
+--         IFNULL(TIMESTAMPDIFF(DAY,b.last_end_class_,NOW()),TIMESTAMPDIFF(DAY,b.created_time_,NOW())) AS lastEndClass
+        TIMESTAMPDIFF(DAY,b.last_end_class_,NOW()) AS lastEndClass
         FROM user_binding_teacher b
         LEFT JOIN sys_user su ON b.student_id_=su.id_
         LEFT JOIN student s ON b.student_id_=s.user_id_
-        WHERE b.last_end_class_ IS NOT NULL
+        <where>
         <if test="param.subjectId != null">
            AND find_in_set(#{param.subjectId},s.subject_id_)
         </if>
@@ -29,6 +30,7 @@
                 #{item.userId}
             </foreach>
         </if>
+        </where>
     </select>
 
     <!-- 表字段 -->

+ 2 - 0
cooleshow-user/user-biz/src/main/resources/config/mybatis/UserWithdrawalMapper.xml

@@ -51,6 +51,7 @@
     <select id="detail" resultType="com.yonge.cooleshow.biz.dal.vo.UserWithdrawalVo">
         SELECT
             <include refid="baseColumns"/>,
+            bc.name_ as realName,
             bc.bank_name_ as bankName,
             bc.bank_card_ as bankCard,
             bc.phone_ as phone,
@@ -64,6 +65,7 @@
     <sql id="selectSql">
         SELECT
             <include refid="baseColumns" />,
+            bc.name_ as realName,
             bc.bank_name_ as bankName,
             bc.bank_card_ as bankCard,
             ifnull(u.real_name_,u.username_)  as withdrawaUser,