Commit 081c2c21 by yangyang

服务管理调整(重庆)

parent 366f4e6e
......@@ -59,9 +59,17 @@ public class SkServiceApplyVO {
*/
private String ssqsj;
/**
* 授权状态 1已授权 2撤销 0是未授权
* 授权状态 1已授权 2撤销 3失效 0是未授权
*/
private String status;
/**
* 展示状态(服务申请),0代表不展示,1代表展示
*/
private String flag;
/**
* 是否删除,0表示否,1表示是 服务删除标志
*/
private String serviceDeleted;
public SkServiceApplyVO(){}
public SkServiceApplyVO(SkServiceApply skServiceApply, String name,String ms){
......
......@@ -27,7 +27,7 @@
<select id="findAll" resultType="com.founder.commonutils.model.vo.response.SkServiceApplyVO">
select a.xxzjbh, serviceMs,serviceName,serviceId, applyGs, applyRy, applyUrl, time, token, a.content,
a.isDeleted, sqsj,ssqsj, a.status
a.isDeleted, sqsj,ssqsj, a.status,b.flag,b.isDeleted as serviceDeleted
from sk_service_apply a left join sk_service b on a.serviceId=b.xxzjbh
where a.isDeleted='0'
<if test="servicename!= null and servicename!=''">
......
package com.founder.servicebase.service.serviceimpl;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.founder.commonutils.model.newPublicEntity.SkServiceApply;
import com.founder.commonutils.model.vo.param.SkServiceApplyParam;
import com.founder.commonutils.model.vo.response.SkServiceApplyVO;
import com.founder.servicebase.logs.mapper.mysqlMapper.SkServiceApplyMapper;
import com.founder.servicebase.service.SkServiceApplyService;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* 服务授权表(SkServiceApply)表服务实现类
......@@ -28,6 +31,21 @@ public class SkServiceApplyServiceImpl extends ServiceImpl<SkServiceApplyMapper,
int count=baseMapper.count(skRegionalsDetailParam);
skRegionalsDetailParam.setPage((skRegionalsDetailParam.getPage()-1)*skRegionalsDetailParam.getPageSize());
List<SkServiceApplyVO> list=baseMapper.findAll(skRegionalsDetailParam);
// 拿出展示状态(服务申请),flag0代表不展示;服务删除标志serviceDeleted,将申请表Status置为3失效状态
List<SkServiceApplyVO> listFilter = list.stream().filter(p->p.getFlag().equals("0")||p.getServiceDeleted().equals("1")).collect(Collectors.toList());
listFilter.stream().forEach(p->{
SkServiceApply skServiceApply = new SkServiceApply();
p.setStatus("3");
p.setToken(null);
p.setSsqsj(null);
BeanUtils.copyProperties(p,skServiceApply);
UpdateWrapper updateWrapper = new UpdateWrapper();
updateWrapper.eq("xxzjbh", skServiceApply.getXxzjbh());
updateWrapper.set("token", null);
updateWrapper.set("ssqsj", null);
updateWrapper.set("status", "3");
baseMapper.update(skServiceApply,updateWrapper);
});
map.put("count",count);
map.put("list",list);
return map;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment