Browse Source

submitSetDetail接口修改,用户提现页面查询

weifanli 3 năm trước cách đây
mục cha
commit
4dcac569e7

+ 3 - 3
cooleshow-auth/auth-api/src/main/java/com/yonge/cooleshow/auth/api/dto/UserSetReq.java

@@ -15,7 +15,7 @@ public class UserSetReq {
     @ApiModelProperty("昵称")
     private String username;
     @ApiModelProperty(value = "性别 0女 1男")
-    private UserGenderEnum gender;
+    private Integer gender;
 
     public String getAvatar() {
         return avatar;
@@ -33,11 +33,11 @@ public class UserSetReq {
         this.username = username;
     }
 
-    public UserGenderEnum getGender() {
+    public Integer getGender() {
         return gender;
     }
 
-    public void setGender(UserGenderEnum gender) {
+    public void setGender(Integer gender) {
         this.gender = gender;
     }
 }

+ 50 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dto/search/TeacherWithdrawalSearch.java

@@ -1,7 +1,13 @@
 package com.yonge.cooleshow.biz.dal.dto.search;
 
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.yonge.cooleshow.biz.dal.enums.AuthStatusEnum;
 import com.yonge.cooleshow.common.page.QueryInfo;
 import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.util.Date;
 
 /**
  * @Author: liweifan
@@ -11,4 +17,48 @@ import io.swagger.annotations.ApiModel;
 public class TeacherWithdrawalSearch extends QueryInfo{
 	private static final long serialVersionUID = 1L;
 
+	@ApiModelProperty("银行(交易)流水号 ")
+	private String bankFlowNo;
+	@ApiModelProperty("状态 DOING、审核中 PASS、通过 UNPASS、不通过")
+	private AuthStatusEnum status;
+	@ApiModelProperty(value = "申请开始时间")
+	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+	private Date startTime;
+	@ApiModelProperty(value = "申请结束时间")
+	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+	private Date endTime;
+
+	public String getBankFlowNo() {
+		return bankFlowNo;
+	}
+
+	public void setBankFlowNo(String bankFlowNo) {
+		this.bankFlowNo = bankFlowNo;
+	}
+
+	public AuthStatusEnum getStatus() {
+		return status;
+	}
+
+	public void setStatus(AuthStatusEnum status) {
+		this.status = status;
+	}
+
+	public Date getStartTime() {
+		return startTime;
+	}
+
+	public void setStartTime(Date startTime) {
+		this.startTime = startTime;
+	}
+
+	public Date getEndTime() {
+		return endTime;
+	}
+
+	public void setEndTime(Date endTime) {
+		this.endTime = endTime;
+	}
 }

+ 1 - 3
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/StudentServiceImpl.java

@@ -47,9 +47,7 @@ public class StudentServiceImpl extends ServiceImpl<StudentDao, Student> impleme
         StudentHomeVo studentHomeVo = new StudentHomeVo();
         try {
             BeanUtils.copyProperties(studentHomeVo, student);
-        } catch (IllegalAccessException e) {
-            e.printStackTrace();
-        } catch (InvocationTargetException e) {
+        } catch (Exception e) {
             e.printStackTrace();
         }
         studentHomeVo.setHeardUrl(user.getAvatar());

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

@@ -2,13 +2,45 @@ package com.yonge.cooleshow.biz.dal.vo;
 
 import com.yonge.cooleshow.biz.dal.entity.UserWithdrawal;
 import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
 
 /**
  * @Author: liweifan
  * @Data: 2022-03-30 13:53:51
  */
-@ApiModel(value = "TeacherWithdrawalVo对象", description = "老师账户提现表查询视图对象")
+@ApiModel(value = "UserWithdrawalVo对象", description = "账户提现表查询视图对象")
 public class UserWithdrawalVo extends UserWithdrawal {
+
 	private static final long serialVersionUID = 1L;
 
+	@ApiModelProperty("银行名称 ")
+	private String bankName;
+	@ApiModelProperty("提现人 ")
+	private String	withdrawaUser;
+	@ApiModelProperty("转账人 ")
+	private String verifyUser;
+
+	public String getBankName() {
+		return bankName;
+	}
+
+	public void setBankName(String bankName) {
+		this.bankName = bankName;
+	}
+
+	public String getWithdrawaUser() {
+		return withdrawaUser;
+	}
+
+	public void setWithdrawaUser(String withdrawaUser) {
+		this.withdrawaUser = withdrawaUser;
+	}
+
+	public String getVerifyUser() {
+		return verifyUser;
+	}
+
+	public void setVerifyUser(String verifyUser) {
+		this.verifyUser = verifyUser;
+	}
 }

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

@@ -39,9 +39,37 @@
         where t.id_ = #{id}
     </select>
 
-    <select id="selectPage" resultMap="BaseResultMap">
+    <select id="selectPage" resultType="com.yonge.cooleshow.biz.dal.vo.UserWithdrawalVo">
         SELECT
-        <include refid="baseColumns" />
+            <include refid="baseColumns" />,
+            bc.bank_name_ as bankName,
+            u.username_  as withdrawaUser,
+            (
+                SELECT u.username_ FROM sys_user u WHERE u.id_ = t.verify_user_id_
+            ) as verifyUser
         FROM user_withdrawal t
+        left join sys_user u on u.id_ = t.user_id_
+        LEFT JOIN user_bank_card bc on t.bank_card_ = bc.bank_card_
+        <where>
+            <if test="null != param.search and '' != param.search">
+                AND (
+                t.user_id_ LIKE CONCAT('%', #{param.search}, '%') or
+                u.username_ LIKE CONCAT('%', #{param.search}, '%') or
+                u.phone_ LIKE CONCAT('%', #{param.search}, '%')
+                )
+            </if>
+            <if test="null != param.bankFlowNo and '' != param.bankFlowNo">
+                AND t.bank_flow_no_ LIKE CONCAT('%', #{param.bankFlowNo}, '%')
+            </if>
+            <if test="param.startTime !=null">
+                <![CDATA[AND t.create_time_ >= #{param.startTime} ]]>
+            </if>
+            <if test="param.endTime !=null">
+                <![CDATA[AND t.create_time_ <= #{param.endTime} ]]>
+            </if>
+            <if test="param.status !=null">
+                AND t.status_ = #{param.status}
+            </if>
+        </where>
     </select>
 </mapper>

+ 0 - 3
cooleshow-user/user-student/src/main/java/com/yonge/cooleshow/student/controller/StudentController.java

@@ -2,7 +2,6 @@ package com.yonge.cooleshow.student.controller;
 
 import com.yonge.cooleshow.auth.api.client.SysUserFeignService;
 import com.yonge.cooleshow.auth.api.entity.SysUser;
-import com.yonge.cooleshow.biz.dal.entity.Subject;
 import com.yonge.cooleshow.biz.dal.vo.StudentHomeVo;
 import com.yonge.cooleshow.common.controller.BaseController;
 import com.yonge.cooleshow.common.entity.HttpResponseResult;
@@ -17,8 +16,6 @@ import org.springframework.web.bind.annotation.*;
 import com.yonge.cooleshow.biz.dal.entity.Student;
 import com.yonge.cooleshow.biz.dal.service.StudentService;
 
-import java.util.List;
-
 @RestController
 @RequestMapping("/student")
 @Api(value = "学生表", tags = "学生表")