Commit 96f69661 authored by Shen's avatar Shen

1. 报名信息添加本机构活动

parent d3bf0d24
......@@ -62,13 +62,12 @@ public class PensionEventController {
@ApiImplicitParam(name = Constant.PAGE, value = "当前页码,从1开始", paramType = "query", required = true, dataType="int") ,
@ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataType="int") ,
@ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataType="String") ,
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataType="String")
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataType="String"),
@ApiImplicitParam(name = "orgId", value = "机构Id", paramType = "query", dataType="String")
})
@RequiresPermissions("serviceOrder:pensionevent:page")
public Result<PageData<PensionEventDTO>> eventByOrg(@ApiIgnore @RequestParam Map<String, Object> params){
params.put("event_org_id", SecurityUser.getUser());
PageData<PensionEventDTO> page = pensionEventService.page(params);
PageData<PensionEventDTO> page = pensionEventService.getOrgEvent(params);
return new Result<PageData<PensionEventDTO>>().ok(page);
}
......
......@@ -4,6 +4,8 @@ import io.hmit.common.dao.BaseDao;
import io.hmit.modules.serviceOrder.entity.PensionEventEntity;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
* 活动表
*
......@@ -12,5 +14,7 @@ import org.apache.ibatis.annotations.Mapper;
*/
@Mapper
public interface PensionEventDao extends BaseDao<PensionEventEntity> {
List<PensionEventEntity> getOrgEvent(Long orgId);
}
\ No newline at end of file
package io.hmit.modules.serviceOrder.service;
import io.hmit.common.page.PageData;
import io.hmit.common.service.CrudService;
import io.hmit.modules.serviceOrder.dto.PensionEventDTO;
import io.hmit.modules.serviceOrder.entity.PensionEventEntity;
import java.util.Map;
/**
* 活动表
*
......@@ -14,4 +17,6 @@ public interface PensionEventService extends CrudService<PensionEventEntity, Pen
PensionEventDTO updateStatus(Long id, Integer status, String endDesc, String eventClock);
PageData<PensionEventDTO> getOrgEvent(Map<String, Object> params);
}
\ No newline at end of file
......@@ -2,15 +2,20 @@ package io.hmit.modules.serviceOrder.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.hmit.common.enums.EventEnum;
import io.hmit.common.page.PageData;
import io.hmit.common.service.impl.CrudServiceImpl;
import io.hmit.common.utils.ConvertUtils;
import io.hmit.common.utils.SubListForPageUtil;
import io.hmit.modules.serviceOrder.dao.PensionEventDao;
import io.hmit.modules.serviceOrder.dto.EnrollDTO;
import io.hmit.modules.serviceOrder.dto.PensionEventDTO;
import io.hmit.modules.serviceOrder.entity.PensionEventEntity;
import io.hmit.modules.serviceOrder.service.PensionEventService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Map;
/**
......@@ -22,6 +27,9 @@ import java.util.Map;
@Service
public class PensionEventServiceImpl extends CrudServiceImpl<PensionEventDao, PensionEventEntity, PensionEventDTO> implements PensionEventService {
@Autowired
private PensionEventDao pensionEventDao;
@Override
public QueryWrapper<PensionEventEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get("id");
......@@ -32,7 +40,6 @@ public class PensionEventServiceImpl extends CrudServiceImpl<PensionEventDao, Pe
return wrapper;
}
@Override
public PensionEventDTO updateStatus(Long id, Integer status, String endDesc, String eventClock) {
PensionEventEntity pensionEventEntity = selectById(id);
......@@ -60,4 +67,10 @@ public class PensionEventServiceImpl extends CrudServiceImpl<PensionEventDao, Pe
update(ConvertUtils.sourceToTarget(pensionEventEntity, PensionEventDTO.class));
return null;
}
@Override
public PageData<PensionEventDTO> getOrgEvent(Map<String, Object> params) {
List<PensionEventEntity> list = pensionEventDao.getOrgEvent(Long.parseLong(params.get("orgId").toString()));
return getPageData(SubListForPageUtil.getSubList(params, list), list.size(), PensionEventDTO.class);
}
}
\ No newline at end of file
......@@ -28,5 +28,8 @@
<result property="updateDate" column="update_date"/>
</resultMap>
<select id="getOrgEvent" resultType="io.hmit.modules.serviceOrder.entity.PensionEventEntity">
SELECT * FROM pension_event pe WHERE pe.event_org_id = #{orgId}
</select>
</mapper>
\ No newline at end of file
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