This commit is contained in:
YY
2025-07-14 13:24:36 +08:00
parent 0879846562
commit ce2c1f8ded
9 changed files with 269 additions and 176 deletions

View File

@ -132,7 +132,7 @@ public class HomePageController {
} }
/** /**
* 获取所有列表 * 友情连接
* @param * @param
* @return * @return
*/ */
@ -143,4 +143,12 @@ public class HomePageController {
return BaseResponse.success(list); return BaseResponse.success(list);
} }
/**
* 友情连接12个
*/
@GetMapping("/coscoPortalsLinks/friendshipConnections")
public BaseResponse friendshipConnections() {
return BaseResponse.success(coscoPortalsLinksClassificationService.friendshipConnections());
}
} }

View File

@ -71,5 +71,9 @@ public interface CoscoPortalsLinksMapper extends IBaseMapper<CoscoPortalsLinks>
*/ */
public int deleteCoscoPortalsLinksByIds(String[] ids); public int deleteCoscoPortalsLinksByIds(String[] ids);
/**
* 获取12个友情连接首页显示
* @return
*/
List<CoscoPortalsLinks> friendshipConnections();
} }

View File

@ -4,31 +4,54 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.chinaunicom.zyhy.ebtp.supplier.portals.dao.CoscoPortalsCustomerQandaMapper"> <mapper namespace="com.chinaunicom.zyhy.ebtp.supplier.portals.dao.CoscoPortalsCustomerQandaMapper">
<resultMap type="com.chinaunicom.zyhy.ebtp.supplier.portals.entity.CoscoPortalsCustomerQanda" id="CoscoPortalsCustomerQandaResult"> <resultMap type="com.chinaunicom.zyhy.ebtp.supplier.portals.entity.CoscoPortalsCustomerQanda"
<result property="id" column="id"/> id="CoscoPortalsCustomerQandaResult">
<result property="title" column="title"/> <result property="id" column="id"/>
<result property="content" column="content"/> <result property="title" column="title"/>
<result property="askTime" column="ask_time"/> <result property="content" column="content"/>
<result property="type" column="type"/> <result property="askTime" column="ask_time"/>
<result property="fullName" column="full_name"/> <result property="type" column="type"/>
<result property="companyName" column="company_name"/> <result property="fullName" column="full_name"/>
<result property="userName" column="user_name"/> <result property="companyName" column="company_name"/>
<result property="contactDetails" column="contact_details"/> <result property="userName" column="user_name"/>
<result property="email" column="email"/> <result property="contactDetails" column="contact_details"/>
<result property="answerContent" column="answer_content"/> <result property="email" column="email"/>
<result property="answerBy" column="answer_by"/> <result property="answerContent" column="answer_content"/>
<result property="answerTime" column="answer_time"/> <result property="answerBy" column="answer_by"/>
<result property="isAnswer" column="is_answer"/> <result property="answerTime" column="answer_time"/>
<result property="delFlag" column="del_flag"/> <result property="isAnswer" column="is_answer"/>
<result property="createBy" column="create_by"/> <result property="delFlag" column="del_flag"/>
<result property="createTime" column="create_time"/> <result property="createBy" column="create_by"/>
<result property="updateBy" column="update_by"/> <result property="createTime" column="create_time"/>
<result property="updateTime" column="update_time"/> <result property="updateBy" column="update_by"/>
<result property="lastUpdateTime" column="last_update_time"/> <result property="updateTime" column="update_time"/>
<result property="lastUpdateTime" column="last_update_time"/>
<result property="addressImg" column="address_img"/>
</resultMap> </resultMap>
<sql id="selectCoscoPortalsCustomerQandaVo"> <sql id="selectCoscoPortalsCustomerQandaVo">
select id, title, content, ask_time, type, full_name, company_name, user_name, contact_details, email, answer_content, answer_by, answer_time, is_answer, del_flag, create_by, create_time, update_by, update_time, last_update_time select id,
title,
address_img,
content,
ask_time,
type,
full_name,
company_name,
user_name,
contact_details,
email,
answer_content,
answer_by,
answer_time,
is_answer,
del_flag,
create_by,
create_time,
update_by,
update_time,
last_update_time
from cosco_portals_customer_qanda from cosco_portals_customer_qanda
</sql> </sql>
@ -85,181 +108,197 @@
</where> </where>
</select> </select>
<select id="selectCoscoPortalsCustomerQandaList" parameterType="com.chinaunicom.zyhy.ebtp.supplier.portals.entity.CoscoPortalsCustomerQanda" resultMap="CoscoPortalsCustomerQandaResult"> <select id="selectCoscoPortalsCustomerQandaList"
parameterType="com.chinaunicom.zyhy.ebtp.supplier.portals.entity.CoscoPortalsCustomerQanda"
resultMap="CoscoPortalsCustomerQandaResult">
<include refid="selectCoscoPortalsCustomerQandaVo"/> <include refid="selectCoscoPortalsCustomerQandaVo"/>
<where> <where>
<if test="title != null and title != ''"> <if test="title != null and title != ''">
and title = #{title} and title = #{title}
</if> </if>
<if test="content != null and content != ''"> <if test="content != null and content != ''">
and content = #{content} and content = #{content}
</if> </if>
<if test="askTime != null "> <if test="askTime != null ">
and ask_time = #{askTime} and ask_time = #{askTime}
</if> </if>
<if test="type != null and type != ''"> <if test="type != null and type != ''">
and type = #{type} and type = #{type}
</if> </if>
<if test="fullName != null and fullName != ''"> <if test="fullName != null and fullName != ''">
and full_name like concat('%', #{fullName}, '%') and full_name like concat('%', #{fullName}, '%')
</if> </if>
<if test="companyName != null and companyName != ''"> <if test="companyName != null and companyName != ''">
and company_name like concat('%', #{companyName}, '%') and company_name like concat('%', #{companyName}, '%')
</if> </if>
<if test="userName != null and userName != ''"> <if test="userName != null and userName != ''">
and user_name like concat('%', #{userName}, '%') and user_name like concat('%', #{userName}, '%')
</if> </if>
<if test="contactDetails != null and contactDetails != ''"> <if test="contactDetails != null and contactDetails != ''">
and contact_details = #{contactDetails} and contact_details = #{contactDetails}
</if> </if>
<if test="email != null and email != ''"> <if test="email != null and email != ''">
and email = #{email} and email = #{email}
</if> </if>
<if test="answerContent != null and answerContent != ''"> <if test="answerContent != null and answerContent != ''">
and answer_content = #{answerContent} and answer_content = #{answerContent}
</if> </if>
<if test="answerBy != null and answerBy != ''"> <if test="answerBy != null and answerBy != ''">
and answer_by = #{answerBy} and answer_by = #{answerBy}
</if> </if>
<if test="answerTime != null "> <if test="answerTime != null ">
and answer_time = #{answerTime} and answer_time = #{answerTime}
</if> </if>
<if test="isAnswer != null "> <if test="isAnswer != null ">
and is_answer = #{isAnswer} and is_answer = #{isAnswer}
</if> </if>
<if test="lastUpdateTime != null "> <if test="lastUpdateTime != null ">
and last_update_time = #{lastUpdateTime} and last_update_time = #{lastUpdateTime}
</if> </if>
</where> </where>
</select> </select>
<select id="selectCoscoPortalsCustomerQandaById" parameterType="String" <select id="selectCoscoPortalsCustomerQandaById" parameterType="String"
resultMap="CoscoPortalsCustomerQandaResult"> resultMap="CoscoPortalsCustomerQandaResult">
<include refid="selectCoscoPortalsCustomerQandaVo"/> <include refid="selectCoscoPortalsCustomerQandaVo"/>
where id = #{id} where id = #{id}
</select> </select>
<insert id="insertCoscoPortalsCustomerQanda" parameterType="com.chinaunicom.zyhy.ebtp.supplier.portals.entity.CoscoPortalsCustomerQanda"> <insert id="insertCoscoPortalsCustomerQanda"
parameterType="com.chinaunicom.zyhy.ebtp.supplier.portals.entity.CoscoPortalsCustomerQanda">
insert into cosco_portals_customer_qanda insert into cosco_portals_customer_qanda
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if> <if test="id != null">id,</if>
<if test="title != null and title != ''">title,</if> <if test="title != null and title != ''">title,</if>
<if test="content != null and content != ''">content,</if> <if test="content != null and content != ''">content,</if>
<if test="askTime != null">ask_time,</if> <if test="askTime != null">ask_time,</if>
<if test="type != null and type != ''">type,</if> <if test="type != null and type != ''">type,</if>
<if test="fullName != null and fullName != ''">full_name,</if> <if test="fullName != null and fullName != ''">full_name,</if>
<if test="companyName != null and companyName != ''">company_name,</if> <if test="companyName != null and companyName != ''">company_name,</if>
<if test="userName != null and userName != ''">user_name,</if> <if test="userName != null and userName != ''">user_name,</if>
<if test="contactDetails != null and contactDetails != ''">contact_details,</if> <if test="contactDetails != null and contactDetails != ''">contact_details,</if>
<if test="email != null and email != ''">email,</if> <if test="email != null and email != ''">email,</if>
<if test="answerContent != null">answer_content,</if> <if test="answerContent != null">answer_content,</if>
<if test="answerBy != null">answer_by,</if> <if test="answerBy != null">answer_by,</if>
<if test="answerTime != null">answer_time,</if> <if test="answerTime != null">answer_time,</if>
<if test="isAnswer != null">is_answer,</if> <if test="isAnswer != null">is_answer,</if>
<if test="delFlag != null and delFlag != ''">del_flag,</if> <if test="delFlag != null and delFlag != ''">del_flag,</if>
<if test="createBy != null and createBy != ''">create_by,</if> <if test="createBy != null and createBy != ''">create_by,</if>
<if test="createTime != null">create_time,</if> <if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if> <if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if> <if test="updateTime != null">update_time,</if>
<if test="lastUpdateTime != null">last_update_time,</if> <if test="lastUpdateTime != null">last_update_time,</if>
<if test="addressImg != null">address_img,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if> <if test="id != null">#{id},</if>
<if test="title != null and title != ''">#{title},</if> <if test="title != null and title != ''">#{title},</if>
<if test="content != null and content != ''">#{content},</if> <if test="content != null and content != ''">#{content},</if>
<if test="askTime != null">#{askTime},</if> <if test="askTime != null">#{askTime},</if>
<if test="type != null and type != ''">#{type},</if> <if test="type != null and type != ''">#{type},</if>
<if test="fullName != null and fullName != ''">#{fullName},</if> <if test="fullName != null and fullName != ''">#{fullName},</if>
<if test="companyName != null and companyName != ''">#{companyName},</if> <if test="companyName != null and companyName != ''">#{companyName},</if>
<if test="userName != null and userName != ''">#{userName},</if> <if test="userName != null and userName != ''">#{userName},</if>
<if test="contactDetails != null and contactDetails != ''">#{contactDetails},</if> <if test="contactDetails != null and contactDetails != ''">#{contactDetails},</if>
<if test="email != null and email != ''">#{email},</if> <if test="email != null and email != ''">#{email},</if>
<if test="answerContent != null">#{answerContent},</if> <if test="answerContent != null">#{answerContent},</if>
<if test="answerBy != null">#{answerBy},</if> <if test="answerBy != null">#{answerBy},</if>
<if test="answerTime != null">#{answerTime},</if> <if test="answerTime != null">#{answerTime},</if>
<if test="isAnswer != null">#{isAnswer},</if> <if test="isAnswer != null">#{isAnswer},</if>
<if test="delFlag != null and delFlag != ''">#{delFlag},</if> <if test="delFlag != null and delFlag != ''">#{delFlag},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if> <if test="createBy != null and createBy != ''">#{createBy},</if>
<if test="createTime != null">#{createTime},</if> <if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if> <if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if> <if test="updateTime != null">#{updateTime},</if>
<if test="lastUpdateTime != null">#{lastUpdateTime},</if> <if test="lastUpdateTime != null">#{lastUpdateTime},</if>
<if test="addressImg != null">#{addressImg},</if>
</trim> </trim>
</insert> </insert>
<insert id="batchCoscoPortalsCustomerQanda" parameterType="java.util.List"> <insert id="batchCoscoPortalsCustomerQanda" parameterType="java.util.List">
insert into cosco_portals_customer_qanda insert into cosco_portals_customer_qanda
( id, title, content, ask_time, type, full_name, company_name, user_name, contact_details, email, answer_content, answer_by, answer_time, is_answer, del_flag, create_by, create_time, update_by, update_time, last_update_time) ( id, title, content, ask_time, type, full_name, company_name, user_name, contact_details, email,
answer_content, answer_by, answer_time, is_answer, del_flag, create_by, create_time, update_by, update_time,
last_update_time)
values values
<foreach item="item" index="index" collection="list" separator=","> <foreach item="item" index="index" collection="list" separator=",">
( #{item.id}, #{item.title}, #{item.content}, #{item.askTime}, #{item.type}, #{item.fullName}, #{item.companyName}, #{item.userName}, #{item.contactDetails}, #{item.email}, #{item.answerContent}, #{item.answerBy}, #{item.answerTime}, #{item.isAnswer}, #{item.delFlag}, #{item.createBy}, #{item.createTime}, #{item.updateBy}, #{item.updateTime}, #{item.lastUpdateTime}) ( #{item.id}, #{item.title}, #{item.content}, #{item.askTime}, #{item.type}, #{item.fullName},
#{item.companyName}, #{item.userName}, #{item.contactDetails}, #{item.email}, #{item.answerContent},
#{item.answerBy}, #{item.answerTime}, #{item.isAnswer}, #{item.delFlag}, #{item.createBy},
#{item.createTime}, #{item.updateBy}, #{item.updateTime}, #{item.lastUpdateTime})
</foreach> </foreach>
</insert> </insert>
<update id="updateCoscoPortalsCustomerQanda" parameterType="com.chinaunicom.zyhy.ebtp.supplier.portals.entity.CoscoPortalsCustomerQanda"> <update id="updateCoscoPortalsCustomerQanda"
parameterType="com.chinaunicom.zyhy.ebtp.supplier.portals.entity.CoscoPortalsCustomerQanda">
update cosco_portals_customer_qanda update cosco_portals_customer_qanda
<trim prefix="SET" suffixOverrides=","> <trim prefix="SET" suffixOverrides=",">
<if test="title != null and title != ''">title = <if test="title != null and title != ''">title =
#{title}, #{title},
</if> </if>
<if test="content != null and content != ''">content = <if test="content != null and content != ''">content =
#{content}, #{content},
</if> </if>
<if test="askTime != null">ask_time = <if test="askTime != null">ask_time =
#{askTime}, #{askTime},
</if> </if>
<if test="type != null and type != ''">type = <if test="type != null and type != ''">type =
#{type}, #{type},
</if> </if>
<if test="fullName != null and fullName != ''">full_name = <if test="fullName != null and fullName != ''">full_name =
#{fullName}, #{fullName},
</if> </if>
<if test="companyName != null and companyName != ''">company_name = <if test="companyName != null and companyName != ''">company_name =
#{companyName}, #{companyName},
</if> </if>
<if test="userName != null and userName != ''">user_name = <if test="userName != null and userName != ''">user_name =
#{userName}, #{userName},
</if> </if>
<if test="contactDetails != null and contactDetails != ''">contact_details = <if test="contactDetails != null and contactDetails != ''">contact_details =
#{contactDetails}, #{contactDetails},
</if> </if>
<if test="email != null and email != ''">email = <if test="email != null and email != ''">email =
#{email}, #{email},
</if> </if>
<if test="answerContent != null">answer_content = <if test="answerContent != null">answer_content =
#{answerContent}, #{answerContent},
</if> </if>
<if test="answerBy != null">answer_by = <if test="answerBy != null">answer_by =
#{answerBy}, #{answerBy},
</if> </if>
<if test="answerTime != null">answer_time = <if test="answerTime != null">answer_time =
#{answerTime}, #{answerTime},
</if> </if>
<if test="isAnswer != null">is_answer = <if test="isAnswer != null">is_answer =
#{isAnswer}, #{isAnswer},
</if> </if>
<if test="delFlag != null and delFlag != ''">del_flag = <if test="delFlag != null and delFlag != ''">del_flag =
#{delFlag}, #{delFlag},
</if> </if>
<if test="createBy != null and createBy != ''">create_by = <if test="createBy != null and createBy != ''">create_by =
#{createBy}, #{createBy},
</if> </if>
<if test="createTime != null">create_time = <if test="createTime != null">create_time =
#{createTime}, #{createTime},
</if> </if>
<if test="updateBy != null">update_by = <if test="updateBy != null">update_by =
#{updateBy}, #{updateBy},
</if> </if>
<if test="updateTime != null">update_time = <if test="updateTime != null">update_time =
#{updateTime}, #{updateTime},
</if> </if>
<if test="lastUpdateTime != null">last_update_time = <if test="lastUpdateTime != null">last_update_time =
#{lastUpdateTime}, #{lastUpdateTime},
</if> </if>
<if test="addressImg != null">address_img =
#{addressImg},
</if>
</trim> </trim>
where id = #{id} where id = #{id}
</update> </update>
<update id="deleteCoscoPortalsCustomerQandaById" parameterType="String"> <update id="deleteCoscoPortalsCustomerQandaById" parameterType="String">
update cosco_portals_customer_qanda set del_flag = 2 update cosco_portals_customer_qanda
set del_flag = 2
where id = #{id} where id = #{id}
</update> </update>

View File

@ -74,6 +74,17 @@
</if> </if>
</where> </where>
</select> </select>
<select id="friendshipConnections"
resultMap="CoscoPortalsLinksResult">
<include refid="selectCoscoPortalsLinksVo"/>
where
del_flag = 'normal'
and status = 0
order by update_time desc
limit 12
</select>
<select id="selectCoscoPortalsLinksList" <select id="selectCoscoPortalsLinksList"
parameterType="com.chinaunicom.zyhy.ebtp.supplier.portals.entity.CoscoPortalsLinks" parameterType="com.chinaunicom.zyhy.ebtp.supplier.portals.entity.CoscoPortalsLinks"
resultMap="CoscoPortalsLinksResult"> resultMap="CoscoPortalsLinksResult">

View File

@ -67,6 +67,8 @@ public class CoscoPortalsCustomerQanda extends BaseEntity {
private Date createTime; private Date createTime;
private String addressImg;
private Date updateTime; private Date updateTime;
@ApiModelProperty(value = "分页对象信息") @ApiModelProperty(value = "分页对象信息")

View File

@ -3,6 +3,7 @@ package com.chinaunicom.zyhy.ebtp.supplier.portals.service;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.chinaunicom.zyhy.ebtp.supplier.base.vo.LinksClassificationVo; import com.chinaunicom.zyhy.ebtp.supplier.base.vo.LinksClassificationVo;
import com.chinaunicom.zyhy.ebtp.supplier.dict.entity.DictProject; import com.chinaunicom.zyhy.ebtp.supplier.dict.entity.DictProject;
import com.chinaunicom.zyhy.ebtp.supplier.portals.entity.CoscoPortalsLinks;
import com.chinaunicom.zyhy.ebtp.supplier.portals.entity.CoscoPortalsLinksClassification; import com.chinaunicom.zyhy.ebtp.supplier.portals.entity.CoscoPortalsLinksClassification;
import java.util.List; import java.util.List;
@ -75,4 +76,10 @@ public interface ICoscoPortalsLinksClassificationService {
* @return * @return
*/ */
List<LinksClassificationVo> getAll(); List<LinksClassificationVo> getAll();
/**
* 获取12个友情连接首页显示
* @return
*/
List<CoscoPortalsLinks> friendshipConnections();
} }

View File

@ -80,4 +80,10 @@ public interface ICoscoPortalsLinksService {
* @return * @return
*/ */
int down(String id); int down(String id);
/**
* 获取12个友情连接首页显示
* @return
*/
List<CoscoPortalsLinks> friendshipConnections();
} }

View File

@ -138,4 +138,13 @@ public class CoscoPortalsLinksClassificationServiceImpl extends BaseServiceImpl<
} }
return returnList; return returnList;
} }
/**
* 获取12个友情连接显示
* @return
*/
@Override
public List<CoscoPortalsLinks> friendshipConnections() {
return coscoPortalsLinkService.friendshipConnections();
}
} }

