Commit 2e9333ee by tyk

经验交流代码提交

parent 3eb1af3d
......@@ -4,10 +4,7 @@ package com.qianhe.controller;
import com.qianhe.common.core.controller.BaseController;
import com.qianhe.common.core.domain.AjaxResult;
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.domain.*;
import com.qianhe.service.IJygxBmjjService;
import com.qianhe.service.IJygxCljwhService;
import com.qianhe.service.IJygxWzglService;
......@@ -124,4 +121,15 @@ public class JygxSyController extends BaseController
List<JygxWzgl> list = jygxWzglService.selectsyssList(jygxWzgl);
return getDataTable(list);
}
/**
* 首页经验交流
*/
@GetMapping("/syjyjl")
public TableDataInfo syjyjl()
{
List<Jyjl> list = jygxWzglService.selectjyjlList();
return getDataTable(list);
}
}
package com.qianhe.domain;
import java.util.List;
/**
* 首页-经验交流
*
* @author qianhe
* @date 2024-07-29
*/
public class Jyjl
{
/** 类型名称 */
private String lxmc;
private List<JygxWzgl> jygxWzglList;
public List<JygxWzgl> getJygxWzglList() {
return jygxWzglList;
}
public void setJygxWzglList(List<JygxWzgl> jygxWzglList) {
this.jygxWzglList = jygxWzglList;
}
public String getLxmc() {
return lxmc;
}
public void setLxmc(String lxmc) {
this.lxmc = lxmc;
}
}
package com.qianhe.service;
import com.qianhe.domain.JygxWzgl;
import com.qianhe.domain.Jyjl;
import com.qianhe.domain.Ssfl;
import java.util.List;
......@@ -103,4 +104,9 @@ public interface IJygxWzglService
* 首页搜索类型条数
*/
public List<JygxWzgl> selectsyssList(JygxWzgl jygxWzgl);
/**
* 首页搜索类型条数
*/
public List<Jyjl> selectjyjlList();
}
......@@ -2,14 +2,14 @@ package com.qianhe.service.impl;
import java.math.BigInteger;
import java.security.SecureRandom;
import java.util.ArrayList;
import java.util.List;
import com.qianhe.common.annotation.DataScope;
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.domain.*;
import com.qianhe.mapper.JygxLxwhMapper;
import com.qianhe.mapper.JygxWzglMapper;
import com.qianhe.service.IJygxWzglService;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -28,6 +28,8 @@ public class JygxWzglServiceImpl implements IJygxWzglService
@Autowired
private JygxWzglMapper jygxWzglMapper;
@Autowired
private JygxLxwhMapper jygxLxwhMapper;
/**
* 查询经验共享-文章管理
*
......@@ -236,7 +238,7 @@ public class JygxWzglServiceImpl implements IJygxWzglService
}
/**
* 查询经验共享-文章管理列表
* 首页搜索
*
*/
@Override
......@@ -245,4 +247,34 @@ public class JygxWzglServiceImpl implements IJygxWzglService
return jygxWzglMapper.selectsyssList(jygxWzgl);
}
/**
* 首页经验交流
*/
@Override
public List<Jyjl> selectjyjlList()
{
JygxLxwh jygxLxwh = new JygxLxwh();
jygxLxwh.setMkmc("经验交流");
List<Jyjl> jyjlsList = new ArrayList<>();
List<JygxLxwh> jygxLxwhs = jygxLxwhMapper.selectJygxLxwhList(jygxLxwh);
for (int i = 0; i < jygxLxwhs.size(); i++) {
JygxWzgl jygxWzgl1 = new JygxWzgl();
jygxWzgl1.setLxmc(jygxLxwhs.get(i).getLxmc());
jygxWzgl1.setShzt("4");
List<JygxWzgl> jygxWzgls = jygxWzglMapper.selectJygxWzglList(jygxWzgl1);
if(jygxWzgls.size()>0){
Jyjl jyjls1 = new Jyjl();
jyjls1.setLxmc(jygxLxwhs.get(i).getLxmc());
jyjls1.setJygxWzglList(jygxWzgls);
jyjlsList.add(jyjls1);
}
}
return jyjlsList;
}
}
......@@ -250,12 +250,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
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}, '%')
OR wzbt LIKE concat('%', #{wznr}, '%')
UNION ALL
SELECT
l.lxmc,
......@@ -263,7 +262,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
FROM
jygx_lxwh l
LEFT JOIN
jygx_wzgl w ON l.lxmc = w.lxmc AND w.wznr LIKE concat('%', #{wznr}, '%')
jygx_wzgl w ON l.lxmc = w.lxmc AND w.wznr LIKE concat('%', #{wznr}, '%') OR wzbt LIKE concat('%', #{wznr}, '%')
GROUP BY
l.lxmc
</select>
......@@ -271,10 +270,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectsyssList" parameterType="JygxWzgl" resultMap="JygxWzglResult">
select * from jygx_wzgl d
<where>
wznr LIKE concat('%', #{wznr}, '%')
wznr LIKE concat('%', #{wznr}, '%') OR wzbt LIKE concat('%', #{wznr}, '%')
<if test="lxmc != null and lxmc != ''"> and lxmc = #{lxmc}</if>
</where>
ORDER BY ifnull (px,999999), wzsj desc
</select>
</mapper>
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