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
* @return
*/
@ -143,4 +143,12 @@ public class HomePageController {
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);
/**
* 获取12个友情连接首页显示
* @return
*/
List<CoscoPortalsLinks> friendshipConnections();
}

View File

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

View File

@ -74,6 +74,17 @@
</if>
</where>
</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"
parameterType="com.chinaunicom.zyhy.ebtp.supplier.portals.entity.CoscoPortalsLinks"
resultMap="CoscoPortalsLinksResult">

View File

@ -67,6 +67,8 @@ public class CoscoPortalsCustomerQanda extends BaseEntity {
private Date createTime;
private String addressImg;
private Date updateTime;
@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.chinaunicom.zyhy.ebtp.supplier.base.vo.LinksClassificationVo;
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 java.util.List;
@ -75,4 +76,10 @@ public interface ICoscoPortalsLinksClassificationService {
* @return
*/
List<LinksClassificationVo> getAll();
/**
* 获取12个友情连接首页显示
* @return
*/
List<CoscoPortalsLinks> friendshipConnections();
}

View File

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

View File

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