View File

@ -1,22 +1,20 @@
package com.chinaunicom.zyhy.ebtp.supplier.portals.service.impl; package com.chinaunicom.zyhy.ebtp.supplier.portals.service.impl;
import java.util.Date;
import java.util.List;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.chinaunicom.mall.ebtp.common.base.service.impl.BaseServiceImpl; import com.chinaunicom.mall.ebtp.common.base.service.impl.BaseServiceImpl;
import com.chinaunicom.mall.ebtp.common.util.PropertyUtils; import com.chinaunicom.mall.ebtp.common.util.PropertyUtils;
import com.chinaunicom.zyhy.ebtp.supplier.base.constant.UpConstant; import com.chinaunicom.zyhy.ebtp.supplier.base.constant.UpConstant;
import com.chinaunicom.zyhy.ebtp.supplier.base.constant.UserConstant; import com.chinaunicom.zyhy.ebtp.supplier.base.constant.UserConstant;
import com.chinaunicom.zyhy.ebtp.supplier.portals.dao.CoscoPortalsLinksClassificationMapper;
import com.chinaunicom.zyhy.ebtp.supplier.portals.dao.CoscoPortalsLinksMapper; import com.chinaunicom.zyhy.ebtp.supplier.portals.dao.CoscoPortalsLinksMapper;
import com.chinaunicom.zyhy.ebtp.supplier.portals.entity.CoscoPortalsLinks; import com.chinaunicom.zyhy.ebtp.supplier.portals.entity.CoscoPortalsLinks;
import com.chinaunicom.zyhy.ebtp.supplier.portals.entity.CoscoPortalsLinksClassification;
import com.chinaunicom.zyhy.ebtp.supplier.portals.service.ICoscoPortalsLinksService; import com.chinaunicom.zyhy.ebtp.supplier.portals.service.ICoscoPortalsLinksService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.Date;
import java.util.List;
/** /**
* 中远门户_友情链接Service业务层处理 * 中远门户_友情链接Service业务层处理
* *
@ -137,4 +135,13 @@ public class CoscoPortalsLinksServiceImpl extends BaseServiceImpl<CoscoPortalsLi
coscoPortalsLinks.setUpdateBy(UserConstant.USER_NAME); coscoPortalsLinks.setUpdateBy(UserConstant.USER_NAME);
return coscoPortalsLinksMapper.updateCoscoPortalsLinks(coscoPortalsLinks); return coscoPortalsLinksMapper.updateCoscoPortalsLinks(coscoPortalsLinks);
} }
/**
* 获取12个友情连接首页显示
* @return
*/
@Override
public List<CoscoPortalsLinks> friendshipConnections() {
return coscoPortalsLinksMapper.friendshipConnections();
}
} }