Commit 32998fb7 by 吴迪

【新增】获取前四个公告

parent 76e5c9d1
......@@ -111,6 +111,14 @@ public class EanUpcController {
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
......
......@@ -23,6 +23,7 @@ public interface EanUpcDao extends BaseMapper<EanUpcEntity> {
List<EanUpcEntityVo> getEanUpcByCondition (@Param("eanUpcEntity")EanUpcEntity eanUpcEntity, Page page);
List<EanUpcEntityVo> getEanUpcTop();
EanUpcEntityDetailVo getDetailById(@Param("eanUpcEntity")EanUpcEntity eanUpcEntity);
......
......@@ -9,6 +9,7 @@ import io.office.modules.manage.vo.request.EanUpcEntityVo;
import io.office.modules.manage.vo.response.EanUpcEntityDetailVo;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
/**
......@@ -26,6 +27,9 @@ public interface EanUpcService extends IService<EanUpcEntity> {
Page<EanUpcEntityVo> getEanUpcByCondition( EanUpcEntity eanUpcEntity, Page page);
List<EanUpcEntityVo> getEanUpcTop();
EanUpcEntityDetailVo getDetailById(EanUpcEntity eanUpcEntity);
}
......
......@@ -40,6 +40,11 @@ public class EanUpcServiceImpl extends ServiceImpl<EanUpcDao, EanUpcEntity> impl
}
@Override
public List<EanUpcEntityVo> getEanUpcTop() {
return this.baseMapper.getEanUpcTop();
}
@Override
public EanUpcEntityDetailVo getDetailById(EanUpcEntity eanUpcEntity) {
return baseMapper.getDetailById(eanUpcEntity);
......
......@@ -9,7 +9,6 @@ import io.office.modules.manage.vo.response.SearchVo;
import io.office.modules.sys.entity.SysUserEntity;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
......
......@@ -43,6 +43,34 @@
f_id DESC
</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
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