Browse Source

"mydemand"入参增加epmetUserIdList

dev_shibei_match
yinzuomei 4 years ago
parent
commit
d9c81f6af5
  1. 7
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/IcResiUserDemandFromDTO.java
  2. 6
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java
  3. 12
      epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml

7
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/IcResiUserDemandFromDTO.java

@ -5,6 +5,7 @@ import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.List;
@Data
public class IcResiUserDemandFromDTO implements Serializable {
@ -21,7 +22,7 @@ public class IcResiUserDemandFromDTO implements Serializable {
/**
* icresiuser/persondata接口返参中有此值
*/
private String epmetUserId;
private List<String> epmetUserIdList;
@NotNull(message = "pageNo不能为空", groups = AddUserInternalGroup.class)
private Integer pageNo;
@ -36,4 +37,8 @@ public class IcResiUserDemandFromDTO implements Serializable {
@NotBlank(message = "tokenDto获取客户id不能为空", groups = AddUserInternalGroup.class)
private String customerId;
/**
* epmetUserIdList+userId
*/
private List<String> userIds;
}

6
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java

@ -475,7 +475,11 @@ public class IcUserDemandRecServiceImpl extends BaseServiceImpl<IcUserDemandRecD
}
formDTO.setEpmetUserId(userRes.getData().getEpmetUserId());*/
//icresiuser/persondata接口已经返回去epmetUserId,这里就不需要再查询了。直接让前端传过来
List<String> userIds=new ArrayList<>();
userIds.add(formDTO.getUserId());
if(CollectionUtils.isNotEmpty(formDTO.getEpmetUserIdList())){
userIds.addAll(formDTO.getEpmetUserIdList());
}
//2、小程序内自己上报+赋能平台待录入的
PageInfo<IcResiUserReportDemandRes> pageInfo = PageHelper.startPage(formDTO.getPageNo(),
formDTO.getPageSize()).doSelectPageInfo(() -> baseDao.selectUserDemand(formDTO));

12
epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml

@ -134,14 +134,10 @@
ic_user_demand_rec r
WHERE
r.DEL_FLAG = '0'
<choose>
<when test="null!=epmetUserId and epmetUserId!='' ">
AND (r.DEMAND_USER_ID = #{userId} or r.DEMAND_USER_ID=#{epmetUserId})
</when>
<otherwise>
AND r.DEMAND_USER_ID = #{userId}
</otherwise>
</choose>
AND r.DEMAND_USER_ID in
<foreach item="demandUserId" collection="userIds" open="(" separator="," close=")">
#{demandUserId}
</foreach>
<if test="null !=firstCategoryCode and firstCategoryCode!=''">
and r.CATEGORY_CODE like concat(#{firstCategoryCode},'%')
</if>

Loading…
Cancel
Save