提交 a38837e5 作者: 余乾开

Merge branch 'develop'

...@@ -11,8 +11,6 @@ import lombok.Builder; ...@@ -11,8 +11,6 @@ import lombok.Builder;
import lombok.Data; import lombok.Data;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
import java.util.List;
/** /**
* @Author LW * @Author LW
* *
......
...@@ -4,10 +4,6 @@ import javax.servlet.http.HttpServletRequest; ...@@ -4,10 +4,6 @@ import javax.servlet.http.HttpServletRequest;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.mmc.csf.common.util.web.ResultBody; import com.mmc.csf.common.util.web.ResultBody;
import com.mmc.csf.release.forum.dto.DynamicInfoDTO; import com.mmc.csf.release.forum.dto.DynamicInfoDTO;
......
package com.mmc.csf.release.dao; package com.mmc.csf.release.dao;
import java.util.List; import java.util.List;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
......
...@@ -9,7 +9,6 @@ import lombok.Data; ...@@ -9,7 +9,6 @@ import lombok.Data;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
import lombok.experimental.Accessors; import lombok.experimental.Accessors;
/** /**
* 评论表(ForumCommentDO)实体类 * 评论表(ForumCommentDO)实体类
* *
......
package com.mmc.csf.release.service.impl; package com.mmc.csf.release.service.impl;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -17,7 +16,6 @@ import org.springframework.stereotype.Service; ...@@ -17,7 +16,6 @@ import org.springframework.stereotype.Service;
import com.mmc.csf.common.util.page.PageResult; import com.mmc.csf.common.util.page.PageResult;
import com.mmc.csf.common.util.web.ResultBody; import com.mmc.csf.common.util.web.ResultBody;
import com.mmc.csf.infomation.dto.UserAccountSimpleDTO; import com.mmc.csf.infomation.dto.UserAccountSimpleDTO;
import com.mmc.csf.release.auth.qo.BUserAccountQO;
import com.mmc.csf.release.auth.qo.UserAccountQO; import com.mmc.csf.release.auth.qo.UserAccountQO;
import com.mmc.csf.release.constant.TokenConstant; import com.mmc.csf.release.constant.TokenConstant;
import com.mmc.csf.release.dao.BackstageForumDao; import com.mmc.csf.release.dao.BackstageForumDao;
...@@ -52,7 +50,7 @@ public class BackstageForumServiceImpl implements BackstageForumService { ...@@ -52,7 +50,7 @@ public class BackstageForumServiceImpl implements BackstageForumService {
userAccountQO.setKeyword(dynamic.getKeyword()); userAccountQO.setKeyword(dynamic.getKeyword());
// 获取筛选的用户id // 获取筛选的用户id
List<UserAccountSimpleDTO> userAccountSimpleDTOS = List<UserAccountSimpleDTO> userAccountSimpleDTOS =
userAppApi.feignListBAccountPage(bUserAccountQO, request.getHeader(TokenConstant.TOKEN)); userAppApi.feignListAppUserAccount(userAccountQO, request.getHeader(TokenConstant.TOKEN));
if (CollectionUtils.isNotEmpty(userAccountSimpleDTOS)) { if (CollectionUtils.isNotEmpty(userAccountSimpleDTOS)) {
// 获取用户id // 获取用户id
userIds = userIds =
...@@ -82,12 +80,11 @@ public class BackstageForumServiceImpl implements BackstageForumService { ...@@ -82,12 +80,11 @@ public class BackstageForumServiceImpl implements BackstageForumService {
// 获取用户信息 // 获取用户信息
Set<Integer> listUserIds = Set<Integer> listUserIds =
dynamicList.stream().map(ForumDynamicDO::getUserAccountId).collect(Collectors.toSet()); dynamicList.stream().map(ForumDynamicDO::getUserAccountId).collect(Collectors.toSet());
List<Integer> userIdList = new ArrayList<>(ListUserIds); List<Integer> userIdList = new ArrayList<>(listUserIds);
BUserAccountQO accountQO = new BUserAccountQO(); UserAccountQO accountQO = new UserAccountQO();
accountQO.setUserIds(userIdList); accountQO.setUserIds(userIdList);
List<UserAccountSimpleDTO> userAccountSimpleList = List<UserAccountSimpleDTO> userAccountSimpleList =
userAppApi.feignListBAccountPage(accountQO, request.getHeader(TokenConstant.TOKEN)); userAppApi.feignListAppUserAccount(accountQO, request.getHeader(TokenConstant.TOKEN));
Map<Integer, UserAccountSimpleDTO> userAccountInfoMap = Map<Integer, UserAccountSimpleDTO> userAccountInfoMap =
userAccountSimpleList.stream() userAccountSimpleList.stream()
.collect(Collectors.toMap(UserAccountSimpleDTO::getId, Function.identity())); .collect(Collectors.toMap(UserAccountSimpleDTO::getId, Function.identity()));
......
package com.mmc.csf.release.service.impl; package com.mmc.csf.release.service.impl;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -18,6 +17,7 @@ import org.springframework.transaction.annotation.Transactional; ...@@ -18,6 +17,7 @@ import org.springframework.transaction.annotation.Transactional;
import com.mmc.csf.common.util.page.PageResult; import com.mmc.csf.common.util.page.PageResult;
import com.mmc.csf.common.util.web.ResultBody; import com.mmc.csf.common.util.web.ResultBody;
import com.mmc.csf.infomation.dto.UserAccountSimpleDTO;
import com.mmc.csf.release.auth.qo.UserAccountQO; import com.mmc.csf.release.auth.qo.UserAccountQO;
import com.mmc.csf.release.constant.TokenConstant; import com.mmc.csf.release.constant.TokenConstant;
import com.mmc.csf.release.dao.CommentDAO; import com.mmc.csf.release.dao.CommentDAO;
...@@ -32,7 +32,6 @@ import com.mmc.csf.release.forum.vo.MediaVO; ...@@ -32,7 +32,6 @@ import com.mmc.csf.release.forum.vo.MediaVO;
import com.mmc.csf.release.forum.vo.UserBaseInfoVO; import com.mmc.csf.release.forum.vo.UserBaseInfoVO;
import com.mmc.csf.release.service.DynamicService; import com.mmc.csf.release.service.DynamicService;
/** /**
* @Author LW * @Author LW
* *
......
...@@ -3,8 +3,6 @@ package com.mmc.csf.release.service.impl; ...@@ -3,8 +3,6 @@ package com.mmc.csf.release.service.impl;
import java.util.List; import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import javax.servlet.http.HttpServletRequest;
import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
......
package com.mmc.csf.release.service.impl; package com.mmc.csf.release.service.impl;
import java.io.File; import cn.afterturn.easypoi.excel.ExcelImportUtil;
import java.io.IOException; import cn.afterturn.easypoi.excel.entity.ImportParams;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;
import javax.servlet.http.HttpServletRequest;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.transaction.interceptor.TransactionAspectSupport;
import org.springframework.web.multipart.MultipartFile;
import com.mmc.csf.common.util.page.PageResult; import com.mmc.csf.common.util.page.PageResult;
import com.mmc.csf.common.util.web.ResultBody; import com.mmc.csf.common.util.web.ResultBody;
import com.mmc.csf.common.util.web.ResultEnum; import com.mmc.csf.common.util.web.ResultEnum;
...@@ -30,17 +14,30 @@ import com.mmc.csf.infomation.vo.TenderNewsVO; ...@@ -30,17 +14,30 @@ import com.mmc.csf.infomation.vo.TenderNewsVO;
import com.mmc.csf.release.auth.dto.LoginSuccessDTO; import com.mmc.csf.release.auth.dto.LoginSuccessDTO;
import com.mmc.csf.release.constant.TokenConstant; import com.mmc.csf.release.constant.TokenConstant;
import com.mmc.csf.release.dao.TenderDao; import com.mmc.csf.release.dao.TenderDao;
import com.mmc.csf.release.entity.TenderNewsDO;
import com.mmc.csf.release.entity.tender.ExcelTenderInfo;
import com.mmc.csf.release.entity.tender.TenderApplyDO; import com.mmc.csf.release.entity.tender.TenderApplyDO;
import com.mmc.csf.release.entity.tender.TenderInfoDO; import com.mmc.csf.release.entity.tender.TenderInfoDO;
import com.mmc.csf.release.entity.tender.TenderNewsDO; import com.mmc.csf.release.entity.tender.TenderNewsDO;
import com.mmc.csf.release.entity.tender.ExcelTenderInfo;
import com.mmc.csf.release.feign.UserAppApi; import com.mmc.csf.release.feign.UserAppApi;
import com.mmc.csf.release.service.TenderService; import com.mmc.csf.release.service.TenderService;
import com.mmc.csf.release.util.MultipartFileUtil; import com.mmc.csf.release.util.MultipartFileUtil;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.transaction.interceptor.TransactionAspectSupport;
import org.springframework.web.multipart.MultipartFile;
import cn.afterturn.easypoi.excel.ExcelImportUtil; import javax.servlet.http.HttpServletRequest;
import cn.afterturn.easypoi.excel.entity.ImportParams; import java.io.File;
import java.io.IOException;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;
/** /**
* author:zhenjie * author:zhenjie
......
...@@ -148,96 +148,6 @@ ...@@ -148,96 +148,6 @@
create_time, create_time,
update_time update_time
from industry_news from industry_news
where is_deleted = 0
and id = #{id}
</select>
<select id="count" resultType="java.lang.Integer" parameterType="com.mmc.csf.release.entity.information.IndustryNewsDO">
select count(*)
from industry_news
<where>
is_deleted = 0
<if test="newsTitle != null and newsTitle != ''">
and news_title = #{newsTitle}
</if>
<if test="newsAuthor != null and newsAuthor != ''">
and news_author = #{newsAuthor}
</if>
<if test="userAccountId != null">
and user_account_id = #{userAccountId}
</if>
<if test="surfaceImg != null and surfaceImg != ''">
and surface_img = #{surfaceImg}
</if>
<if test="newsContents != null and newsContents != ''">
and news_contents = #{newsContents}
</if>
<if test="origin != null and origin != ''">
and origin = #{origin}
</if>
</where>
</select>
<insert id="insert" parameterType="com.mmc.csf.release.entity.information.IndustryNewsDO" useGeneratedKeys="true"
keyColumn="id">
insert into industry_news(news_title, news_author, user_account_id, surface_img, news_contents, origin,
create_time)
values (#{newsTitle}, #{newsAuthor}, #{userAccountId}, #{surfaceImg}, #{newsContents}, #{origin}, now())
</insert>
<update id="update" parameterType="com.mmc.csf.release.entity.information.IndustryNewsDO">
update industry_news
<set>
<if test="newsTitle != null and newsTitle != ''">
news_title = #{newsTitle},
</if>
<if test="newsAuthor != null and newsAuthor != ''">
news_author = #{newsAuthor},
</if>
<if test="userAccountId != null">
user_account_id = #{userAccountId},
</if>
<if test="surfaceImg != null and surfaceImg != ''">
surface_img = #{surfaceImg},
</if>
<if test="newsContents != null">
news_contents = #{newsContents},
</if>
<if test="origin != null and origin != ''">
origin = #{origin},
</if>
</set>
where is_deleted = 0 and id = #{id}
</update>
<select id="countPage" parameterType="com.mmc.csf.infomation.qo.IndustryNewsQO" resultType="java.lang.Integer">
select count(*)
from industry_news
<where>
is_deleted = 0
<if test="newsTitle != null and newsTitle != ''">
and news_title like concat('%',#{newsTitle},'%')
</if>
<if test="startTime != null">
and create_time &gt;= #{startTime}
</if>
<if test="endTime != null">
and create_time &lt;= #{endTime}
</if>
</where>
</select>
<select id="backgroundListNewsPage" parameterType="com.mmc.csf.infomation.qo.IndustryNewsQO"
resultType="com.mmc.csf.release.entity.information.IndustryNewsDO">
select id,
news_title,
news_author,
user_account_id,
surface_img,
news_contents,
origin,
create_time,
update_time
from industry_news
<where> <where>
is_deleted = 0 is_deleted = 0
<if test="newsTitle != null and newsTitle != ''"> <if test="newsTitle != null and newsTitle != ''">
......
...@@ -18,10 +18,6 @@ ...@@ -18,10 +18,6 @@
update requirements_info set is_deleted = 1 where id = #{requirementsInfoId} update requirements_info set is_deleted = 1 where id = #{requirementsInfoId}
</update> </update>
<update id="removeRequire">
update requirements_info set is_deleted = 1 where id = #{requirementsInfoId}
</update>
<select id="listType" resultType="com.mmc.csf.release.entity.requirements.RequirementsTypeDO"> <select id="listType" resultType="com.mmc.csf.release.entity.requirements.RequirementsTypeDO">
select id, type_name from requirements_type where is_deleted = 0 select id, type_name from requirements_type where is_deleted = 0
</select> </select>
......
...@@ -297,9 +297,6 @@ ...@@ -297,9 +297,6 @@
<if test="keyword != null and keyword != ''"> <if test="keyword != null and keyword != ''">
and ti.tender_title like CONCAT("%",#{keyword},"%") and ti.tender_title like CONCAT("%",#{keyword},"%")
</if> </if>
<if test="keyword != null and keyword != ''">
and ti.tender_title like CONCAT("%",#{keyword},"%")
</if>
<if test=" userIds != null "> <if test=" userIds != null ">
<foreach collection="userIds" item="id" index="index" <foreach collection="userIds" item="id" index="index"
open="and tn.user_account_id in (" close=")" separator=","> open="and tn.user_account_id in (" close=")" separator=",">
...@@ -321,9 +318,6 @@ ...@@ -321,9 +318,6 @@
<if test="keyword != null and keyword != ''"> <if test="keyword != null and keyword != ''">
and ti.tender_title like CONCAT("%",#{keyword},"%") and ti.tender_title like CONCAT("%",#{keyword},"%")
</if> </if>
<if test="keyword != null and keyword != ''">
and ti.tender_title like CONCAT("%",#{keyword},"%")
</if>
<if test=" userIds != null "> <if test=" userIds != null ">
<foreach collection="userIds" item="id" index="index" <foreach collection="userIds" item="id" index="index"
open="and tn.user_account_id in (" close=")" separator=","> open="and tn.user_account_id in (" close=")" separator=",">
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论