Browse Source

签到记录列表

master
sunyuchao 3 years ago
parent
commit
9bcde7cfcd
  1. 23
      epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partyOrg/form/PartyActSignFormDTO.java
  2. 13
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/controller/IcPartyActSignInRecordController.java
  3. 8
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/dao/IcPartyActSignInRecordDao.java
  4. 18
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/service/IcPartyActSignInRecordService.java
  5. 22
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/service/impl/IcPartyActSignInRecordServiceImpl.java
  6. 18
      epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partyOrg/IcPartyActSignInRecordDao.xml

23
epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partyOrg/form/PartyActSignFormDTO.java

@ -0,0 +1,23 @@
package com.epmet.resi.partymember.dto.partyOrg.form;
import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
@Data
public class PartyActSignFormDTO implements Serializable {
/**
* 活动Id
*/
@NotBlank(message = "活动Id不能为空",groups = {AddGroup.class})
private String icPartyActId;
private Integer pageNo = 1;
private Integer pageSize = 20;
private Boolean isPage = false;
}

13
epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/controller/IcPartyActSignInRecordController.java

@ -1,15 +1,20 @@
package com.epmet.modules.partyOrg.controller;
import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.aop.NoRepeatSubmit;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.AssertUtils;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.dto.IcMessageDTO;
import com.epmet.dto.form.IcMessageListFormDTO;
import com.epmet.modules.partyOrg.service.IcPartyActSignInRecordService;
import com.epmet.resi.partymember.dto.IcPartyActSignInRecordDTO;
import com.epmet.resi.partymember.dto.partyOrg.form.PartyActSignFormDTO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@ -29,10 +34,10 @@ public class IcPartyActSignInRecordController {
@Autowired
private IcPartyActSignInRecordService icPartyActSignInRecordService;
@RequestMapping("page")
public Result<PageData<IcPartyActSignInRecordDTO>> page(@RequestParam Map<String, Object> params){
PageData<IcPartyActSignInRecordDTO> page = icPartyActSignInRecordService.page(params);
return new Result<PageData<IcPartyActSignInRecordDTO>>().ok(page);
@RequestMapping("list")
public Result<PageData<IcPartyActSignInRecordDTO>> list(@RequestBody PartyActSignFormDTO formDTO){
ValidatorUtils.validateEntity(formDTO, AddGroup.class);
return new Result<PageData<IcPartyActSignInRecordDTO>>().ok(icPartyActSignInRecordService.list(formDTO));
}
@RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET})

8
epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/dao/IcPartyActSignInRecordDao.java

@ -2,7 +2,11 @@ package com.epmet.modules.partyOrg.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.modules.partyOrg.entity.IcPartyActSignInRecordEntity;
import com.epmet.resi.partymember.dto.IcPartyActSignInRecordDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 党组织活动签到记录表
@ -12,5 +16,7 @@ import org.apache.ibatis.annotations.Mapper;
*/
@Mapper
public interface IcPartyActSignInRecordDao extends BaseDao<IcPartyActSignInRecordEntity> {
List<IcPartyActSignInRecordDTO> selectSignList(@Param("icPartyActId") String icPartyActId);
}

18
epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/service/IcPartyActSignInRecordService.java

@ -4,9 +4,7 @@ import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.modules.partyOrg.entity.IcPartyActSignInRecordEntity;
import com.epmet.resi.partymember.dto.IcPartyActSignInRecordDTO;
import java.util.List;
import java.util.Map;
import com.epmet.resi.partymember.dto.partyOrg.form.PartyActSignFormDTO;
/**
* 党组织活动签到记录表
@ -16,25 +14,15 @@ import java.util.Map;
*/
public interface IcPartyActSignInRecordService extends BaseService<IcPartyActSignInRecordEntity> {
/**
* 默认分页
*
* @param params
* @return PageData<IcPartyActSignInRecordDTO>
* @author generator
* @date 2022-08-18
*/
PageData<IcPartyActSignInRecordDTO> page(Map<String, Object> params);
/**
* 默认查询
*
* @param params
* @param formDTO
* @return java.util.List<IcPartyActSignInRecordDTO>
* @author generator
* @date 2022-08-18
*/
List<IcPartyActSignInRecordDTO> list(Map<String, Object> params);
PageData<IcPartyActSignInRecordDTO> list(PartyActSignFormDTO formDTO);
/**
* 单条查询

22
epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/service/impl/IcPartyActSignInRecordServiceImpl.java

@ -7,10 +7,15 @@ import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.dto.IcMessageDTO;
import com.epmet.dto.form.IcMessageListFormDTO;
import com.epmet.modules.partyOrg.dao.IcPartyActSignInRecordDao;
import com.epmet.modules.partyOrg.entity.IcPartyActSignInRecordEntity;
import com.epmet.modules.partyOrg.service.IcPartyActSignInRecordService;
import com.epmet.resi.partymember.dto.IcPartyActSignInRecordDTO;
import com.epmet.resi.partymember.dto.partyOrg.form.PartyActSignFormDTO;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@ -28,20 +33,13 @@ import java.util.Map;
@Service
public class IcPartyActSignInRecordServiceImpl extends BaseServiceImpl<IcPartyActSignInRecordDao, IcPartyActSignInRecordEntity> implements IcPartyActSignInRecordService {
@Override
public PageData<IcPartyActSignInRecordDTO> page(Map<String, Object> params) {
IPage<IcPartyActSignInRecordEntity> page = baseDao.selectPage(
getPage(params, FieldConstant.CREATED_TIME, false),
getWrapper(params)
);
return getPageData(page, IcPartyActSignInRecordDTO.class);
}
@Override
public List<IcPartyActSignInRecordDTO> list(Map<String, Object> params) {
List<IcPartyActSignInRecordEntity> entityList = baseDao.selectList(getWrapper(params));
return ConvertUtils.sourceToTarget(entityList, IcPartyActSignInRecordDTO.class);
public PageData<IcPartyActSignInRecordDTO> list(PartyActSignFormDTO formDTO) {
PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize(), formDTO.getIsPage());
List<IcPartyActSignInRecordDTO> list = baseDao.selectSignList(formDTO.getIcPartyActId());
PageInfo<IcPartyActSignInRecordDTO> pageInfo = new PageInfo<>(list);
return new PageData<>(list, pageInfo.getTotal());
}
private QueryWrapper<IcPartyActSignInRecordEntity> getWrapper(Map<String, Object> params){

18
epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partyOrg/IcPartyActSignInRecordDao.xml

@ -3,4 +3,22 @@
<mapper namespace="com.epmet.modules.partyOrg.dao.IcPartyActSignInRecordDao">
<select id="selectSignList" resultType="com.epmet.resi.partymember.dto.IcPartyActSignInRecordDTO">
SELECT
id,
customer_id,
ic_party_act_id,
id_card,
epmet_user_id,
user_real_name,
address,
latitude,
longitude
FROM
ic_party_act_sign_in_record
WHERE
del_flag = '0'
AND ic_party_act_id = #{icPartyActId}
</select>
</mapper>
Loading…
Cancel
Save