Selaa lähdekoodia

1.自测问题修改

yuanliang 1 vuosi sitten
vanhempi
commit
141c06af8a

+ 4 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/vo/TeacherVo.java

@@ -4,6 +4,7 @@ import com.fasterxml.jackson.annotation.JsonFormat;
 import com.yonge.cooleshow.biz.dal.entity.Teacher;
 import com.yonge.cooleshow.biz.dal.entity.TeacherStyleVideo;
 import com.yonge.cooleshow.biz.dal.enums.GenderEnum;
+import com.yonge.cooleshow.common.enums.ESettlementFrom;
 import com.yonge.cooleshow.common.enums.UserLockFlag;
 import com.yonge.cooleshow.common.enums.UserStatusEnum;
 import com.yonge.cooleshow.common.enums.YesOrNoEnum;
@@ -89,6 +90,9 @@ public class TeacherVo extends Teacher {
     @ApiModelProperty("机构名称")
     private String tenantName;
 
+    @ApiModelProperty("结算方式,TEACHER:结算给老师,TENANT:结算给机构")
+    private ESettlementFrom settlementFrom;
+
 
     public YesOrNoEnum getDelFlag() {
         return delFlag;

+ 22 - 29
cooleshow-user/user-biz/src/main/resources/config/mybatis/TenantInfoMapper.xml

@@ -69,35 +69,28 @@
     </update>
 
     <select id="selectPage" resultType="com.yonge.cooleshow.biz.dal.wrapper.TenantInfoWrapper$TenantInfo">
-		SELECT
-            id_ as id,
-        	name_ AS name,
-        	logo_ AS logo,
-        	brief_Introduction_ AS briefIntroduction,
-        	username_ AS username,
-        	phone_ AS phone,
-            province_code_ AS provinceCode,
-            city_code_ AS cityCode,
-            region_code_ AS regionCode
-		FROM tenant_info t
-		where 1=1
-        <if test="param.keyword != null and param.keyword  != ''">
-            and (
-            t.name_ like concat('%',#{param.keyword},'%')
-            or t.username_ like concat('%',#{param.keyword},'%')
-            or t.phone_ like concat('%',#{param.keyword},'%')
-            )
-        </if>
-        <if test="param.provinceCode != null and param.provinceCode != ''
-               and param.cityCode != null and param.cityCode != ''
-               and param.regionCode != null and param.regionCode != ''">
-            and
-            t.province_code_ = #{param.provinceCode}
-            and
-            t.city_code_ = #{param.cityCode}
-            and
-            t.region_code_ = #{param.regionCode}
-        </if>
+        SELECT
+        <include refid="baseColumns"/>
+        FROM tenant_info t
+        <where>
+            <if test="param.keyword != null and param.keyword  != ''">
+                and (
+                t.name_ like concat('%',#{param.keyword},'%')
+                or t.username_ like concat('%',#{param.keyword},'%')
+                or t.phone_ like concat('%',#{param.keyword},'%')
+                )
+            </if>
+            <if test="param.provinceCode != null">
+                and t.province_code_ = #{param.provinceCode}
+            </if>
+            <if test="param.cityCode != null">
+                and t.city_code_ = #{param.cityCode}
+            </if>
+            <if test="param.regionCode != null">
+                and t.region_code_ = #{param.regionCode}
+            </if>
+        </where>
+
 	</select>
     <select id="queryTeacherCounts" resultType="java.lang.Integer">
         SELECT count(t.tenant_id_) FROM teacher t where t.tenant_id_ IN (<foreach collection="listId" separator="," item="Id">#{Id}</foreach>)

+ 4 - 0
cooleshow-user/user-tenant/src/main/java/com/yonge/cooleshow/tenant/controller/StudentController.java

@@ -19,6 +19,7 @@ import com.yonge.toolset.base.page.PageInfo;
 import com.yonge.toolset.mybatis.support.PageUtil;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
+import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.GetMapping;
@@ -63,6 +64,9 @@ public class StudentController extends BaseController {
         List<StudentVo> rows = pages.getRecords();
 
         for (StudentVo vo : rows) {
+            if (StringUtils.isNotEmpty(vo.getPhone())) {
+                vo.setPhone(vo.getPhone().replaceAll("(\\d{3})\\d{4}(\\d{4})", "$1****$2"));
+            }
             if (vo.getDelFlag() == YesOrNoEnum.YES) {
                 vo.setUserStatus(UserStatusEnum.CLOSED);
             } else {

+ 4 - 0
cooleshow-user/user-tenant/src/main/java/com/yonge/cooleshow/tenant/controller/TeacherController.java

@@ -23,6 +23,7 @@ import com.yonge.toolset.base.page.PageInfo;
 import com.yonge.toolset.mybatis.support.PageUtil;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
+import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.util.CollectionUtils;
 import org.springframework.web.bind.annotation.GetMapping;
@@ -89,6 +90,9 @@ public class TeacherController extends BaseController {
         List<TeacherVo> rows = pages.getRecords();
 
         for (TeacherVo vo : rows) {
+            if (StringUtils.isNotEmpty(vo.getPhone())) {
+                vo.setPhone(vo.getPhone().replaceAll("(\\d{3})\\d{4}(\\d{4})", "$1****$2"));
+            }
             if (vo.getDelFlag() == YesOrNoEnum.YES) {
                 vo.setUserStatus(UserStatusEnum.CLOSED);
             } else {