Browse Source

web端口志愿者列表权限

LiRong 1 day ago
parent
commit
9e712b5d62

+ 1 - 1
leromro-common/src/main/java/com/leromro/common/constant/CommonConstants.java

@@ -16,7 +16,7 @@ public class CommonConstants {
     //校验省市
     public static final String CHECK_PROVINCE_CITY= "province_code,city_code";
     //校验省市区(和志愿者表的联查)
-    public static final String CHECK_VOLUNTEER_PROVINCE_CITY_DISTRICT = "lvi.province_code,lvi.city_code,lvi.district_code";
+    public static final String CHECK_VOLUNTEER_PROVINCE_CITY_DISTRICT = "province_code,city_code,district_code";
     //校验省市区(无联查)
     public static final String CHECK_PROVINCE_CITY_DISTRICT = "province_code,city_code,district_code";
 }

+ 1 - 1
leromro-core/src/main/java/com/leromro/core/domain/VolunteerInfo.java

@@ -142,7 +142,7 @@ public class VolunteerInfo extends BaseEntity {
     @ApiModelProperty("省级名称")
     private String provinceName;
 
-    @TableField("cityCode")
+    @TableField("city_code")
     @ApiModelProperty("市级编号")
     private String cityCode;
 

+ 1 - 1
leromro-core/src/main/java/com/leromro/core/mapper/VolunteerInfoMapper.java

@@ -21,7 +21,7 @@ import java.util.List;
 public interface VolunteerInfoMapper extends BaseMapper<VolunteerInfo> {
 
 
-    List<VolunteerInfo> webList(VolunteerInfoDTO dto);
+    List<VolunteerInfo> webList(ListPermission listPermission,@Param("dto") VolunteerInfoDTO dto);
 
     List<VolunteerInfoVO> selectVolunteerInfoSimple(ListPermission listPermission,@Param("info") VolunteerInfo volunteerInfo);
 

+ 2 - 2
leromro-core/src/main/java/com/leromro/core/service/impl/VolunteerInfoServiceImpl.java

@@ -138,7 +138,7 @@ public class VolunteerInfoServiceImpl extends ServiceImpl<VolunteerInfoMapper, V
      */
     @Override
     public List<VolunteerInfo> webList(VolunteerInfoDTO dto) {
-        List<VolunteerInfo> infos = volunteerInfoMapper.webList(dto);
+        List<VolunteerInfo> infos = volunteerInfoMapper.webList(new ListPermission(VolunteerInfo.class, CommonConstants.CHECK_PROVINCE_CITY_DISTRICT),dto);
         return infos;
     }
     /**     小程序用户志愿者列表
@@ -148,7 +148,7 @@ public class VolunteerInfoServiceImpl extends ServiceImpl<VolunteerInfoMapper, V
     @Override
     public List<VolunteerInfoVO> selectVolunteerInfoList(VolunteerInfo volunteerInfo) {
         //查询出志愿者信息
-        List<VolunteerInfoVO> infos = volunteerInfoMapper.selectVolunteerInfoSimple(new ListPermission(SecondOrder.class, CommonConstants.CHECK_VOLUNTEER_PROVINCE_CITY_DISTRICT),volunteerInfo);
+        List<VolunteerInfoVO> infos = volunteerInfoMapper.selectVolunteerInfoSimple(new ListPermission(SecondOrder.class, CommonConstants.CHECK_PROVINCE_CITY_DISTRICT),volunteerInfo);
         //查询出所有服务名称
         Map<Long, String> idMapTierName = businessManagementService.list().stream().collect(Collectors.toMap(BusinessManagement::getBusinessManagementId, BusinessManagement::getBusinessTierName));
         if (ObjectUtil.isNotEmpty(infos)){

+ 7 - 5
leromro-core/src/main/resources/mapper/core/VolunteerInfoMapper.xml

@@ -37,15 +37,17 @@
 
     <select id="webList" resultType="com.leromro.core.domain.VolunteerInfo"
             parameterType="com.leromro.core.domain.VolunteerInfo">
-        select * from l_volunteer_info
+        select * from l_volunteer_info lvi
         <where>
-            <if test="name != null  and name != ''"> and lvi.name like concat('%', #{name}, '%')</if>
+            <if test="dto.serviceCategory != null "> and service_category = #{dto.serviceCategory}</if>
+            <if test="dto.phonenumber != null">and phonenumber = #{dto.phonenumber}</if>
+            <if test="dto.appStatus != null  and dto.appStatus != '' and dto.appStatus == 1"> and app_status in (1,3)</if>
+            <if test="dto.appStatus != null  and dto.appStatus != '' and dto.appStatus == 2"> and app_status = 2</if>
+            <!--<if test="name != null  and name != ''"> and lvi.name like concat('%', #{name}, '%')</if>
             <if test="score != null "> and lvi.score = #{score}</if>
-            <if test="serviceCategory != null "> and lvi.service_category = #{serviceCategory}</if>
             <if test="skillDescribe != null  and skillDescribe != ''"> and lvi.skill_describe = #{skillDescribe}</if>
             <if test="city != null  and city != ''"> and lvi.city = #{city}</if>
-            <if test="appStatus != null  and appStatus != '' and appStatus == 1"> and app_status in (1,3)</if>
-            <if test="appStatus != null  and appStatus != '' and appStatus == 2"> and app_status = 2</if>
+            -->
         </where>
     </select>