he2802 2 vuotta sitten
vanhempi
commit
d0cebb35e4

+ 1 - 1
zhongzheng-admin/src/main/java/com/zhongzheng/controller/distribution/DistributionSellerController.java

@@ -53,7 +53,7 @@ public class DistributionSellerController extends BaseController {
     @GetMapping("/list")
     public TableDataInfo<DistributionSellerVo> list(DistributionSellerQueryBo bo) {
         startPage();
-        List<DistributionSellerVo> list = iDistributionSellerService.queryList(bo);
+        List<DistributionSellerVo> list = iDistributionSellerService.findList(bo);
         return getDataTable(list);
     }
 

+ 5 - 0
zhongzheng-framework/src/main/java/com/zhongzheng/framework/web/service/DistributionSellerServiceImpl.java

@@ -297,6 +297,11 @@ public class DistributionSellerServiceImpl extends ServiceImpl<DistributionSelle
         return entity2Vo(this.list(lqw));
     }
 
+    @Override
+    public List<DistributionSellerVo> findList(DistributionSellerQueryBo bo) {
+        return baseMapper.findList(bo);
+    }
+
     /**
     * 实体类转化成视图对象
     *

+ 1 - 1
zhongzheng-framework/src/main/java/com/zhongzheng/framework/web/service/UserDetailsServiceImpl.java

@@ -57,7 +57,7 @@ public class UserDetailsServiceImpl implements UserDetailsService
     }
 
     public UserDetails createLoginUser(SysUser user)
-    { 
+    {
         return new LoginUser(user, permissionService.getMenuPermission(user));
     }
 

+ 3 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/distribution/mapper/DistributionSellerMapper.java

@@ -1,6 +1,7 @@
 package com.zhongzheng.modules.distribution.mapper;
 
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.zhongzheng.modules.distribution.bo.DistributionSellerQueryBo;
 import com.zhongzheng.modules.distribution.domain.DistributionSeller;
 import com.zhongzheng.modules.distribution.vo.DistributionSellerVo;
 import com.zhongzheng.modules.top.distribution.bo.DistributionSellerQuery;
@@ -16,4 +17,6 @@ import java.util.List;
 public interface DistributionSellerMapper extends BaseMapper<DistributionSeller> {
 
     List<DistributionSellerVo> getSellerListByTenant(DistributionSellerQuery query);
+
+    List<DistributionSellerVo> findList(DistributionSellerQueryBo bo);
 }

+ 2 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/distribution/service/IDistributionSellerService.java

@@ -35,6 +35,8 @@ public interface IDistributionSellerService extends IService<DistributionSeller>
 	 */
 	List<DistributionSellerVo> queryList(DistributionSellerQueryBo bo);
 
+	List<DistributionSellerVo> findList(DistributionSellerQueryBo bo);
+
 	/**
 	 * 根据新增业务对象插入分销业务员
 	 * @param bo 分销业务员新增业务对象

+ 4 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/distribution/vo/DistributionSellerVo.java

@@ -89,4 +89,8 @@ public class DistributionSellerVo {
 	@Excel(name = "冻结金额")
 	@ApiModelProperty("冻结金额")
 	private BigDecimal freezeCash;
+	@ApiModelProperty("手机号码")
+	private String phonenumber;
+	@ApiModelProperty("身份证")
+	private String idCard;
 }

+ 26 - 0
zhongzheng-system/src/main/resources/mapper/modules/distribution/DistributionSellerMapper.xml

@@ -17,6 +17,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="shareCode" column="share_code"/>
     </resultMap>
 
+
+    <resultMap type="com.zhongzheng.modules.distribution.vo.DistributionSellerVo" id="DistributionSellerVoResult">
+        <result property="sellerId" column="seller_id"/>
+        <result property="realname" column="realname"/>
+        <result property="status" column="status"/>
+        <result property="userAccount" column="user_account"/>
+        <result property="gzhOpenId" column="gzh_open_id"/>
+        <result property="unionId" column="union_id"/>
+        <result property="parentId" column="parent_id"/>
+        <result property="shareCode" column="share_code"/>
+        <result property="idCard" column="id_card" typeHandler="com.zhongzheng.common.type.EncryptHandler"/>
+        <result property="phonenumber" column="phonenumber"/>
+    </resultMap>
+
+
     <select id="getSellerListByTenant" parameterType="com.zhongzheng.modules.top.distribution.bo.DistributionSellerQuery" resultType="com.zhongzheng.modules.distribution.vo.DistributionSellerVo">
         SELECT ds.*,sr.realname,sr.user_account,t.tenant_name,
             (SELECT COUNT(*) FROM distribution_seller dr WHERE dr.parent_id = ds.seller_id) promotionNum
@@ -35,5 +50,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </if>
     </select>
 
+    <select id="findList" parameterType="com.zhongzheng.modules.top.distribution.bo.DistributionSellerQuery" resultMap="DistributionSellerVoResult">
+        SELECT
+            s.*,
+            u.id_card,
+            u.phonenumber
+        FROM
+            distribution_seller s
+                LEFT JOIN sys_user u ON s.seller_id = u.seller_id
+        ORDER BY
+            s.seller_id DESC
+    </select>
 
 </mapper>