Commit 3eb1af3d by tyk

经验交流代码提交

parent 3eafe167
......@@ -7,6 +7,7 @@ import com.qianhe.common.core.page.TableDataInfo;
import com.qianhe.domain.JygxCljwh;
import com.qianhe.domain.JygxWzgl;
import com.qianhe.domain.JygxYyxtwh;
import com.qianhe.domain.Ssfl;
import com.qianhe.service.IJygxBmjjService;
import com.qianhe.service.IJygxCljwhService;
import com.qianhe.service.IJygxWzglService;
......@@ -102,4 +103,25 @@ public class JygxSyController extends BaseController
return success(jygxBmjjService.selectJygxBmjjById(id));
}
/**
* 首页搜索类型条数
*/
@GetMapping("/sysslx")
public TableDataInfo sysslx(JygxWzgl jygxWzgl)
{
List<Ssfl> list = jygxWzglService.selectcxflList(jygxWzgl);
return getDataTable(list);
}
/**
* 首页搜索
*/
@GetMapping("/syss")
public TableDataInfo syss(JygxWzgl jygxWzgl)
{
List<JygxWzgl> list = jygxWzglService.selectsyssList(jygxWzgl);
return getDataTable(list);
}
}
package com.qianhe.domain;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.qianhe.common.annotation.Excel;
import com.qianhe.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import java.util.Date;
import java.util.List;
/**
* 经验共享-文章管理对象 jygx_wzgl
*
* @author qianhe
* @date 2024-07-29
*/
public class Ssfl
{
/** 名称 */
private String lxmc;
/** 条数 */
private String ts;
public String getLxmc() {
return lxmc;
}
public void setLxmc(String lxmc) {
this.lxmc = lxmc;
}
public String getTs() {
return ts;
}
public void setTs(String ts) {
this.ts = ts;
}
}
......@@ -2,6 +2,7 @@ package com.qianhe.mapper;
import com.qianhe.domain.JygxWzgl;
import com.qianhe.domain.JygxWzglfj;
import com.qianhe.domain.Ssfl;
import org.apache.ibatis.annotations.Param;
import java.util.List;
......@@ -110,4 +111,15 @@ public interface JygxWzglMapper
*/
void deleteFileByBusinessId(@Param("wzid") Long wzid);
/**
* 首页搜索类型条数
*/
public List<Ssfl> selectcxflList(JygxWzgl jygxWzgl);
/**
* 首页搜索
*/
public List<JygxWzgl> selectsyssList(JygxWzgl jygxWzgl);
}
package com.qianhe.service;
import com.qianhe.domain.JygxWzgl;
import com.qianhe.domain.Ssfl;
import java.util.List;
......@@ -92,4 +93,14 @@ public interface IJygxWzglService
* 取消置顶
*/
public int updateqxzd(JygxWzgl jygxWzgl);
/**
* 首页搜索类型条数
*/
public List<Ssfl> selectcxflList(JygxWzgl jygxWzgl);
/**
* 首页搜索类型条数
*/
public List<JygxWzgl> selectsyssList(JygxWzgl jygxWzgl);
}
......@@ -9,6 +9,7 @@ import com.qianhe.common.utils.DateUtils;
import com.qianhe.common.utils.SecurityUtils;
import com.qianhe.domain.JygxWzgl;
import com.qianhe.domain.JygxWzglfj;
import com.qianhe.domain.Ssfl;
import com.qianhe.mapper.JygxWzglMapper;
import com.qianhe.service.IJygxWzglService;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -222,4 +223,26 @@ public class JygxWzglServiceImpl implements IJygxWzglService
{
return jygxWzglMapper.updateqxzd(jygxWzgl);
}
/**
* 首页搜索类型条数
*
*/
@Override
public List<Ssfl> selectcxflList(JygxWzgl jygxWzgl)
{
return jygxWzglMapper.selectcxflList(jygxWzgl);
}
/**
* 查询经验共享-文章管理列表
*
*/
@Override
public List<JygxWzgl> selectsyssList(JygxWzgl jygxWzgl)
{
return jygxWzglMapper.selectsyssList(jygxWzgl);
}
}
......@@ -41,7 +41,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="tzfs != null and tzfs != ''"> and tzfs = #{tzfs}</if>
<if test="fbzt != null and fbzt != ''"> and fbzt = #{fbzt}</if>
</where>
ORDER BY ifnull (px,999999) desc
ORDER BY ifnull (px,999999) asc
</select>
<select id="selectJygxCljwhByCljid" parameterType="Long" resultMap="JygxCljwhResult">
......
......@@ -30,6 +30,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="remark" column="remark" />
<result property="ydsl" column="ydsl" />
</resultMap>
<resultMap type="Ssfl" id="SsflResult">
<result property="lxmc" column="lxmc" />
<result property="ts" column="ts" />
</resultMap>
<sql id="selectJygxWzglVo">
select wzid, px, xxly, lxid, lxmc, wznr, wzbt, shzt, fjmc, fjdz, fjlx, wzzz, wzsj, dept_id, yl2, yl3, yl4, yl5, create_by, create_time, update_by, update_time, remark, ydsl from jygx_wzgl d
......@@ -245,4 +249,32 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<delete id="deleteFileByBusinessId">
delete from jygx_wzglfj where wzid = #{wzid}
</delete>
<select id="selectcxflList" parameterType="JygxWzgl" resultMap="SsflResult">
SELECT '全部' AS lxmc, COUNT(*) AS ts
FROM jygx_wzgl
WHERE wznr LIKE concat('%', #{wznr}, '%')
UNION ALL
SELECT
l.lxmc,
COALESCE(COUNT(w.lxmc), 0) AS ts
FROM
jygx_lxwh l
LEFT JOIN
jygx_wzgl w ON l.lxmc = w.lxmc AND w.wznr LIKE concat('%', #{wznr}, '%')
GROUP BY
l.lxmc
</select>
<select id="selectsyssList" parameterType="JygxWzgl" resultMap="JygxWzglResult">
select * from jygx_wzgl d
<where>
wznr LIKE concat('%', #{wznr}, '%')
<if test="lxmc != null and lxmc != ''"> and lxmc = #{lxmc}</if>
</where>
ORDER BY ifnull (px,999999), wzsj desc
</select>
</mapper>
......@@ -44,7 +44,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="fbzt != null and fbzt != ''"> and fbzt = #{fbzt}</if>
</where>
ORDER BY ifnull (px,999999) desc
ORDER BY ifnull (px,999999) asc
</select>
<select id="selectJygxYyxtwhByYyxtid" parameterType="Long" resultMap="JygxYyxtwhResult">
......
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