|
@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.qs.mp.channel.domain.Channel;
|
|
|
import com.qs.mp.channel.domain.ChannelCommission;
|
|
|
import com.qs.mp.channel.domain.param.ChannelParam;
|
|
|
+import com.qs.mp.channel.domain.param.SiteParam;
|
|
|
import com.qs.mp.channel.domain.param.VerifyParam;
|
|
|
import com.qs.mp.channel.domain.vo.ChannelOperDataVO;
|
|
|
import com.qs.mp.channel.domain.vo.ChannelVO;
|
|
@@ -38,6 +39,7 @@ import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
+import org.springframework.util.CollectionUtils;
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
@@ -321,20 +323,19 @@ public class ChannelController extends BaseApiController {
|
|
|
* @return
|
|
|
*/
|
|
|
@PostMapping("site/list")
|
|
|
- public TableDataInfo listSite(@RequestBody Channel channel) {
|
|
|
+ public TableDataInfo listSite(@RequestBody SiteParam siteParam) {
|
|
|
Long channelId = SecurityUtils.getLoginUser().getChannelId();
|
|
|
List<ChannelVO> list = new ArrayList<ChannelVO>();
|
|
|
if(null != channelId) {
|
|
|
- channel.setParentId(channelId);
|
|
|
startPage();
|
|
|
QueryWrapper<Channel> queryWrapper = new QueryWrapper<>();
|
|
|
- queryWrapper.eq("t1.parent_id", channel.getParentId());
|
|
|
+ queryWrapper.eq("t1.parent_id", channelId);
|
|
|
queryWrapper.eq("t1.level", 0);
|
|
|
- if(null != channel.getVerifyStatus()) {
|
|
|
- queryWrapper.eq("t1.verify_status", channel.getVerifyStatus());
|
|
|
+ if(!CollectionUtils.isEmpty(siteParam.getVerifyStatus())) {
|
|
|
+ queryWrapper.in("t1.verify_status", siteParam.getVerifyStatus());
|
|
|
}
|
|
|
- if(null != channel.getCertifyStatus()) {
|
|
|
- queryWrapper.eq("t1.certify_status", channel.getCertifyStatus());
|
|
|
+ if(StringUtils.isNotBlank(siteParam.getCertifyStatus())) {
|
|
|
+ queryWrapper.eq("t1.certify_status", siteParam.getCertifyStatus());
|
|
|
}
|
|
|
list = channelService.selectChannelVoList(queryWrapper);
|
|
|
}
|