|
@@ -2,6 +2,10 @@ package com.iotechn.unimall.admin.api.tourism.impl;
|
|
|
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
|
|
|
|
|
+import com.iotechn.unimall.data.domain.DishClassifyInfo;
|
|
|
|
+import com.iotechn.unimall.data.domain.FoodInfo;
|
|
|
|
+import com.iotechn.unimall.data.domain.NoticeMessageInfo;
|
|
|
|
+import com.iotechn.unimall.data.mapper.NoticeMessageInfoMapper;
|
|
import org.apache.ibatis.session.RowBounds;
|
|
import org.apache.ibatis.session.RowBounds;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
@@ -28,17 +32,20 @@ import org.springframework.transaction.annotation.Transactional;
|
|
public class HomestayInfoServiceImpl implements IHomestayInfoService{
|
|
public class HomestayInfoServiceImpl implements IHomestayInfoService{
|
|
@Autowired
|
|
@Autowired
|
|
private HomestayInfoMapper homestayInfoMapper;
|
|
private HomestayInfoMapper homestayInfoMapper;
|
|
|
|
+ @Autowired
|
|
|
|
+ private NoticeMessageInfoMapper noticeMessageInfoMapper;
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public Boolean add(HomestayInfo homestayInfo) throws ServiceException {
|
|
public Boolean add(HomestayInfo homestayInfo) throws ServiceException {
|
|
Date now = new Date();
|
|
Date now = new Date();
|
|
homestayInfo.setGmtCreate(now);
|
|
homestayInfo.setGmtCreate(now);
|
|
homestayInfo.setGmtUpdate(now);
|
|
homestayInfo.setGmtUpdate(now);
|
|
|
|
+ homestayInfo.setStatus("审核中");
|
|
return homestayInfoMapper.insert(homestayInfo)>0;
|
|
return homestayInfoMapper.insert(homestayInfo)>0;
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- public Page<HomestayInfo> list(Long commonId,String phone,String realname,String personNo,String personImageFront,String personImageBack,Date gmtCreate,Date gmtUpdate,Long deleteFlag, Integer page, Integer limit)throws ServiceException {
|
|
|
|
|
|
+ public Page<HomestayInfo> list(Long commonId,String phone,String realname,String personNo,String personImageFront,String personImageBack,String status,Date gmtCreate,Date gmtUpdate,Long deleteFlag, Integer page, Integer limit)throws ServiceException {
|
|
Wrapper<HomestayInfo> wrapper = new EntityWrapper<HomestayInfo>();
|
|
Wrapper<HomestayInfo> wrapper = new EntityWrapper<HomestayInfo>();
|
|
if (!StringUtils.isEmpty(commonId)) {
|
|
if (!StringUtils.isEmpty(commonId)) {
|
|
wrapper.eq("common_id", commonId);
|
|
wrapper.eq("common_id", commonId);
|
|
@@ -57,6 +64,9 @@ public class HomestayInfoServiceImpl implements IHomestayInfoService{
|
|
}
|
|
}
|
|
if (!StringUtils.isEmpty(personImageBack)) {
|
|
if (!StringUtils.isEmpty(personImageBack)) {
|
|
wrapper.eq("person_image_back", personImageBack);
|
|
wrapper.eq("person_image_back", personImageBack);
|
|
|
|
+ }
|
|
|
|
+ if (!StringUtils.isEmpty(status)) {
|
|
|
|
+ wrapper.eq("status", status);
|
|
}
|
|
}
|
|
if (!StringUtils.isEmpty(gmtCreate)) {
|
|
if (!StringUtils.isEmpty(gmtCreate)) {
|
|
wrapper.eq("gmt_create", gmtCreate);
|
|
wrapper.eq("gmt_create", gmtCreate);
|
|
@@ -98,7 +108,34 @@ public class HomestayInfoServiceImpl implements IHomestayInfoService{
|
|
public HomestayInfo get(Long id) throws ServiceException {
|
|
public HomestayInfo get(Long id) throws ServiceException {
|
|
return homestayInfoMapper.selectById(id);
|
|
return homestayInfoMapper.selectById(id);
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public Boolean handle(HomestayInfo homestayInfo) throws ServiceException {
|
|
|
|
+ HomestayInfo homestayInfo1=homestayInfoMapper.selectById(homestayInfo.getId());
|
|
|
|
+ Date now = new Date();
|
|
|
|
+ //驳回
|
|
|
|
+ if ("已驳回".equals(homestayInfo.getStatus())){
|
|
|
|
+ NoticeMessageInfo noticeMessageInfo=new NoticeMessageInfo();
|
|
|
|
+ noticeMessageInfo.setNewsTitle("系统消息");
|
|
|
|
+ noticeMessageInfo.setNewsContent("您的入驻申请(餐饮),未通过审核。");
|
|
|
|
+ noticeMessageInfo.setReceiveId(homestayInfo1.getCommonId());
|
|
|
|
+ noticeMessageInfo.setGmtCreate(now);
|
|
|
|
+ noticeMessageInfo.setGmtUpdate(now);
|
|
|
|
+ noticeMessageInfoMapper.insert(noticeMessageInfo);
|
|
|
|
+ }
|
|
|
|
+ //通过
|
|
|
|
+ else{
|
|
|
|
+ NoticeMessageInfo noticeMessageInfo=new NoticeMessageInfo();
|
|
|
|
+ noticeMessageInfo.setNewsTitle("系统消息");
|
|
|
|
+ noticeMessageInfo.setNewsContent("您的入驻申请(餐饮),已通过审核。");
|
|
|
|
+ noticeMessageInfo.setReceiveId(homestayInfo1.getCommonId());
|
|
|
|
+ noticeMessageInfo.setGmtCreate(now);
|
|
|
|
+ noticeMessageInfo.setGmtUpdate(now);
|
|
|
|
+ noticeMessageInfoMapper.insert(noticeMessageInfo);
|
|
|
|
+ }
|
|
|
|
+ return homestayInfoMapper.updateById(homestayInfo) > 0;
|
|
|
|
+ }
|
|
|
|
+
|
|
@Override
|
|
@Override
|
|
public String export(Long commonId,String phone,String realname,String personNo,String personImageFront,String personImageBack,Date gmtCreate,Date gmtUpdate,Long deleteFlag, Integer page, Integer limit)throws ServiceException {
|
|
public String export(Long commonId,String phone,String realname,String personNo,String personImageFront,String personImageBack,Date gmtCreate,Date gmtUpdate,Long deleteFlag, Integer page, Integer limit)throws ServiceException {
|
|
Wrapper<HomestayInfo> wrapper = new EntityWrapper<HomestayInfo>();
|
|
Wrapper<HomestayInfo> wrapper = new EntityWrapper<HomestayInfo>();
|