仪器列表,

master
382696293@qq.com 2 years ago
parent fb1db48846
commit bca678dfa2

@ -117,4 +117,6 @@ public interface SysTagMapper {
public int deleteDeptById(Long id); public int deleteDeptById(Long id);
List<SysTag> selectSecondTagByType(@Param("type") Integer type); List<SysTag> selectSecondTagByType(@Param("type") Integer type);
List<SysTag> selectByIdList(@Param("tagIdList") List<Long> tagIdList);
} }

@ -99,6 +99,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
ORDER BY order_num asc ORDER BY order_num asc
</select> </select>
<select id="selectByIdList" resultMap="SysTagResult">
<include refid="selectDeptVo"/>
where id in
<foreach collection="tagIdList" item="id" open="(" separator="," close=")">
#{id}
</foreach>
</select>
<insert id="insertDept" parameterType="SysTag"> <insert id="insertDept" parameterType="SysTag">
insert into sys_tag( insert into sys_tag(
<if test="id != null and id != 0">id,</if> <if test="id != null and id != 0">id,</if>

@ -5,18 +5,13 @@ import java.util.Iterator;
import java.util.List; import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import com.flossom.common.core.domain.entity.SysTag; import com.flossom.common.core.domain.entity.*;
import com.flossom.common.core.domain.entity.WxInstrument;
import com.flossom.common.core.domain.entity.WxInstrumentFileRelate;
import com.flossom.common.core.domain.entity.WxInstrumentMode;
import com.flossom.common.core.domain.req.WxInstrumentReq; import com.flossom.common.core.domain.req.WxInstrumentReq;
import com.flossom.common.core.domain.req.WxInstrumentSaveReq; import com.flossom.common.core.domain.req.WxInstrumentSaveReq;
import com.flossom.common.core.enums.InstrumentFileClassifyEnum; import com.flossom.common.core.enums.InstrumentFileClassifyEnum;
import com.flossom.common.core.enums.Status; import com.flossom.common.core.enums.Status;
import com.flossom.common.core.mapper.SysTagMapper; import com.flossom.common.core.enums.TagTypeStatusEnum;
import com.flossom.common.core.mapper.WxInstrumentFileRelateMapper; import com.flossom.common.core.mapper.*;
import com.flossom.common.core.mapper.WxInstrumentMapper;
import com.flossom.common.core.mapper.WxInstrumentModeMapper;
import com.flossom.common.core.utils.DateUtils; import com.flossom.common.core.utils.DateUtils;
import com.flossom.common.core.utils.StringUtils; import com.flossom.common.core.utils.StringUtils;
import com.flossom.common.security.utils.SecurityUtils; import com.flossom.common.security.utils.SecurityUtils;
@ -47,6 +42,9 @@ public class WxInstrumentServiceImpl implements IWxInstrumentService {
@Autowired @Autowired
private WxInstrumentModeMapper wxInstrumentModeMapper; private WxInstrumentModeMapper wxInstrumentModeMapper;
@Autowired
private WxInstrumentTagMapper wxInstrumentTagMapper;
/** /**
* *
* *
@ -114,7 +112,30 @@ public class WxInstrumentServiceImpl implements IWxInstrumentService {
@Override @Override
public List<WxInstrument> selectWxInstrumentPage(WxInstrumentReq wxInstrumentReq) { public List<WxInstrument> selectWxInstrumentPage(WxInstrumentReq wxInstrumentReq) {
return wxInstrumentMapper.selectWxInstrumentPage(wxInstrumentReq); List<WxInstrument> wxInstruments = wxInstrumentMapper.selectWxInstrumentPage(wxInstrumentReq);
if (wxInstruments != null && wxInstruments.size() > 0) {
for (WxInstrument wxInstrument : wxInstruments) {
WxInstrumentTag query = new WxInstrumentTag();
query.setInstrumentId(wxInstrument.getId());
List<WxInstrumentTag> wxInstrumentTagList = wxInstrumentTagMapper.selectWxInstrumentTagList(query);
if (wxInstrumentTagList != null && wxInstrumentTagList.size() > 0) {
List<Long> tagIdList = wxInstrumentTagList.stream().map(WxInstrumentTag::getTagId).collect(Collectors.toList());
List<SysTag> sysTagList = sysTagMapper.selectByIdList(tagIdList);
String miniProgramTags = sysTagList.stream()
.filter(tag -> Integer.valueOf(tag.getType()) == TagTypeStatusEnum.MINI_PROGRAM.getCode())
.map(SysTag::getTagName)
.collect(Collectors.joining(","));
wxInstrument.setMiniTagNames(miniProgramTags);
String wecomTags = sysTagList.stream()
.filter(tag -> Integer.valueOf(tag.getType()) == TagTypeStatusEnum.ENTERPRISE_WECHAT.getCode())
.map(SysTag::getTagName)
.collect(Collectors.joining(","));
wxInstrument.setWecomTagNames(wecomTags);
}
}
}
return wxInstruments;
} }
/** /**

@ -129,7 +129,7 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="小程序标签" label="可见小程序标签"
align="center" align="center"
prop="miniTagNames" prop="miniTagNames"
width="150px" width="150px"
@ -144,7 +144,7 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="外部标签" label="可见外部标签"
align="center" align="center"
prop="wecomTagNames" prop="wecomTagNames"
width="150px" width="150px"
@ -197,7 +197,7 @@
type="text" type="text"
icon="el-icon-edit" icon="el-icon-edit"
@click="editWecomTags(scope.row)" @click="editWecomTags(scope.row)"
>设置企微可见标签 >设置外部可见标签
</el-button> </el-button>
<el-button <el-button
size="mini" size="mini"

Loading…
Cancel
Save