huanghongfa
2021-09-02 177249c76aeea0b4bf8d8816d4994e3b445b45ce
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/service/impl/EventApplicationUserNoticeServiceImpl.java
@@ -1,5 +1,12 @@
package com.panzhihua.service_grid.service.impl;
import java.util.Date;
import javax.annotation.Resource;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@@ -10,15 +17,11 @@
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.model.vos.grid.EventApplicationUserNoticeDetailsVO;
import com.panzhihua.common.model.vos.grid.EventApplicationUserNoticeVO;
import com.panzhihua.service_grid.dao.*;
import com.panzhihua.service_grid.model.dos.*;
import com.panzhihua.service_grid.dao.EventApplicationUserNoticeMapper;
import com.panzhihua.service_grid.model.dos.EventApplicationUserNoticeDO;
import com.panzhihua.service_grid.service.EventApplicationUserNoticeService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.beans.BeanUtils;
import javax.annotation.Resource;
import java.util.Date;
import lombok.extern.slf4j.Slf4j;
/**
 * @auther lyq
@@ -27,12 +30,16 @@
 */
@Slf4j
@Service
public class EventApplicationUserNoticeServiceImpl extends ServiceImpl<EventApplicationUserNoticeMapper, EventApplicationUserNoticeDO> implements EventApplicationUserNoticeService {
public class EventApplicationUserNoticeServiceImpl
    extends ServiceImpl<EventApplicationUserNoticeMapper, EventApplicationUserNoticeDO>
    implements EventApplicationUserNoticeService {
    @Resource
    private EventApplicationUserNoticeMapper eventApplicationUserNoticeMapper;
    /**
     * 新增用户协议和隐私政策信息
     *
     * @param eventApplicationUserNoticeAddDTO
     * @return 新增结果
     */
@@ -48,6 +55,7 @@
    /**
     * 修改用户协议和隐私政策信息
     *
     * @param eventApplicationUserNoticeEditDTO
     * @return 维护结果
     */
@@ -63,10 +71,12 @@
    /**
     * 分页查找用户协议和隐私政策信息
     *
     * @param pageEventApplicationUserNoticeDTO
     * @return 维护结果
     */
    public R<IPage<EventApplicationUserNoticeVO>> query(PageEventApplicationUserNoticeDTO pageEventApplicationUserNoticeDTO){
    public R<IPage<EventApplicationUserNoticeVO>>
        query(PageEventApplicationUserNoticeDTO pageEventApplicationUserNoticeDTO) {
        Page page = new Page(1,10);
        if(pageEventApplicationUserNoticeDTO.getPageNum()!=null) {
            page.setCurrent(pageEventApplicationUserNoticeDTO.getPageNum());
@@ -79,6 +89,7 @@
    /**
     * 删除用户协议和隐私政策信息
     *
     * @param EventApplicationUserNoticeDeleteDTO
     * @return 平台用户信息
     */
@@ -88,13 +99,16 @@
    /**
     * 查询用户协议和隐私政策信息详细信息
     * @param id 用户协议和隐私政策信息 id
     *
     * @param id
     *            用户协议和隐私政策信息 id
     * @return 查找结果
     */
    public R<EventApplicationUserNoticeDetailsVO> eventApplicationUserNoticeDetails(Long id){
        EventApplicationUserNoticeDO eventApplicationUserNoticeDO = eventApplicationUserNoticeMapper.selectById(id);
        if(eventApplicationUserNoticeDO!=null) {
            EventApplicationUserNoticeDetailsVO eventApplicationUserNoticeDetailsVO = new EventApplicationUserNoticeDetailsVO();
            EventApplicationUserNoticeDetailsVO eventApplicationUserNoticeDetailsVO =
                new EventApplicationUserNoticeDetailsVO();
            BeanUtils.copyProperties(eventApplicationUserNoticeDO, eventApplicationUserNoticeDetailsVO);
            return R.ok(eventApplicationUserNoticeDetailsVO);
        }