Commit 32998fb7 by 吴迪

【新增】获取前四个公告

parent 76e5c9d1
...@@ -111,6 +111,14 @@ public class EanUpcController { ...@@ -111,6 +111,14 @@ public class EanUpcController {
return R.ok().put("data", pageUtils); return R.ok().put("data", pageUtils);
} }
@Login
@RequestMapping("/api/getEanUpcTop4")
// @RequiresPermissions("manage:partners:list")
public R getEanUpcTop4(){
return R.ok().put("data", this.eanUpcService.getEanUpcTop());
}
/** /**
* 详情 * 详情
* @param eanUpcEntity * @param eanUpcEntity
......
...@@ -23,6 +23,7 @@ public interface EanUpcDao extends BaseMapper<EanUpcEntity> { ...@@ -23,6 +23,7 @@ public interface EanUpcDao extends BaseMapper<EanUpcEntity> {
List<EanUpcEntityVo> getEanUpcByCondition (@Param("eanUpcEntity")EanUpcEntity eanUpcEntity, Page page); List<EanUpcEntityVo> getEanUpcByCondition (@Param("eanUpcEntity")EanUpcEntity eanUpcEntity, Page page);
List<EanUpcEntityVo> getEanUpcTop();
EanUpcEntityDetailVo getDetailById(@Param("eanUpcEntity")EanUpcEntity eanUpcEntity); EanUpcEntityDetailVo getDetailById(@Param("eanUpcEntity")EanUpcEntity eanUpcEntity);
......
...@@ -9,6 +9,7 @@ import io.office.modules.manage.vo.request.EanUpcEntityVo; ...@@ -9,6 +9,7 @@ import io.office.modules.manage.vo.request.EanUpcEntityVo;
import io.office.modules.manage.vo.response.EanUpcEntityDetailVo; import io.office.modules.manage.vo.response.EanUpcEntityDetailVo;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map; import java.util.Map;
/** /**
...@@ -26,6 +27,9 @@ public interface EanUpcService extends IService<EanUpcEntity> { ...@@ -26,6 +27,9 @@ public interface EanUpcService extends IService<EanUpcEntity> {
Page<EanUpcEntityVo> getEanUpcByCondition( EanUpcEntity eanUpcEntity, Page page); Page<EanUpcEntityVo> getEanUpcByCondition( EanUpcEntity eanUpcEntity, Page page);
List<EanUpcEntityVo> getEanUpcTop();
EanUpcEntityDetailVo getDetailById(EanUpcEntity eanUpcEntity); EanUpcEntityDetailVo getDetailById(EanUpcEntity eanUpcEntity);
} }
......
...@@ -40,6 +40,11 @@ public class EanUpcServiceImpl extends ServiceImpl<EanUpcDao, EanUpcEntity> impl ...@@ -40,6 +40,11 @@ public class EanUpcServiceImpl extends ServiceImpl<EanUpcDao, EanUpcEntity> impl
} }
@Override @Override
public List<EanUpcEntityVo> getEanUpcTop() {
return this.baseMapper.getEanUpcTop();
}
@Override
public EanUpcEntityDetailVo getDetailById(EanUpcEntity eanUpcEntity) { public EanUpcEntityDetailVo getDetailById(EanUpcEntity eanUpcEntity) {
return baseMapper.getDetailById(eanUpcEntity); return baseMapper.getDetailById(eanUpcEntity);
......
...@@ -9,7 +9,6 @@ import io.office.modules.manage.vo.response.SearchVo; ...@@ -9,7 +9,6 @@ import io.office.modules.manage.vo.response.SearchVo;
import io.office.modules.sys.entity.SysUserEntity; import io.office.modules.sys.entity.SysUserEntity;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
......
...@@ -43,6 +43,34 @@ ...@@ -43,6 +43,34 @@
f_id DESC f_id DESC
</select> </select>
<select id="getEanUpcTop" resultType="io.office.modules.manage.vo.request.EanUpcEntityVo">
SELECT top 4
b.logout_flag AS logout_flag,
a.firm_name,
b.f_id,
b.code,
a.log_date,
b.login_date
FROM
center_outer.dbo.bulletin AS a
INNER JOIN ean_upc AS b ON a.code = b.code
WHERE
(
DATEDIFF(DAY, login_date, getdate()) >= 7
OR b.code = '69507917'
)
AND b.code &lt;&gt; '69305132'
AND type_name IN (
'系统成员注册',
'厂商识别代码注销'
)
ORDER BY
login_date DESC,
f_id DESC
</select>
<select id="getDetailById" parameterType="io.office.modules.manage.entity.EanUpcEntity" resultType="io.office.modules.manage.vo.response.EanUpcEntityDetailVo"> <select id="getDetailById" parameterType="io.office.modules.manage.entity.EanUpcEntity" resultType="io.office.modules.manage.vo.response.EanUpcEntityDetailVo">
SELECT SELECT
a.firm_name, a.firm_name,
......
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