فهرست منبع

Merge branch 'master' of http://git.zthymaoyi.com/zyw/tourism

高敬炎 2 سال پیش
والد
کامیت
f786c9684f
30فایلهای تغییر یافته به همراه1755 افزوده شده و 35 حذف شده
  1. 2 1
      uni_applet/pages/food/food.vue
  2. 3 2
      uni_merchants_enter/pageA/enter/homestay.vue
  3. 253 5
      uni_merchants_enter/pageA/enter/hotel.vue
  4. 1 1
      uni_merchants_enter/pages/notice/index.vue
  5. 4 1
      unimall-admin-api/src/main/java/com/iotechn/unimall/admin/api/tourism/IDishClassifyInfoService.java
  6. 4 0
      unimall-admin-api/src/main/java/com/iotechn/unimall/admin/api/tourism/IFoodDishesInfoService.java
  7. 13 1
      unimall-admin-api/src/main/java/com/iotechn/unimall/admin/api/tourism/IFoodInfoService.java
  8. 5 1
      unimall-admin-api/src/main/java/com/iotechn/unimall/admin/api/tourism/IHomestayInfoService.java
  9. 73 0
      unimall-admin-api/src/main/java/com/iotechn/unimall/admin/api/tourism/IPlayInfoService.java
  10. 32 2
      unimall-admin-api/src/main/java/com/iotechn/unimall/admin/api/tourism/impl/DishClassifyInfoServiceImpl.java
  11. 17 0
      unimall-admin-api/src/main/java/com/iotechn/unimall/admin/api/tourism/impl/FoodDishesInfoServiceImpl.java
  12. 28 3
      unimall-admin-api/src/main/java/com/iotechn/unimall/admin/api/tourism/impl/FoodGroupInfoServiceImpl.java
  13. 1 0
      unimall-admin-api/src/main/java/com/iotechn/unimall/admin/api/tourism/impl/FoodGroupOrderInfoServiceImpl.java
  14. 152 9
      unimall-admin-api/src/main/java/com/iotechn/unimall/admin/api/tourism/impl/FoodInfoServiceImpl.java
  15. 49 2
      unimall-admin-api/src/main/java/com/iotechn/unimall/admin/api/tourism/impl/HomestayInfoServiceImpl.java
  16. 166 0
      unimall-admin-api/src/main/java/com/iotechn/unimall/admin/api/tourism/impl/PlayInfoServiceImpl.java
  17. 73 0
      unimall-admin/src/api/tourism/playInfo.js
  18. 463 0
      unimall-admin/src/views/playInfo/index.vue
  19. 6 2
      unimall-data/src/main/java/com/iotechn/unimall/data/domain/DishClassifyInfo.java
  20. 5 0
      unimall-data/src/main/java/com/iotechn/unimall/data/domain/FoodDishesInfo.java
  21. 45 2
      unimall-data/src/main/java/com/iotechn/unimall/data/domain/FoodGroupInfo.java
  22. 1 1
      unimall-data/src/main/java/com/iotechn/unimall/data/domain/FoodGroupOrderInfo.java
  23. 51 0
      unimall-data/src/main/java/com/iotechn/unimall/data/domain/FoodInfo.java
  24. 54 1
      unimall-data/src/main/java/com/iotechn/unimall/data/domain/HomestayInfo.java
  25. 121 0
      unimall-data/src/main/java/com/iotechn/unimall/data/domain/PlayInfo.java
  26. 4 0
      unimall-data/src/main/java/com/iotechn/unimall/data/mapper/FoodInfoMapper.java
  27. 13 0
      unimall-data/src/main/java/com/iotechn/unimall/data/mapper/PlayInfoMapper.java
  28. 51 0
      unimall-data/src/main/java/com/iotechn/unimall/data/util/EntCoordUtil.java
  29. 56 1
      unimall-data/src/main/resources/com/iotechn/unimall/data/mapper/FoodInfoMapper.xml
  30. 9 0
      unimall-data/src/main/resources/com/iotechn/unimall/data/mapper/PlayInfoMapper.xml

+ 2 - 1
uni_applet/pages/food/food.vue

@@ -245,11 +245,12 @@
 						uni.showLoading({
 							title: '数据加载中'
 						})
-						await that.$request.baseRequest('admin.tourism.foodInfo', 'list', {
+						await that.$request.baseRequest('admin.tourism.foodInfo', 'foodList', {
 							page: page.num,
 							limit: page.size,
 							searchType: this.searchType,
 							label: this.label,
+							place:this.detailedAddress,
 						}, failres => {
 							uni.showToast({
 								icon: "none",

+ 3 - 2
uni_merchants_enter/pageA/enter/homestay.vue

@@ -50,7 +50,7 @@
 						</u-input>
 					</u-form-item>
 				</u-form-item>
-				<!-- <u-form-item>
+				<u-form-item>
 					<view class="flex service align-center">
 						<view @click='' :class='consentStatus?"icon_merchants_entergouxuan":"icon_merchants_enterweigouxuan"' class="iconfont_no"></view>
 						我已阅读并同意
@@ -58,7 +58,7 @@
 							url="/pageA/webview?can_share=false&url=https://liangxin.zthymaoyi.com/userAgreement.html"
 							class="path" hover-class="navigator-hover">《民宿入驻协议》</navigator>的相关规定
 					</view>
-				</u-form-item> -->
+				</u-form-item>
 			</u--form>
 			<view class="footer">
 				<button @click='submit' class="submit">提交</button>
@@ -77,6 +77,7 @@
 			return {
 				form:{
 					commonId:uni.getStorageSync("userInfo").id,
+					type:"1",
 				},
 				consentStatus:false,
 				tips:'发送验证码',

+ 253 - 5
uni_merchants_enter/pageA/enter/hotel.vue

@@ -1,22 +1,270 @@
 <template>
-	<view>
-		
+	<view class='content'>
+		<view class='wrap'>
+			<u--form  ref="uForm">
+				<u-form-item labelWidth='80' labelPosition='top' label="营业执照">
+					<u-upload height='208' width='320' :fileList="fileList2" @afterRead="afterRead($event,1)" @delete="deletePic" name="2" multiple
+						:maxCount="1">
+						<image style='width:680rpx;height:417rpx;' src="../../static/image/enter/yingyezhizhao.png" mode=""></image>
+					</u-upload>
+				</u-form-item>
+				<uni-calendar
+				   :insert="false"
+				   :lunar="true" 
+					ref="calendar"
+				   :start-date="startDate"
+				   @confirm="confirm"
+				    />
+					<u-form-item  labelWidth='150' labelPosition='left' label="酒店名称">
+						<u-input inputAlign='right' border='none' placeholder='输入酒店名称' v-model="form.hotelName" />
+					</u-form-item>
+					<u-form-item labelWidth='80' labelPosition='left' @click='placeSelect(),hideKeyboard()' label="店铺位置">
+						<view style='text-align:right;' v-if="form.province">{{ form.province }}{{ form.city }}{{ form.area }}</view>
+						<view style='text-align:right;' v-else>
+							<text style='text-align:right;'>选择位置 </text>
+							<image src="@/static/image/yjt.png" mode=""
+								style="margin-left:10rpx;width:12rpx;height: 21rpx;"></image>
+						</view>
+					</u-form-item>
+					<u-form-item labelWidth='80' labelPosition='left' label="详细地址">
+						<u-input inputAlign='right' maxlength="15" border='none' placeholder='输入详细地址,不超过15个字' v-model="form.detailedAddress" />
+					</u-form-item>
+					<u-form-item  labelWidth='150' labelPosition='left' label="法人姓名">
+						<u-input inputAlign='right' border='none' placeholder='输入法人姓名' v-model="form.legalName" />
+					</u-form-item>
+					<u-form-item  labelWidth='150' labelPosition='left' label="联系人">
+						<u-input inputAlign='right' border='none' placeholder='输入联系人姓名' v-model="form.realname" />
+					</u-form-item>
+					<u-form-item  labelWidth='150' labelPosition='left' label="手机号">
+						<u-input inputAlign='right' border='none' placeholder='输入手机号' v-model="form.phone" />
+					</u-form-item>
+					<u-form-item  labelWidth='150' labelPosition='left' label="验证码">
+						<u-input inputAlign='right' border='none' placeholder='输入验证码' v-model="form.verifyCode" >
+							<template slot="suffix">
+								<u-code ref="uCode"
+									@change="codeChange"
+									seconds="60"
+									changeText="X秒重新获取"
+								></u-code>
+
+								<view class='get_code' @click='getCode'>{{tips}}</view>
+							</template>
+						</u-input>
+					</u-form-item>
+				</u-form-item>
+				<u-form-item  labelWidth='150' labelPosition='left' label="酒店座机(选填)">
+					<u-input inputAlign='right' border='none' placeholder='输入座机号' v-model="form.landlinePhone" />
+				</u-form-item>
+				<u-form-item>
+					<view class="flex service align-center">
+						<view @click='' :class='consentStatus?"icon_merchants_entergouxuan":"icon_merchants_enterweigouxuan"' class="iconfont_no"></view>
+						我已阅读并同意
+						<navigator
+							url="/pageA/webview?can_share=false&url=https://liangxin.zthymaoyi.com/userAgreement.html"
+							class="path" hover-class="navigator-hover">《酒店入驻协议》</navigator>的相关规定
+					</view>
+				</u-form-item>
+			</u--form>
+			<view class="footer">
+				<button @click='submit' class="submit">提交</button>
+			</view>
+			<u-modal :show="isSubmit" :content='content' @confirm="$u.debounce(confirmSubmit, 500)" showCancelButton
+				@cancel="isSubmit=false" @close="isSubmit=false" closeOnClickOverlay></u-modal>
+		</view>
 	</view>
 </template>
 
 <script>
+	var that
+	import uploadImage from '@/components/ossutil/uploadFile.js';
 	export default {
 		data() {
 			return {
-				
+				form:{
+					commonId:uni.getStorageSync("userInfo").id,
+					type:"2",
+				},
+				consentStatus:false,
+				tips:'发送验证码',
+				startDate:'',
+				isSubmit:false,
+				fileList2:[],
+				content:'确定提交入驻信息',
 			}
 		},
+		onLoad() {
+			that = this
+		},
+		onShow(){
+			var date = new Date().toISOString().slice(0, 10)
+			this.startDate=date
+		},
 		methods: {
-			
+			codeChange(text) {
+			    this.tips = text;
+			},
+			getCode() {
+				if(!this.form.phone){
+					uni.showToast({
+						icon: "none",
+						title: '请输入手机号再获取验证码!',
+						duration: 2000
+					});
+					return
+				}
+			    if (this.$refs.uCode.canGetCode) {
+			         // 模拟向后端请求验证码
+			        uni.showLoading({
+			        title: '正在获取验证码'
+			        })
+					this.$request.baseRequest('user', 'sendVerifyCode', {
+						phone: this.form.phone
+					}, failres => {
+						uni.showToast({
+							icon: "none",
+							title: failres.errmsg,
+							duration: 3000
+						});
+						uni.hideLoading()
+					}).then(res => {
+						
+								
+					})
+			        setTimeout(() => {
+			            uni.hideLoading();
+			            // 这里此提示会被this.start()方法中的提示覆盖
+			         
+			            // 通知验证码组件内部开始倒计时
+			            this.$refs.uCode.start();
+			        }, 2000);
+			    } else {
+			        uni.showToast({
+			        	icon: "success",
+			        	title: '提交成功!',
+			        	duration: 2000
+			        });
+			    }
+			},
+			submit(){
+				this.isSubmit = true
+			},
+			placeSelect() {
+				uni.chooseLocation({
+					success: function(res) {
+						console.log(res);
+						that.form.location = res.latitude + ',' + res.longitude
+						let _address = that.$helper.formatLocation(res.address)
+						console.log(_address)
+						that.form.province = _address.Province
+						that.form.city = _address.City
+						that.form.area = _address.Country
+						that.form.detailedAddress = _address.Village
+						that.$forceUpdate()
+					}
+				});
+			},
+			hideKeyboard() {
+				uni.hideKeyboard()
+			},
+			confirmSubmit(){
+				uni.showLoading({
+					title: '加载中',
+					mask: true
+				})
+				this.$request.baseRequest('admin.tourism.homestayInfo', 'add', {
+					homestayInfo: JSON.stringify(this.form)
+				}, failres => {
+					uni.showToast({
+						icon: "none",
+						title: failres.errmsg,
+						duration: 3000
+					});
+							
+					uni.hideLoading()
+				}).then(res => {
+					this.isSubmit = false
+					uni.showToast({
+						icon: "success",
+						title: '提交成功,请等待平台审核',
+						duration: 2000
+					});
+					uni.navigateBack()
+							
+				})
+			},
+			// 删除图片
+			deletePic(event,status) {
+				this[`fileList${event.name}`].splice(event.index, 1)
+			},
+			// 新增图片
+			async afterRead(event,status) {
+				// 当设置 multiple 为 true 时, file 为数组格式,否则为对象格式
+				let lists = [].concat(event.file)
+				let fileListLen = this[`fileList${event.name}`].length
+				lists.map((item) => {
+					this[`fileList${event.name}`].push({
+						...item,
+						status: 'uploading',
+						message: '上传中'
+					})
+				})
+				for (let i = 0; i < lists.length; i++) {
+					const result = await this.uploadFilePromise(lists[i].url,status)
+					
+					let item = this[`fileList${event.name}`][fileListLen]
+					this[`fileList${event.name}`].splice(fileListLen, 1, Object.assign(item, {
+						status: 'success',
+						message: '',
+						url: result
+					}))
+					fileListLen++
+					console.log(that.form, this[`fileList${event.name}`])
+					
+				}
+			},
+			uploadFilePromise(res,status) {
+				return new Promise((resolve, reject) => {
+					uploadImage(res, 'cardImages/',
+						result => {
+							if(status==1){
+								that.form.businessLicense = result
+							}
+							resolve(res)
+						}
+					)
+				})
+			},
 		}
 	}
 </script>
 
-<style>
+<style lang='scss' scoped>
+ .wrap{
+	 padding:20rpx;
+ }
+ .icon_merchants_enterjian1{
+	 margin-left:10rpx;
+	 font-size:50rpx;
+ }
+ .add_label,.get_code{
 
+	background: #5F7DE9;
+	color: #fff;
+	padding: 10rpx 20rpx;
+	border-radius: 10rpx;
+	font-size: 26rpx;
+ }
+ .circle{
+ 	margin:110rpx 0 20rpx 0;
+ }
+ .path {
+ 	color: #2772FB;
+ 
+ }
+ .icon_merchants_enterweigouxuan{
+	 color:#999;
+ }
+ .icon_merchants_entergouxuan{
+	 color:#5F7DE9;
+ }
 </style>

+ 1 - 1
uni_merchants_enter/pages/notice/index.vue

@@ -37,7 +37,7 @@
 						title: '数据加载中'
 					})
 				this.$request.baseRequest('admin.tourism.noticeMessageInfo', 'list',{
-					// receiveId:uni.getStorageSync("userInfo").id,
+					receiveId:uni.getStorageSync("userInfo").id,
 				}, failres => {
 					uni.showToast({
 						icon:"none",

+ 4 - 1
unimall-admin-api/src/main/java/com/iotechn/unimall/admin/api/tourism/IDishClassifyInfoService.java

@@ -42,7 +42,10 @@ public interface IDishClassifyInfoService{
 
 	@HttpMethod(description = "查询", permissionName = "菜品分类管理")
 	public DishClassifyInfo get(@NotNull @HttpParam(name = "id", type = HttpParamType.COMMON, description = "")Long id)throws ServiceException;
-	
+
+	@HttpMethod(description = "置顶",  permissionName = "菜品分类管理")
+	public Boolean top(@NotNull @HttpParam(name = "dishClassifyInfo", type = HttpParamType.COMMON, description = "菜品分类") DishClassifyInfo dishClassifyInfo)throws ServiceException;
+
 	@HttpMethod(description = "导出excl表",  permissionName = "菜品分类管理")
 	public String export(
 								@HttpParam(name = "foodId", type = HttpParamType.COMMON, description = "餐饮入驻表id") Long foodId,

+ 4 - 0
unimall-admin-api/src/main/java/com/iotechn/unimall/admin/api/tourism/IFoodDishesInfoService.java

@@ -1,6 +1,7 @@
 package com.iotechn.unimall.admin.api.tourism;
 
 
+import com.iotechn.unimall.data.domain.DishClassifyInfo;
 import com.iotechn.unimall.data.domain.FoodDishesInfo;
 import com.iotechn.unimall.core.annotation.HttpMethod;
 import com.iotechn.unimall.core.annotation.HttpOpenApi;
@@ -42,6 +43,9 @@ public interface IFoodDishesInfoService{
 	@HttpMethod(description = "修改",  permissionName = "餐饮菜品信息管理")
 	public Boolean update(@NotNull @HttpParam(name = "foodDishesInfo", type = HttpParamType.COMMON, description = "餐饮菜品信息") FoodDishesInfo foodDishesInfo)throws ServiceException;
 
+	@HttpMethod(description = "置顶",  permissionName = "餐饮菜品信息管理")
+	public Boolean top(@NotNull @HttpParam(name = "foodDishesInfo", type = HttpParamType.COMMON, description = "餐饮菜品信息") FoodDishesInfo foodDishesInfo)throws ServiceException;
+
 	@HttpMethod(description = "查询", permissionName = "餐饮菜品信息管理")
 	public FoodDishesInfo get(@NotNull @HttpParam(name = "id", type = HttpParamType.COMMON, description = "")Long id)throws ServiceException;
 	

+ 13 - 1
unimall-admin-api/src/main/java/com/iotechn/unimall/admin/api/tourism/IFoodInfoService.java

@@ -52,7 +52,19 @@ public interface IFoodInfoService{
 					@HttpParam(name = "page", type = HttpParamType.COMMON, description = "页码", valueDef = "1") Integer page,
 		@HttpParam(name = "limit", type = HttpParamType.COMMON, description = "页码长度", valueDef = "20") Integer limit)
 		throws ServiceException;
-
+	@HttpMethod(description = "客户端美食列表", permissionName = "餐饮入驻信息管理")
+	public Page<FoodInfo> foodList(
+			@HttpParam(name = "commonId", type = HttpParamType.COMMON, description = "个人id") Long commonId,
+			@HttpParam(name = "location", type = HttpParamType.COMMON, description = "定位") String location,
+			@HttpParam(name = "label", type = HttpParamType.COMMON, description = "标签") String label,
+			@HttpParam(name = "searchKeyWord", type = HttpParamType.COMMON, description = "模糊查询") String searchKeyWord,
+			@HttpParam(name = "searchType", type = HttpParamType.COMMON, description = "查询类型") String searchType,
+			@HttpParam(name = "userLongitude", type = HttpParamType.COMMON, description = "用户经度") String userLongitude,
+			@HttpParam(name = "userLatitude", type = HttpParamType.COMMON, description = "用户纬度") String userLatitude,
+			@HttpParam(name = "place", type = HttpParamType.COMMON, description = "用户定位的地址") String place,
+			@HttpParam(name = "page", type = HttpParamType.COMMON, description = "页码", valueDef = "1") Integer page,
+			@HttpParam(name = "limit", type = HttpParamType.COMMON, description = "页码长度", valueDef = "20") Integer limit)
+			throws ServiceException;
 	@HttpMethod(description = "删除",permissionName = "餐饮入驻信息管理")
 	public Boolean delete(@NotNull @HttpParam(name = "id", type = HttpParamType.COMMON, description = "")String id)throws ServiceException;
 

+ 5 - 1
unimall-admin-api/src/main/java/com/iotechn/unimall/admin/api/tourism/IHomestayInfoService.java

@@ -31,6 +31,7 @@ public interface IHomestayInfoService{
 							@HttpParam(name = "personNo", type = HttpParamType.COMMON, description = "身份证号") String personNo,
 							@HttpParam(name = "personImageFront", type = HttpParamType.COMMON, description = "身份证正面") String personImageFront,
 							@HttpParam(name = "personImageBack", type = HttpParamType.COMMON, description = "身份证背面") String personImageBack,
+							@HttpParam(name = "status", type = HttpParamType.COMMON, description = "状态") String status,
 							@HttpParam(name = "gmtCreate", type = HttpParamType.COMMON, description = "") Date gmtCreate,
 							@HttpParam(name = "gmtUpdate", type = HttpParamType.COMMON, description = "") Date gmtUpdate,
 							@HttpParam(name = "deleteFlag", type = HttpParamType.COMMON, description = "删除标识") Long deleteFlag,
@@ -46,7 +47,10 @@ public interface IHomestayInfoService{
 
 	@HttpMethod(description = "查询", permissionName = "民宿入驻信息管理")
 	public HomestayInfo get(@NotNull @HttpParam(name = "id", type = HttpParamType.COMMON, description = "")Long id)throws ServiceException;
-	
+
+	@HttpMethod(description = "民宿酒店入驻审核",  permissionName = "民宿入驻信息管理")
+	public Boolean handle(@NotNull @HttpParam(name = "homestayInfo", type = HttpParamType.COMMON, description = "民宿入驻管理") HomestayInfo homestayInfo)throws ServiceException;
+
 	@HttpMethod(description = "导出excl表",  permissionName = "民宿入驻信息管理")
 	public String export(
 								@HttpParam(name = "commonId", type = HttpParamType.COMMON, description = "个人id") Long commonId,

+ 73 - 0
unimall-admin-api/src/main/java/com/iotechn/unimall/admin/api/tourism/IPlayInfoService.java

@@ -0,0 +1,73 @@
+package com.iotechn.unimall.admin.api.tourism;
+
+
+import com.iotechn.unimall.data.domain.PlayInfo;
+import com.iotechn.unimall.core.annotation.HttpMethod;
+import com.iotechn.unimall.core.annotation.HttpOpenApi;
+import com.iotechn.unimall.core.annotation.HttpParam;
+import com.iotechn.unimall.core.annotation.HttpParamType;
+import com.iotechn.unimall.core.annotation.param.NotNull;
+import com.iotechn.unimall.core.exception.ServiceException;
+import com.iotechn.unimall.data.model.Page;
+import java.util.Date;
+
+/**
+ * 游玩信息Service接口
+ * 
+ * @author jlb
+ * @date 2023-06-13
+ */
+@HttpOpenApi(group = "admin.tourism.playInfo", description = "游玩信息")
+public interface IPlayInfoService{
+	@HttpMethod(description = "新增",   permissionName = "游玩信息管理")
+	public Boolean add(@NotNull @HttpParam(name = "playInfo", type = HttpParamType.COMMON, description = "游玩信息") PlayInfo playInfo)throws ServiceException;
+
+	@HttpMethod(description = "列表", permissionName = "游玩信息管理")
+	public Page<PlayInfo> list(
+								@HttpParam(name = "commonId", type = HttpParamType.COMMON, description = "个人id") Long commonId,
+							@HttpParam(name = "title", type = HttpParamType.COMMON, description = "标题") String title,
+							@HttpParam(name = "makeUser", type = HttpParamType.COMMON, description = "发布人") String makeUser,
+							@HttpParam(name = "releaseContent", type = HttpParamType.COMMON, description = "发布内容") String releaseContent,
+							@HttpParam(name = "cover", type = HttpParamType.COMMON, description = "封面") String cover,
+							@HttpParam(name = "province", type = HttpParamType.COMMON, description = "省") String province,
+							@HttpParam(name = "city", type = HttpParamType.COMMON, description = "市") String city,
+							@HttpParam(name = "area", type = HttpParamType.COMMON, description = "区") String area,
+							@HttpParam(name = "location", type = HttpParamType.COMMON, description = "定位") String location,
+							@HttpParam(name = "detailedAddress", type = HttpParamType.COMMON, description = "详细地址") String detailedAddress,
+							@HttpParam(name = "status", type = HttpParamType.COMMON, description = "状态") String status,
+							@HttpParam(name = "gmtCreate", type = HttpParamType.COMMON, description = "") Date gmtCreate,
+							@HttpParam(name = "gmtUpdate", type = HttpParamType.COMMON, description = "") Date gmtUpdate,
+							@HttpParam(name = "deleteFlag", type = HttpParamType.COMMON, description = "删除标识") Long deleteFlag,
+					@HttpParam(name = "page", type = HttpParamType.COMMON, description = "页码", valueDef = "1") Integer page,
+		@HttpParam(name = "limit", type = HttpParamType.COMMON, description = "页码长度", valueDef = "20") Integer limit)
+		throws ServiceException;
+
+	@HttpMethod(description = "删除",permissionName = "游玩信息管理")
+	public Boolean delete(@NotNull @HttpParam(name = "id", type = HttpParamType.COMMON, description = "")String id)throws ServiceException;
+
+	@HttpMethod(description = "修改",  permissionName = "游玩信息管理")
+	public Boolean update(@NotNull @HttpParam(name = "playInfo", type = HttpParamType.COMMON, description = "游玩信息") PlayInfo playInfo)throws ServiceException;
+
+	@HttpMethod(description = "查询", permissionName = "游玩信息管理")
+	public PlayInfo get(@NotNull @HttpParam(name = "id", type = HttpParamType.COMMON, description = "")Long id)throws ServiceException;
+	
+	@HttpMethod(description = "导出excl表",  permissionName = "游玩信息管理")
+	public String export(
+								@HttpParam(name = "commonId", type = HttpParamType.COMMON, description = "个人id") Long commonId,
+							@HttpParam(name = "title", type = HttpParamType.COMMON, description = "标题") String title,
+							@HttpParam(name = "makeUser", type = HttpParamType.COMMON, description = "发布人") String makeUser,
+							@HttpParam(name = "releaseContent", type = HttpParamType.COMMON, description = "发布内容") String releaseContent,
+							@HttpParam(name = "cover", type = HttpParamType.COMMON, description = "封面") String cover,
+							@HttpParam(name = "province", type = HttpParamType.COMMON, description = "省") String province,
+							@HttpParam(name = "city", type = HttpParamType.COMMON, description = "市") String city,
+							@HttpParam(name = "area", type = HttpParamType.COMMON, description = "区") String area,
+							@HttpParam(name = "location", type = HttpParamType.COMMON, description = "定位") String location,
+							@HttpParam(name = "detailedAddress", type = HttpParamType.COMMON, description = "详细地址") String detailedAddress,
+							@HttpParam(name = "status", type = HttpParamType.COMMON, description = "状态") String status,
+							@HttpParam(name = "gmtCreate", type = HttpParamType.COMMON, description = "") Date gmtCreate,
+							@HttpParam(name = "gmtUpdate", type = HttpParamType.COMMON, description = "") Date gmtUpdate,
+							@HttpParam(name = "deleteFlag", type = HttpParamType.COMMON, description = "删除标识") Long deleteFlag,
+				@HttpParam(name = "page", type = HttpParamType.COMMON, description = "页码", valueDef = "1") Integer page,
+	@HttpParam(name = "limit", type = HttpParamType.COMMON, description = "页码长度", valueDef = "20") Integer limit)throws ServiceException;
+	
+}

+ 32 - 2
unimall-admin-api/src/main/java/com/iotechn/unimall/admin/api/tourism/impl/DishClassifyInfoServiceImpl.java

@@ -2,9 +2,12 @@ package com.iotechn.unimall.admin.api.tourism.impl;
 
 import java.util.List;
 
+import com.iotechn.unimall.data.domain.FoodDishesInfo;
+import com.iotechn.unimall.data.mapper.FoodDishesInfoMapper;
 import org.apache.ibatis.session.RowBounds;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import org.springframework.util.CollectionUtils;
 import org.springframework.util.StringUtils;
 
 import com.baomidou.mybatisplus.mapper.EntityWrapper;
@@ -28,6 +31,8 @@ import org.springframework.transaction.annotation.Transactional;
 public class DishClassifyInfoServiceImpl implements IDishClassifyInfoService{
 	@Autowired
 	private DishClassifyInfoMapper dishClassifyInfoMapper;
+	@Autowired
+	private FoodDishesInfoMapper foodDishesInfoMapper;
 	
 	@Override
 	public Boolean add(DishClassifyInfo dishClassifyInfo) throws ServiceException {
@@ -58,8 +63,17 @@ public class DishClassifyInfoServiceImpl implements IDishClassifyInfoService{
 												if (!StringUtils.isEmpty(deleteFlag)) {
 					wrapper.eq("delete_flag", deleteFlag);
 				}
-							wrapper.eq("delete_flag", 0);
+							wrapper.eq("delete_flag", 0).orderBy("top_marking",false);
 		List<DishClassifyInfo> list = dishClassifyInfoMapper.selectPage(new RowBounds((page - 1) * limit, limit), wrapper);
+		if (!CollectionUtils.isEmpty(list)){
+			for (DishClassifyInfo dishClassifyInfo:list){
+				List<FoodDishesInfo> foodDishesInfoList = foodDishesInfoMapper.selectList(new EntityWrapper<FoodDishesInfo>()
+						.eq("food_id",dishClassifyInfo.getFoodId())
+						.eq("classify",dishClassifyInfo.getClassifyName())
+						.orderBy("top_marking",false).orderBy("gmt_create",false));
+				dishClassifyInfo.setDishesNum(foodDishesInfoList.size());
+			}
+		}
 		Integer count = dishClassifyInfoMapper.selectCount(wrapper);
 		return new Page<DishClassifyInfo>(list, page, limit, count);
 	}
@@ -89,7 +103,23 @@ public class DishClassifyInfoServiceImpl implements IDishClassifyInfoService{
 	public DishClassifyInfo get(Long id) throws ServiceException {
 		return dishClassifyInfoMapper.selectById(id);
 	}
-	
+
+	@Override
+	public Boolean top(DishClassifyInfo dishClassifyInfo) throws ServiceException {
+		DishClassifyInfo dishClassifyInfo1 = dishClassifyInfoMapper.selectById(dishClassifyInfo.getId());
+		List<DishClassifyInfo> dishClassifyInfoList = dishClassifyInfoMapper.selectList(new EntityWrapper<DishClassifyInfo>()
+				.eq("food_id", dishClassifyInfo1.getFoodId())
+				.orderBy("top_marking", false)
+				.eq("delete_flag", 0));
+		Long sort=0l;
+		if (!CollectionUtils.isEmpty(dishClassifyInfoList)) {
+			sort=dishClassifyInfoList.get(0).getTopMarking()+1;
+		}
+		dishClassifyInfo1.setTopMarking(sort);
+		dishClassifyInfo1.setGmtUpdate(new Date());
+		return dishClassifyInfoMapper.updateById(dishClassifyInfo1) > 0;
+	}
+
 	@Override
 	public String export(Long foodId,String classifyName,Long topMarking,Date gmtCreate,Date gmtUpdate,Long deleteFlag, Integer page, Integer limit)throws ServiceException {
 		Wrapper<DishClassifyInfo> wrapper = new EntityWrapper<DishClassifyInfo>();

+ 17 - 0
unimall-admin-api/src/main/java/com/iotechn/unimall/admin/api/tourism/impl/FoodDishesInfoServiceImpl.java

@@ -5,6 +5,7 @@ import java.util.List;
 import org.apache.ibatis.session.RowBounds;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import org.springframework.util.CollectionUtils;
 import org.springframework.util.StringUtils;
 
 import com.baomidou.mybatisplus.mapper.EntityWrapper;
@@ -91,6 +92,22 @@ public class FoodDishesInfoServiceImpl implements IFoodDishesInfoService{
 		return foodDishesInfoMapper.updateById(foodDishesInfo)>0;
 	}
 
+	@Override
+	public Boolean top(FoodDishesInfo foodDishesInfo) throws ServiceException {
+		FoodDishesInfo foodDishesInfo1 = foodDishesInfoMapper.selectById(foodDishesInfo.getId());
+		List<FoodDishesInfo> foodDishesInfoList = foodDishesInfoMapper.selectList(new EntityWrapper<FoodDishesInfo>()
+				.eq("food_id", foodDishesInfo1.getFoodId())
+				.orderBy("top_marking", false)
+				.eq("delete_flag", 0));
+		Long sort=0l;
+		if (!CollectionUtils.isEmpty(foodDishesInfoList)) {
+			sort=foodDishesInfoList.get(0).getTopMarking()+1;
+		}
+		foodDishesInfo1.setTopMarking(sort);
+		foodDishesInfo1.setGmtUpdate(new Date());
+		return foodDishesInfoMapper.updateById(foodDishesInfo1) > 0;
+	}
+
 	@Override
 	public FoodDishesInfo get(Long id) throws ServiceException {
 		return foodDishesInfoMapper.selectById(id);

+ 28 - 3
unimall-admin-api/src/main/java/com/iotechn/unimall/admin/api/tourism/impl/FoodGroupInfoServiceImpl.java

@@ -2,9 +2,13 @@ package com.iotechn.unimall.admin.api.tourism.impl;
 
 import java.util.List;
 
+import com.iotechn.unimall.data.domain.*;
+import com.iotechn.unimall.data.mapper.DishClassifyInfoMapper;
+import com.iotechn.unimall.data.mapper.FoodGroupDetailInfoMapper;
 import org.apache.ibatis.session.RowBounds;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import org.springframework.util.CollectionUtils;
 import org.springframework.util.StringUtils;
 
 import com.baomidou.mybatisplus.mapper.EntityWrapper;
@@ -12,7 +16,6 @@ import com.baomidou.mybatisplus.mapper.Wrapper;
 import com.iotechn.unimall.core.exception.ServiceException;
 import com.iotechn.unimall.data.util.ExcelUtil;
 import com.iotechn.unimall.data.mapper.FoodGroupInfoMapper;
-import com.iotechn.unimall.data.domain.FoodGroupInfo;
 import com.iotechn.unimall.admin.api.tourism.IFoodGroupInfoService;
 import com.iotechn.unimall.data.model.Page;
 import java.util.Date;
@@ -28,13 +31,26 @@ import org.springframework.transaction.annotation.Transactional;
 public class FoodGroupInfoServiceImpl implements IFoodGroupInfoService{
 	@Autowired
 	private FoodGroupInfoMapper foodGroupInfoMapper;
+	@Autowired
+	private FoodGroupDetailInfoMapper foodGroupDetailInfoMapper;
+	@Autowired
+	private DishClassifyInfoMapper dishClassifyInfoMapper;
 	
 	@Override
 	public Boolean add(FoodGroupInfo foodGroupInfo) throws ServiceException {
 		Date now = new Date();
 		foodGroupInfo.setGmtCreate(now);
 		foodGroupInfo.setGmtUpdate(now);
-		return foodGroupInfoMapper.insert(foodGroupInfo)>0;
+		foodGroupInfoMapper.insert(foodGroupInfo);
+		if (!CollectionUtils.isEmpty(foodGroupInfo.getFoodGroupDetailInfoList())){
+			for (FoodGroupDetailInfo foodGroupDetailInfo:foodGroupInfo.getFoodGroupDetailInfoList()){
+				foodGroupDetailInfo.setGroupId(foodGroupInfo.getId());
+				foodGroupDetailInfo.setGmtCreate(now);
+				foodGroupDetailInfo.setGmtUpdate(now);
+				return foodGroupDetailInfoMapper.insert(foodGroupDetailInfo)>0;
+			}
+		}
+		return true;
 	}
 
 	@Override
@@ -135,7 +151,16 @@ public class FoodGroupInfoServiceImpl implements IFoodGroupInfoService{
 
 	@Override
 	public FoodGroupInfo get(Long id) throws ServiceException {
-		return foodGroupInfoMapper.selectById(id);
+		FoodGroupInfo foodGroupInfo=foodGroupInfoMapper.selectById(id);
+		if (foodGroupInfo!=null){
+			List<FoodGroupDetailInfo> foodGroupDetailInfoList=foodGroupDetailInfoMapper.selectList(new EntityWrapper<FoodGroupDetailInfo>()
+					.eq("group_id",foodGroupInfo.getId())
+			);
+			if (!CollectionUtils.isEmpty(foodGroupDetailInfoList)){
+				foodGroupInfo.setFoodGroupDetailInfoList(foodGroupDetailInfoList);
+			}
+		}
+		return foodGroupInfo;
 	}
 	
 	@Override

+ 1 - 0
unimall-admin-api/src/main/java/com/iotechn/unimall/admin/api/tourism/impl/FoodGroupOrderInfoServiceImpl.java

@@ -34,6 +34,7 @@ public class FoodGroupOrderInfoServiceImpl implements IFoodGroupOrderInfoService
 		Date now = new Date();
 		foodGroupOrderInfo.setGmtCreate(now);
 		foodGroupOrderInfo.setGmtUpdate(now);
+		foodGroupOrderInfo.setStatus("0");
 		return foodGroupOrderInfoMapper.insert(foodGroupOrderInfo)>0;
 	}
 

+ 152 - 9
unimall-admin-api/src/main/java/com/iotechn/unimall/admin/api/tourism/impl/FoodInfoServiceImpl.java

@@ -1,22 +1,23 @@
 package com.iotechn.unimall.admin.api.tourism.impl;
 
+import java.util.ArrayList;
+import java.util.Comparator;
 import java.util.List;
 
-import com.iotechn.unimall.app.api.user.UserService;
-import com.iotechn.unimall.data.domain.NoticeMessageInfo;
-import com.iotechn.unimall.data.mapper.NoticeMessageInfoMapper;
+import com.iotechn.unimall.admin.api.tourism.IFoodInfoService;
+import com.iotechn.unimall.data.domain.*;
+import com.iotechn.unimall.data.mapper.*;
+import com.iotechn.unimall.data.util.EntCoordUtil;
 import org.apache.ibatis.session.RowBounds;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import org.springframework.util.CollectionUtils;
 import org.springframework.util.StringUtils;
 
 import com.baomidou.mybatisplus.mapper.EntityWrapper;
 import com.baomidou.mybatisplus.mapper.Wrapper;
 import com.iotechn.unimall.core.exception.ServiceException;
 import com.iotechn.unimall.data.util.ExcelUtil;
-import com.iotechn.unimall.data.mapper.FoodInfoMapper;
-import com.iotechn.unimall.data.domain.FoodInfo;
-import com.iotechn.unimall.admin.api.tourism.IFoodInfoService;
 import com.iotechn.unimall.data.model.Page;
 import java.util.Date;
 import org.springframework.transaction.annotation.Transactional;
@@ -28,14 +29,24 @@ import org.springframework.transaction.annotation.Transactional;
  * @date 2023-05-26
  */
 @Service
-public class FoodInfoServiceImpl implements IFoodInfoService{
+public class FoodInfoServiceImpl implements IFoodInfoService {
 	@Autowired
 	private FoodInfoMapper foodInfoMapper;
 	@Autowired
 	private NoticeMessageInfoMapper noticeMessageInfoMapper;
 	@Autowired
-	private UserService userService;
-	
+	private DishClassifyInfoMapper dishClassifyInfoMapper;
+	@Autowired
+	private FoodDishesInfoMapper foodDishesInfoMapper;
+	@Autowired
+	private FoodGroupInfoMapper foodGroupInfoMapper;
+	@Autowired
+	private FoodGroupOrderInfoMapper foodGroupOrderInfoMapper;
+	/**
+	 * 地球半径,单位 km
+	 */
+	private static final double EARTH_RADIUS = 6378.137;
+
 	@Override
 	public Boolean add(FoodInfo foodInfo) throws ServiceException {
 //		userService.checkVerifyCode(foodInfo.getContactsPhone(), foodInfo.getVerifyCode());
@@ -126,10 +137,112 @@ public class FoodInfoServiceImpl implements IFoodInfoService{
 				}
 							wrapper.eq("delete_flag", 0);
 		List<FoodInfo> list = foodInfoMapper.selectPage(new RowBounds((page - 1) * limit, limit), wrapper);
+		if (!CollectionUtils.isEmpty(list)){
+			for (FoodInfo foodInfo:list) {
+				Integer displaysNum=0;
+				//查询店铺菜品分类
+				List<DishClassifyInfo> dishClassifyInfoList = dishClassifyInfoMapper.selectList(new EntityWrapper<DishClassifyInfo>()
+						.eq("food_id",foodInfo.getId())
+						.orderBy("top_marking",false));
+				if (!CollectionUtils.isEmpty(dishClassifyInfoList)){
+					for (DishClassifyInfo dishClassifyInfo:dishClassifyInfoList){
+						List<FoodDishesInfo> foodDishesInfoList = foodDishesInfoMapper.selectList(new EntityWrapper<FoodDishesInfo>()
+								.eq("food_id",foodInfo.getId())
+								.eq("classify",dishClassifyInfo.getClassifyName())
+						 		.orderBy("top_marking",false).orderBy("gmt_create",false));
+						if (!CollectionUtils.isEmpty(foodDishesInfoList)){
+							dishClassifyInfo.setFoodDishesInfoList(foodDishesInfoList);
+							dishClassifyInfo.setDishesNum(foodDishesInfoList.size());
+							displaysNum=displaysNum+foodDishesInfoList.size();
+						}
+					}
+					foodInfo.setDisplaysNum(displaysNum);
+					foodInfo.setDishClassifyInfoList(dishClassifyInfoList);
+				}
+				List<FoodGroupInfo> foodGroupInfoList = foodGroupInfoMapper.selectList(new EntityWrapper<FoodGroupInfo>()
+						.eq("food_id",foodInfo.getId()));
+				if (!CollectionUtils.isEmpty(foodGroupInfoList)){
+					for (FoodGroupInfo foodGroupInfo:foodGroupInfoList){
+						//查询已售数量
+						List<FoodGroupOrderInfo> foodGroupOrderInfoList=foodGroupOrderInfoMapper.selectList(new EntityWrapper<FoodGroupOrderInfo>()
+								.eq("group_id",foodGroupInfo.getId()));
+						foodGroupInfo.setSoldNum(foodGroupOrderInfoList.size());
+						//查询已使用数量
+						List<FoodGroupOrderInfo> foodGroupOrderInfoList1=foodGroupOrderInfoMapper.selectList(new EntityWrapper<FoodGroupOrderInfo>()
+								.eq("group_id",foodGroupInfo.getId())
+								.eq("status","1"));
+						foodGroupInfo.setUsedNum(foodGroupOrderInfoList1.size());
+						foodGroupInfo.setNotUseNum(foodGroupOrderInfoList.size()-foodGroupOrderInfoList1.size());
+					}
+				}
+				foodInfo.setFoodGroupInfoList(foodGroupInfoList);
+				foodInfo.setGroupNum(foodGroupInfoList.size());
+			}
+		}
 		Integer count = foodInfoMapper.selectCount(wrapper);
 		return new Page<FoodInfo>(list, page, limit, count);
 	}
 
+	@Override
+	public Page<FoodInfo> foodList(Long commonId,String location, String label, String searchKeyWord, String searchType, String userLongitude,String userLatitude,String place,Integer page, Integer limit) throws ServiceException {
+		List<FoodInfo> list =foodInfoMapper.getFoodInfoPage(commonId,label,searchKeyWord,(page - 1) * limit, limit, searchType);
+		List<FoodInfo> foodInfoList=new ArrayList<>();
+		if (!CollectionUtils.isEmpty(list)){
+			//查询发货地经纬度
+			for (int i = 0; i < list.size(); i++) {
+				FoodInfo foodInfo = list.get(i);
+				String [] tempArray = foodInfo.getLocation().split(",");
+				//店铺经纬度
+				double longitude = Double.parseDouble(tempArray[0]);
+				double latitude = Double.parseDouble(tempArray[1]);
+				//根据用户经纬度求距离
+				if (!StringUtils.isEmpty(userLatitude) && !StringUtils.isEmpty(userLongitude)) {
+					double lat1 = Math.toRadians(Double.valueOf(userLatitude));
+					double lng1 = Math.toRadians(Double.valueOf(userLongitude));
+					// 纬度之差
+					double a = lat1 - latitude;
+					// 经度之差
+					double b = lng1 - longitude;
+					// 计算两点距离的公式
+					double s = 2 * Math.asin(Math.sqrt(Math.pow(Math.sin(a / 2), 2) +
+							Math.cos(lat1) * Math.cos(latitude) * Math.pow(Math.sin(b / 2), 2)));
+
+					// 弧长乘地球半径, 返回单位: 千米
+					s = s * EARTH_RADIUS;
+					foodInfo.setDistance(Math.floor(s));
+				}
+				//根据用户定位的位置求距离
+				else if (!StringUtils.isEmpty(place)) {
+					//根据装货城市获取经纬度
+					String str = EntCoordUtil.getCoordinate(place);
+					String str1 = str.substring(0, str.indexOf(","));//经度
+					String str2 = str.substring(str1.length() + 1, str.length());//纬度
+
+					//装货地经纬度
+					double lng1 = Math.toRadians(Double.valueOf(str1));
+					double lat1 = Math.toRadians(Double.valueOf(str2));
+					// 纬度之差
+					double a = lat1 - latitude;
+					// 经度之差
+					double b = lng1 - longitude;
+					// 计算两点距离的公式
+					double s = 2 * Math.asin(Math.sqrt(Math.pow(Math.sin(a / 2), 2) +
+							Math.cos(lat1) * Math.cos(latitude) * Math.pow(Math.sin(b / 2), 2)));
+					// 弧长乘地球半径, 返回单位: 千米
+					s = s * EARTH_RADIUS;
+					foodInfo.setDistance(Math.floor(s));
+				}
+			}
+			//按距离排序
+			if ("2".equals(searchType)) {
+				list.sort(Comparator.comparing(FoodInfo::getDistance));
+			}
+			foodInfoList.addAll(list);
+		}
+		Integer count = list.size();
+		return new Page<FoodInfo>(list, page, limit, count);
+	}
+
 	@Override
 	@Transactional(rollbackFor = Exception.class)
 	public Boolean delete(String id) {
@@ -174,6 +287,36 @@ public class FoodInfoServiceImpl implements IFoodInfoService{
 			noticeMessageInfo.setGmtCreate(now);
 			noticeMessageInfo.setGmtUpdate(now);
 			noticeMessageInfoMapper.insert(noticeMessageInfo);
+			List<FoodInfo> foodInfoList = foodInfoMapper.selectList(new EntityWrapper<FoodInfo>()
+					.orderBy("weight_sort", false)
+					.eq("delete_flag", 0));
+			Long sort=0l;
+			if (!CollectionUtils.isEmpty(foodInfoList)) {
+				sort=foodInfoList.get(0).getWeightSort()+1;
+			}
+			foodInfo.setWeightSort(sort);
+			DishClassifyInfo dishClassifyInfo=new DishClassifyInfo();
+			dishClassifyInfo.setFoodId(foodInfo1.getId());
+			dishClassifyInfo.setClassifyName("荤菜");
+			dishClassifyInfo.setTopMarking(6l);
+			dishClassifyInfo.setGmtCreate(now);
+			dishClassifyInfo.setGmtUpdate(now);
+			dishClassifyInfoMapper.insert(dishClassifyInfo);
+			dishClassifyInfo.setClassifyName("素菜");
+			dishClassifyInfo.setTopMarking(5l);
+			dishClassifyInfoMapper.insert(dishClassifyInfo);
+			dishClassifyInfo.setClassifyName("主食");
+			dishClassifyInfo.setTopMarking(4l);
+			dishClassifyInfoMapper.insert(dishClassifyInfo);
+			dishClassifyInfo.setClassifyName("汤品");
+			dishClassifyInfo.setTopMarking(3l);
+			dishClassifyInfoMapper.insert(dishClassifyInfo);
+			dishClassifyInfo.setClassifyName("凉菜");
+			dishClassifyInfo.setTopMarking(2l);
+			dishClassifyInfoMapper.insert(dishClassifyInfo);
+			dishClassifyInfo.setClassifyName("串类");
+			dishClassifyInfo.setTopMarking(1l);
+			dishClassifyInfoMapper.insert(dishClassifyInfo);
 		}
 		return foodInfoMapper.updateById(foodInfo) > 0;
 	}

+ 49 - 2
unimall-admin-api/src/main/java/com/iotechn/unimall/admin/api/tourism/impl/HomestayInfoServiceImpl.java

@@ -2,6 +2,10 @@ package com.iotechn.unimall.admin.api.tourism.impl;
 
 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.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -28,17 +32,20 @@ import org.springframework.transaction.annotation.Transactional;
 public class HomestayInfoServiceImpl implements IHomestayInfoService{
 	@Autowired
 	private HomestayInfoMapper homestayInfoMapper;
+	@Autowired
+	private NoticeMessageInfoMapper noticeMessageInfoMapper;
 	
 	@Override
 	public Boolean add(HomestayInfo homestayInfo) throws ServiceException {
 		Date now = new Date();
 		homestayInfo.setGmtCreate(now);
 		homestayInfo.setGmtUpdate(now);
+		homestayInfo.setStatus("审核中");
 		return homestayInfoMapper.insert(homestayInfo)>0;
 	}
 
 	@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>();
 														if (!StringUtils.isEmpty(commonId)) {
 					wrapper.eq("common_id", commonId);
@@ -57,6 +64,9 @@ public class HomestayInfoServiceImpl implements IHomestayInfoService{
 				}
 												if (!StringUtils.isEmpty(personImageBack)) {
 					wrapper.eq("person_image_back", personImageBack);
+				}
+												if (!StringUtils.isEmpty(status)) {
+					wrapper.eq("status", status);
 				}
 												if (!StringUtils.isEmpty(gmtCreate)) {
 					wrapper.eq("gmt_create", gmtCreate);
@@ -98,7 +108,44 @@ public class HomestayInfoServiceImpl implements IHomestayInfoService{
 	public HomestayInfo get(Long id) throws ServiceException {
 		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("系统消息");
+			if ("1".equals(homestayInfo1.getType())){
+				noticeMessageInfo.setNewsContent("您的入驻申请(民宿),未通过审核。");
+			}
+			else {
+				noticeMessageInfo.setNewsContent("您的入驻申请(酒店),未通过审核。");
+			}
+			noticeMessageInfo.setReceiveId(homestayInfo1.getCommonId());
+			noticeMessageInfo.setGmtCreate(now);
+			noticeMessageInfo.setGmtUpdate(now);
+			noticeMessageInfoMapper.insert(noticeMessageInfo);
+		}
+		//通过
+		else{
+			NoticeMessageInfo noticeMessageInfo=new NoticeMessageInfo();
+			noticeMessageInfo.setNewsTitle("系统消息");
+			if ("1".equals(homestayInfo1.getType())){
+				noticeMessageInfo.setNewsContent("您的入驻申请(民宿),已通过审核。");
+			}
+			else {
+				noticeMessageInfo.setNewsContent("您的入驻申请(酒店),已通过审核。");
+			}
+			noticeMessageInfo.setReceiveId(homestayInfo1.getCommonId());
+			noticeMessageInfo.setGmtCreate(now);
+			noticeMessageInfo.setGmtUpdate(now);
+			noticeMessageInfoMapper.insert(noticeMessageInfo);
+		}
+		return homestayInfoMapper.updateById(homestayInfo) > 0;
+	}
+
 	@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 {
 		Wrapper<HomestayInfo> wrapper = new EntityWrapper<HomestayInfo>();

+ 166 - 0
unimall-admin-api/src/main/java/com/iotechn/unimall/admin/api/tourism/impl/PlayInfoServiceImpl.java

@@ -0,0 +1,166 @@
+package com.iotechn.unimall.admin.api.tourism.impl;
+
+import java.util.List;
+
+import com.iotechn.unimall.admin.api.tourism.IPlayInfoService;
+import com.iotechn.unimall.data.mapper.PlayInfoMapper;
+import org.apache.ibatis.session.RowBounds;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.util.StringUtils;
+
+import com.baomidou.mybatisplus.mapper.EntityWrapper;
+import com.baomidou.mybatisplus.mapper.Wrapper;
+import com.iotechn.unimall.core.exception.ServiceException;
+import com.iotechn.unimall.data.util.ExcelUtil;
+import com.iotechn.unimall.data.domain.PlayInfo;
+import com.iotechn.unimall.data.model.Page;
+import java.util.Date;
+import org.springframework.transaction.annotation.Transactional;
+
+/**
+ * 游玩信息Service业务层处理
+ * 
+ * @author jlb
+ * @date 2023-06-13
+ */
+@Service
+public class PlayInfoServiceImpl implements IPlayInfoService {
+	@Autowired
+	private PlayInfoMapper playInfoMapper;
+	
+	@Override
+	public Boolean add(PlayInfo playInfo) throws ServiceException {
+		Date now = new Date();
+		playInfo.setGmtCreate(now);
+		playInfo.setGmtUpdate(now);
+		return playInfoMapper.insert(playInfo)>0;
+	}
+
+	@Override
+	public Page<PlayInfo> list(Long commonId,String title,String makeUser,String releaseContent,String cover,String province,String city,String area,String location,String detailedAddress,String status,Date gmtCreate,Date gmtUpdate,Long deleteFlag, Integer page, Integer limit)throws ServiceException {
+		Wrapper<PlayInfo> wrapper = new EntityWrapper<PlayInfo>();
+														if (!StringUtils.isEmpty(commonId)) {
+					wrapper.eq("common_id", commonId);
+				}
+												if (!StringUtils.isEmpty(title)) {
+					wrapper.eq("title", title);
+				}
+												if (!StringUtils.isEmpty(makeUser)) {
+					wrapper.eq("make_user", makeUser);
+				}
+												if (!StringUtils.isEmpty(releaseContent)) {
+					wrapper.eq("release_content", releaseContent);
+				}
+												if (!StringUtils.isEmpty(cover)) {
+					wrapper.eq("cover", cover);
+				}
+												if (!StringUtils.isEmpty(province)) {
+					wrapper.eq("province", province);
+				}
+												if (!StringUtils.isEmpty(city)) {
+					wrapper.eq("city", city);
+				}
+												if (!StringUtils.isEmpty(area)) {
+					wrapper.eq("area", area);
+				}
+												if (!StringUtils.isEmpty(location)) {
+					wrapper.eq("location", location);
+				}
+												if (!StringUtils.isEmpty(detailedAddress)) {
+					wrapper.eq("detailed_address", detailedAddress);
+				}
+												if (!StringUtils.isEmpty(status)) {
+					wrapper.eq("status", status);
+				}
+												if (!StringUtils.isEmpty(gmtCreate)) {
+					wrapper.eq("gmt_create", gmtCreate);
+				}
+												if (!StringUtils.isEmpty(gmtUpdate)) {
+					wrapper.eq("gmt_update", gmtUpdate);
+				}
+												if (!StringUtils.isEmpty(deleteFlag)) {
+					wrapper.eq("delete_flag", deleteFlag);
+				}
+							wrapper.eq("delete_flag", 0);
+		List<PlayInfo> list = playInfoMapper.selectPage(new RowBounds((page - 1) * limit, limit), wrapper);
+		Integer count = playInfoMapper.selectCount(wrapper);
+		return new Page<PlayInfo>(list, page, limit, count);
+	}
+
+	@Override
+	@Transactional(rollbackFor = Exception.class)
+	public Boolean delete(String id) {
+		String[] ids = String.valueOf(id).split(",");
+		for (String tt:ids) {
+			PlayInfo tmp =  playInfoMapper.selectById(Long.parseLong(tt));
+			if(tmp != null){
+				tmp.setDeleteFlag(1l);
+				playInfoMapper.updateById(tmp);
+			}
+		}
+		return true;
+	}
+
+	@Override
+	public Boolean update(PlayInfo playInfo) throws ServiceException {
+		Date now = new Date();
+		playInfo.setGmtUpdate(now);
+		return playInfoMapper.updateById(playInfo)>0;
+	}
+
+	@Override
+	public PlayInfo get(Long id) throws ServiceException {
+		return playInfoMapper.selectById(id);
+	}
+	
+	@Override
+	public String export(Long commonId,String title,String makeUser,String releaseContent,String cover,String province,String city,String area,String location,String detailedAddress,String status,Date gmtCreate,Date gmtUpdate,Long deleteFlag, Integer page, Integer limit)throws ServiceException {
+		Wrapper<PlayInfo> wrapper = new EntityWrapper<PlayInfo>();
+														if (!StringUtils.isEmpty(commonId)) {
+					wrapper.eq("common_id", commonId);
+				}
+												if (!StringUtils.isEmpty(title)) {
+					wrapper.eq("title", title);
+				}
+												if (!StringUtils.isEmpty(makeUser)) {
+					wrapper.eq("make_user", makeUser);
+				}
+												if (!StringUtils.isEmpty(releaseContent)) {
+					wrapper.eq("release_content", releaseContent);
+				}
+												if (!StringUtils.isEmpty(cover)) {
+					wrapper.eq("cover", cover);
+				}
+												if (!StringUtils.isEmpty(province)) {
+					wrapper.eq("province", province);
+				}
+												if (!StringUtils.isEmpty(city)) {
+					wrapper.eq("city", city);
+				}
+												if (!StringUtils.isEmpty(area)) {
+					wrapper.eq("area", area);
+				}
+												if (!StringUtils.isEmpty(location)) {
+					wrapper.eq("location", location);
+				}
+												if (!StringUtils.isEmpty(detailedAddress)) {
+					wrapper.eq("detailed_address", detailedAddress);
+				}
+												if (!StringUtils.isEmpty(status)) {
+					wrapper.eq("status", status);
+				}
+												if (!StringUtils.isEmpty(gmtCreate)) {
+					wrapper.eq("gmt_create", gmtCreate);
+				}
+												if (!StringUtils.isEmpty(gmtUpdate)) {
+					wrapper.eq("gmt_update", gmtUpdate);
+				}
+												if (!StringUtils.isEmpty(deleteFlag)) {
+					wrapper.eq("delete_flag", deleteFlag);
+				}
+							List<PlayInfo> list = playInfoMapper.selectList(wrapper);
+		ExcelUtil<PlayInfo> util = new ExcelUtil<PlayInfo>(PlayInfo.class);
+		return util.exportExcel(list, "操作日志");
+	}
+}

+ 73 - 0
unimall-admin/src/api/tourism/playInfo.js

@@ -0,0 +1,73 @@
+import request from '@/utils/request'
+
+// 查询游玩信息列表
+export function listPlayInfo(query) {
+  return request({
+    method: 'get',
+    params: {
+      _gp: 'admin.tourism.playInfo',
+      _mt: 'list',
+      ...query
+    }
+  })
+}
+
+// 查询游玩信息详细
+export function getPlayInfo(id) {
+  return request({
+    method: 'get',
+    params: {
+      _gp: 'admin.tourism.playInfo',
+      _mt: 'get',
+      id: id
+    }
+  })
+}
+
+// 新增游玩信息
+export function addPlayInfo(data) {
+  return request({
+    method: 'post',
+    params: {
+      _gp: 'admin.tourism.playInfo',
+      _mt: 'add',
+      playInfo: data
+    }
+  })
+}
+
+// 修改游玩信息
+export function updatePlayInfo(data) {
+  return request({
+    method: 'post',
+    params: {
+      _gp: 'admin.tourism.playInfo',
+      _mt: 'update',
+      playInfo: data
+    }
+  })
+}
+
+// 删除游玩信息
+export function delPlayInfo(id) {
+  return request({
+    method: 'post',
+    params: {
+      _gp: 'admin.tourism.playInfo',
+      _mt: 'delete',
+      id: id
+    }
+  })
+}
+
+// 导出游玩信息
+export function exportPlayInfo(query) {
+  return request({
+    method: 'get',
+    params: {
+      _gp: 'admin.tourism.playInfo',
+      _mt: 'export',
+      ...query
+    }
+  })
+}

+ 463 - 0
unimall-admin/src/views/playInfo/index.vue

@@ -0,0 +1,463 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px">
+      <el-form-item label="个人id" prop="commonId">
+        <el-input
+          v-model="queryParams.commonId"
+          placeholder="请输入个人id"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="标题" prop="title">
+        <el-input
+          v-model="queryParams.title"
+          placeholder="请输入标题"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="发布人" prop="makeUser">
+        <el-input
+          v-model="queryParams.makeUser"
+          placeholder="请输入发布人"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="发布内容" prop="releaseContent">
+        <el-input
+          v-model="queryParams.releaseContent"
+          placeholder="请输入发布内容"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="省" prop="province">
+        <el-input
+          v-model="queryParams.province"
+          placeholder="请输入省"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="市" prop="city">
+        <el-input
+          v-model="queryParams.city"
+          placeholder="请输入市"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="区" prop="area">
+        <el-input
+          v-model="queryParams.area"
+          placeholder="请输入区"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="定位" prop="location">
+        <el-input
+          v-model="queryParams.location"
+          placeholder="请输入定位"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="详细地址" prop="detailedAddress">
+        <el-input
+          v-model="queryParams.detailedAddress"
+          placeholder="请输入详细地址"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+        <el-form-item label="状态" prop="status">
+        <el-select v-model="queryParams.status" placeholder="请选择状态" clearable size="small">
+          <el-option label="请选择字典生成" value="" />
+        </el-select>
+      </el-form-item>
+      <el-form-item label="" prop="gmtCreate">
+        <el-date-picker clearable size="small" style="width: 200px"
+          v-model="queryParams.gmtCreate"
+          type="date"
+          value-format="yyyy-MM-dd"
+          placeholder="选择">
+        </el-date-picker>
+      </el-form-item>
+      <el-form-item label="" prop="gmtUpdate">
+        <el-date-picker clearable size="small" style="width: 200px"
+          v-model="queryParams.gmtUpdate"
+          type="date"
+          value-format="yyyy-MM-dd"
+          placeholder="选择">
+        </el-date-picker>
+      </el-form-item>
+      <el-form-item label="删除标识" prop="deleteFlag">
+        <el-input
+          v-model="queryParams.deleteFlag"
+          placeholder="请输入删除标识"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item>
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+          v-permission="['tourism:playInfo:add']"
+        >新增</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="success"
+          icon="el-icon-edit"
+          size="mini"
+          :disabled="single"
+          @click="handleUpdate"
+          v-permission="['tourism:playInfo:edit']"
+        >修改</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          icon="el-icon-delete"
+          size="mini"
+          :disabled="multiple"
+          @click="handleDelete"
+          v-permission="['tourism:playInfo:remove']"
+        >删除</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          icon="el-icon-download"
+          size="mini"
+          @click="handleExport"
+          v-permission="['tourism:playInfo:export']"
+        >导出</el-button>
+      </el-col>
+    </el-row>
+
+    <el-table v-loading="loading" :data="playInfoList" @selection-change="handleSelectionChange">
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="" align="center" prop="id" />
+      <el-table-column label="个人id" align="center" prop="commonId" />
+      <el-table-column label="标题" align="center" prop="title" />
+      <el-table-column label="发布人" align="center" prop="makeUser" />
+      <el-table-column label="发布内容" align="center" prop="releaseContent" />
+      <el-table-column label="封面" align="center" prop="cover" />
+      <el-table-column label="省" align="center" prop="province" />
+      <el-table-column label="市" align="center" prop="city" />
+      <el-table-column label="区" align="center" prop="area" />
+      <el-table-column label="定位" align="center" prop="location" />
+      <el-table-column label="详细地址" align="center" prop="detailedAddress" />
+      <el-table-column label="状态" align="center" prop="status" />
+      <el-table-column label="" align="center" prop="gmtCreate" width="180">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.gmtCreate) }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="" align="center" prop="gmtUpdate" width="180">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.gmtUpdate) }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="删除标识" align="center" prop="deleteFlag" />
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+            v-permission="['tourism:playInfo:edit']"
+          >修改</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+            v-permission="['tourism:playInfo:remove']"
+          >删除</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+    
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 添加或修改游玩信息对话框 -->
+    <el-dialog :title="title" :visible.sync="open" width="500px">
+      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+        <el-form-item label="个人id" prop="commonId">
+          <el-input v-model="form.commonId" placeholder="请输入个人id" />
+        </el-form-item>
+        <el-form-item label="标题" prop="title">
+          <el-input v-model="form.title" placeholder="请输入标题" />
+        </el-form-item>
+        <el-form-item label="发布人" prop="makeUser">
+          <el-input v-model="form.makeUser" placeholder="请输入发布人" />
+        </el-form-item>
+        <el-form-item label="发布内容" prop="releaseContent">
+          <el-input v-model="form.releaseContent" placeholder="请输入发布内容" />
+        </el-form-item>
+        <el-form-item label="封面" prop="cover">
+          <el-input v-model="form.cover" type="textarea" placeholder="请输入内容" />
+        </el-form-item>
+        <el-form-item label="省" prop="province">
+          <el-input v-model="form.province" placeholder="请输入省" />
+        </el-form-item>
+        <el-form-item label="市" prop="city">
+          <el-input v-model="form.city" placeholder="请输入市" />
+        </el-form-item>
+        <el-form-item label="区" prop="area">
+          <el-input v-model="form.area" placeholder="请输入区" />
+        </el-form-item>
+        <el-form-item label="定位" prop="location">
+          <el-input v-model="form.location" placeholder="请输入定位" />
+        </el-form-item>
+        <el-form-item label="详细地址" prop="detailedAddress">
+          <el-input v-model="form.detailedAddress" placeholder="请输入详细地址" />
+        </el-form-item>
+        <el-form-item label="状态">
+          <el-radio-group v-model="form.status">
+            <el-radio label="1">请选择字典生成</el-radio>
+          </el-radio-group>
+        </el-form-item>
+        <el-form-item label="" prop="gmtCreate">
+          <el-date-picker clearable size="small" style="width: 200px"
+            v-model="form.gmtCreate"
+            type="date"
+            value-format="yyyy-MM-dd"
+            placeholder="选择">
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item label="" prop="gmtUpdate">
+          <el-date-picker clearable size="small" style="width: 200px"
+            v-model="form.gmtUpdate"
+            type="date"
+            value-format="yyyy-MM-dd"
+            placeholder="选择">
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item label="删除标识" prop="deleteFlag">
+          <el-input v-model="form.deleteFlag" placeholder="请输入删除标识" />
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { listPlayInfo, getPlayInfo, delPlayInfo, addPlayInfo, updatePlayInfo, exportPlayInfo } from "@/api/tourism/playInfo";
+
+export default {
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 总条数
+      total: 0,
+      // 游玩信息表格数据
+      playInfoList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        commonId: undefined,
+        title: undefined,
+        makeUser: undefined,
+        releaseContent: undefined,
+        cover: undefined,
+        province: undefined,
+        city: undefined,
+        area: undefined,
+        location: undefined,
+        detailedAddress: undefined,
+        status: undefined,
+        gmtCreate: undefined,
+        gmtUpdate: undefined,
+        deleteFlag: undefined
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+        gmtCreate: [
+          { required: true, message: "不能为空", trigger: "blur" }
+        ],        gmtUpdate: [
+          { required: true, message: "不能为空", trigger: "blur" }
+        ],        deleteFlag: [
+          { required: true, message: "删除标识不能为空", trigger: "blur" }
+        ]      }
+    };
+  },
+  created() {
+    this.getList();
+  },
+  methods: {
+    /** 查询游玩信息列表 */
+    getList() {
+      this.loading = true;
+      listPlayInfo(this.queryParams).then(response => {
+        this.playInfoList = response.data.data.items
+        this.total = response.data.data.count
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: undefined,
+        commonId: undefined,
+        title: undefined,
+        makeUser: undefined,
+        releaseContent: undefined,
+        cover: undefined,
+        province: undefined,
+        city: undefined,
+        area: undefined,
+        location: undefined,
+        detailedAddress: undefined,
+        status: "0",
+        gmtCreate: undefined,
+        gmtUpdate: undefined,
+        deleteFlag: undefined
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.id)
+      this.single = selection.length!=1
+      this.multiple = !selection.length
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "添加游玩信息";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const id = row.id || this.ids.join(',')
+      getPlayInfo(id).then(response => {
+        this.form = response.data.data
+        this.open = true;
+        this.title = "修改游玩信息";
+      });
+    },
+    /** 提交按钮 */
+    submitForm: function() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.id != undefined) {
+            updatePlayInfo(this.form).then(response => {
+              if (response.data) {
+                this.msgSuccess("修改成功");
+                this.open = false;
+                this.getList();
+              } else {
+                this.msgError(response.msg);
+              }
+            });
+          } else {
+            addPlayInfo(this.form).then(response => {
+              if (response.data) {
+                this.msgSuccess("新增成功");
+                this.open = false;
+                this.getList();
+              } else {
+                this.msgError(response.msg);
+              }
+            });
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const ids = row.id || this.ids.join(',')
+      this.$confirm('是否确认删除游玩信息编号为"' + ids + '"的数据项?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          return delPlayInfo(ids);
+        }).then(() => {
+          this.getList();
+          this.msgSuccess("删除成功");
+        }).catch(function() {});
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      const queryParams = this.queryParams;
+      this.$confirm('是否确认导出所有游玩信息数据项?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          return exportPlayInfo(queryParams);
+        }).then(response => {
+          this.download(response.data.data);
+        }).catch(function() {});
+    }
+  }
+};
+</script>

+ 6 - 2
unimall-data/src/main/java/com/iotechn/unimall/data/domain/DishClassifyInfo.java

@@ -11,6 +11,7 @@ import com.baomidou.mybatisplus.annotations.TableField;
 import com.baomidou.mybatisplus.enums.FieldFill;
 import com.iotechn.unimall.core.util.StringUtils;
 import java.util.Date;
+import java.util.List;
 
 /**
  * 菜品分类对象 dish_classify_info
@@ -56,8 +57,11 @@ public class DishClassifyInfo extends SuperDO{
     @Excel(name = "删除标识")
     @TableField("delete_flag")
     private Long deleteFlag;
-
-
+    @TableField(exist = false)
+    private List<FoodDishesInfo> foodDishesInfoList;
+    /** 菜数 */
+    @TableField(exist = false)
+    private Integer dishesNum;
     @Override
     public String toString() {
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

+ 5 - 0
unimall-data/src/main/java/com/iotechn/unimall/data/domain/FoodDishesInfo.java

@@ -52,6 +52,11 @@ public class FoodDishesInfo extends SuperDO{
     @TableField("dish_image")
     private String dishImage;
 
+    /** 置顶标识 */
+    @Excel(name = "置顶标识")
+    @TableField("top_marking")
+    private Long topMarking;
+
     /**  */
     @Excel(name = "", width = 30, dateFormat = "yyyy-MM-dd")
     @TableField("gmt_create")

+ 45 - 2
unimall-data/src/main/java/com/iotechn/unimall/data/domain/FoodGroupInfo.java

@@ -11,6 +11,7 @@ import com.baomidou.mybatisplus.annotations.TableField;
 import com.baomidou.mybatisplus.enums.FieldFill;
 import com.iotechn.unimall.core.util.StringUtils;
 import java.util.Date;
+import java.util.List;
 
 /**
  * 餐饮团购信息对象 food_group_info
@@ -77,6 +78,23 @@ public class FoodGroupInfo extends SuperDO{
     @TableField("end_date")
     private Date endDate;
 
+    /** 指定不可用天数 */
+    @Excel(name = "指定不可用天数")
+    @TableField("unavailable_day")
+    private String unavailableDay;
+    /** 可团购总数量 */
+    @Excel(name = "可团购总数量")
+    @TableField("total_quantity")
+    private Long totalQuantity;
+    /** 单人可团数量(0不限量1限量) */
+    @Excel(name = "单人可团数量(0不限量1限量)")
+    @TableField("quantity_limited")
+    private Long quantityLimited;
+    /** 单人团购上限 */
+    @Excel(name = "单人团购上限")
+    @TableField("group_limit")
+    private Long groupLimit;
+
     /** 不可用日期 */
     @Excel(name = "不可用日期")
     @TableField("unavailable_date")
@@ -86,6 +104,18 @@ public class FoodGroupInfo extends SuperDO{
     @Excel(name = "餐位费")
     @TableField("space_fee")
     private Double spaceFee;
+    /** 原价合计 */
+    @Excel(name = "原价合计")
+    @TableField("original_price")
+    private Double originalPrice;
+    /** 团购价 */
+    @Excel(name = "团购价")
+    @TableField("group_price")
+    private Double groupPrice;
+    /** 折扣 */
+    @Excel(name = "折扣")
+    @TableField("discount")
+    private Double discount;
 
     /** 商品外带打包(0支持1不支持) */
     @Excel(name = "商品外带打包(0支持1不支持)")
@@ -136,8 +166,21 @@ public class FoodGroupInfo extends SuperDO{
     @Excel(name = "删除标识")
     @TableField("delete_flag")
     private Long deleteFlag;
-
-
+    @TableField(exist = false)
+    private List<FoodGroupDetailInfo> foodGroupDetailInfoList;
+    /** 状态(未开始/活动中/已停止/已过期) */
+    @Excel(name = "状态")
+    @TableField("status")
+    private String status;
+    /** 已售数 */
+    @TableField(exist = false)
+    private Integer soldNum;
+    /** 已用数 */
+    @TableField(exist = false)
+    private Integer usedNum;
+    /** 未用数 */
+    @TableField(exist = false)
+    private Integer notUseNum;
     @Override
     public String toString() {
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

+ 1 - 1
unimall-data/src/main/java/com/iotechn/unimall/data/domain/FoodGroupOrderInfo.java

@@ -37,7 +37,7 @@ public class FoodGroupOrderInfo extends SuperDO{
     @TableField("group_id")
     private Long groupId;
 
-    /** 状态 */
+    /** 状态(默认0已售未使用 1已使用 商家端,客户端状态文字区分显示) */
     @Excel(name = "状态")
     @TableField("status")
     private String status;

+ 51 - 0
unimall-data/src/main/java/com/iotechn/unimall/data/domain/FoodInfo.java

@@ -11,6 +11,7 @@ import com.baomidou.mybatisplus.annotations.TableField;
 import com.baomidou.mybatisplus.enums.FieldFill;
 import com.iotechn.unimall.core.util.StringUtils;
 import java.util.Date;
+import java.util.List;
 
 /**
  * 餐饮入驻信息对象 food_info
@@ -132,6 +133,11 @@ public class FoodInfo extends SuperDO{
     @TableField("look_flag")
     private Long lookFlag;
 
+    /** 权重排序 */
+    @Excel(name = "权重排序")
+    @TableField("weight_sort")
+    private Long weightSort;
+
     /** 状态 */
     @Excel(name = "状态")
     @TableField("status")
@@ -156,11 +162,56 @@ public class FoodInfo extends SuperDO{
      */
     @TableField(exist = false)
     private String searchType;
+    @TableField(exist = false)
+    private String searchKeyWord;
     /**
      * 验证码
      */
     @TableField(exist = false)
     private String verifyCode;
+    @TableField(exist = false)
+    private List<DishClassifyInfo> dishClassifyInfoList;
+    @TableField(exist = false)
+    private List<FoodGroupInfo> foodGroupInfoList;
+    /** 团购数 */
+    @TableField(exist = false)
+    private Integer groupNum;
+    /** 商品展示数 */
+    @TableField(exist = false)
+    private Integer displaysNum;
+    /**
+     * 用户经度
+     */
+    @TableField(exist = false)
+    private String userLongitude;
+
+    /**
+     * 用户纬度
+     */
+    @TableField(exist = false)
+    private String userLatitude;
+    /**
+     * 距离
+     */
+    @TableField(exist = false)
+    private Double distance;
+    /**
+     * 用户定位的地址
+     */
+    @TableField(exist = false)
+    private String place;
+    /** 收藏数 */
+    @TableField(exist = false)
+    private Integer collectionNum;
+    /** 点赞数 */
+    @TableField(exist = false)
+    private Integer likeNum;
+    /** 已收藏标识 */
+    @TableField(exist = false)
+    private Integer collectionFlag;
+    /** 已点赞标识 */
+    @TableField(exist = false)
+    private Integer likeFlag;
     @Override
     public String toString() {
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

+ 54 - 1
unimall-data/src/main/java/com/iotechn/unimall/data/domain/HomestayInfo.java

@@ -57,6 +57,56 @@ public class HomestayInfo extends SuperDO{
     @TableField("person_image_back")
     private String personImageBack;
 
+    /** 省 */
+    @Excel(name = "省")
+    @TableField("province")
+    private String province;
+
+    /** 市 */
+    @Excel(name = "市")
+    @TableField("city")
+    private String city;
+
+    /** 区 */
+    @Excel(name = "区")
+    @TableField("area")
+    private String area;
+
+    /** 定位 */
+    @Excel(name = "定位")
+    @TableField("location")
+    private String location;
+
+    /** 详细地址 */
+    @Excel(name = "详细地址")
+    @TableField("detailed_address")
+    private String detailedAddress;
+
+    /** 营业执照 */
+    @Excel(name = "营业执照")
+    @TableField("business_license")
+    private String businessLicense;
+
+    /** 类型(1民宿2酒店) */
+    @Excel(name = "类型(1民宿2酒店)")
+    @TableField("type")
+    private String type;
+
+    /** 酒店名称 */
+    @Excel(name = "酒店名称")
+    @TableField("hotel_name")
+    private String hotelName;
+
+    /** 法人姓名 */
+    @Excel(name = "法人姓名")
+    @TableField("legal_name")
+    private String legalName;
+
+    /** 酒店座机 */
+    @Excel(name = "酒店座机")
+    @TableField("landline_phone")
+    private String landlinePhone;
+
     /**  */
     @Excel(name = "", width = 30, dateFormat = "yyyy-MM-dd")
     @TableField("gmt_create")
@@ -71,7 +121,10 @@ public class HomestayInfo extends SuperDO{
     @Excel(name = "删除标识")
     @TableField("delete_flag")
     private Long deleteFlag;
-
+    /** 状态 */
+    @Excel(name = "状态")
+    @TableField("status")
+    private String status;
 
     @Override
     public String toString() {

+ 121 - 0
unimall-data/src/main/java/com/iotechn/unimall/data/domain/PlayInfo.java

@@ -0,0 +1,121 @@
+package com.iotechn.unimall.data.domain;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.iotechn.unimall.core.framework.aspectj.lang.annotaion.Excel;
+import com.iotechn.unimall.core.framework.aspectj.lang.annotaion.Excel.ColumnType;
+import com.baomidou.mybatisplus.annotations.TableId;
+import com.baomidou.mybatisplus.annotations.TableName;
+import lombok.Data;
+import com.baomidou.mybatisplus.annotations.TableField;
+import com.baomidou.mybatisplus.enums.FieldFill;
+import com.iotechn.unimall.core.util.StringUtils;
+import java.util.Date;
+
+/**
+ * 游玩信息对象 play_info
+ * 
+ * @author jlb
+ * @date 2023-06-13
+ */
+@Data
+@TableName("play_info")
+public class PlayInfo extends SuperDO{
+    private static final long serialVersionUID = 1L;
+
+    /**  */
+    @TableId("id")
+    private Long id;
+
+    /** 个人id */
+    @Excel(name = "个人id")
+    @TableField("common_id")
+    private Long commonId;
+
+    /** 标题 */
+    @Excel(name = "标题")
+    @TableField("title")
+    private String title;
+
+    /** 发布人 */
+    @Excel(name = "发布人")
+    @TableField("make_user")
+    private String makeUser;
+
+    /** 发布内容 */
+    @Excel(name = "发布内容")
+    @TableField("release_content")
+    private String releaseContent;
+
+    /** 封面 */
+    @Excel(name = "封面")
+    @TableField("cover")
+    private String cover;
+
+    /** 省 */
+    @Excel(name = "省")
+    @TableField("province")
+    private String province;
+
+    /** 市 */
+    @Excel(name = "市")
+    @TableField("city")
+    private String city;
+
+    /** 区 */
+    @Excel(name = "区")
+    @TableField("area")
+    private String area;
+
+    /** 定位 */
+    @Excel(name = "定位")
+    @TableField("location")
+    private String location;
+
+    /** 详细地址 */
+    @Excel(name = "详细地址")
+    @TableField("detailed_address")
+    private String detailedAddress;
+
+    /** 状态 */
+    @Excel(name = "状态")
+    @TableField("status")
+    private String status;
+
+    /**  */
+    @Excel(name = "", width = 30, dateFormat = "yyyy-MM-dd")
+    @TableField("gmt_create")
+    private Date gmtCreate;
+
+    /**  */
+    @Excel(name = "", width = 30, dateFormat = "yyyy-MM-dd")
+    @TableField("gmt_update")
+    private Date gmtUpdate;
+
+    /** 删除标识 */
+    @Excel(name = "删除标识")
+    @TableField("delete_flag")
+    private Long deleteFlag;
+
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("commonId", getCommonId())
+            .append("title", getTitle())
+            .append("makeUser", getMakeUser())
+            .append("releaseContent", getReleaseContent())
+            .append("cover", getCover())
+            .append("province", getProvince())
+            .append("city", getCity())
+            .append("area", getArea())
+            .append("location", getLocation())
+            .append("detailedAddress", getDetailedAddress())
+            .append("status", getStatus())
+            .append("gmtCreate", getGmtCreate())
+            .append("gmtUpdate", getGmtUpdate())
+            .append("deleteFlag", getDeleteFlag())
+            .toString();
+    }
+}

+ 4 - 0
unimall-data/src/main/java/com/iotechn/unimall/data/mapper/FoodInfoMapper.java

@@ -2,6 +2,9 @@ package com.iotechn.unimall.data.mapper;
 
 import com.iotechn.unimall.data.domain.FoodInfo;
 import com.baomidou.mybatisplus.mapper.BaseMapper;
+
+import java.util.List;
+
 /**
  * 餐饮入驻信息Mapper接口
  * 
@@ -10,4 +13,5 @@ import com.baomidou.mybatisplus.mapper.BaseMapper;
  */
 public interface FoodInfoMapper extends BaseMapper<FoodInfo>{
 
+    List<FoodInfo> getFoodInfoPage(Long commonId,String label, String searchKeyWord, int i, Integer limit, String searchType);
 }

+ 13 - 0
unimall-data/src/main/java/com/iotechn/unimall/data/mapper/PlayInfoMapper.java

@@ -0,0 +1,13 @@
+package com.iotechn.unimall.data.mapper;
+
+import com.iotechn.unimall.data.domain.PlayInfo;
+import com.baomidou.mybatisplus.mapper.BaseMapper;
+/**
+ * 游玩信息Mapper接口
+ * 
+ * @author jlb
+ * @date 2023-06-13
+ */
+public interface PlayInfoMapper extends BaseMapper<PlayInfo>{
+
+}

+ 51 - 0
unimall-data/src/main/java/com/iotechn/unimall/data/util/EntCoordUtil.java

@@ -0,0 +1,51 @@
+package com.iotechn.unimall.data.util;
+
+import com.alibaba.fastjson.JSONObject;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLConnection;
+import java.text.DecimalFormat;
+
+public class EntCoordUtil {
+
+    static String AK = "VL95Z7pGgq12vPtgKmgdAVAG3mHA8ZEC"; // 百度地图密钥
+
+
+    // 调用百度地图API根据地址,获取坐标
+    public static String getCoordinate(String address) {
+        if (address != null && !"".equals(address)) {
+            address = address.replaceAll("\\s*", "").replace("#", "栋");
+            String url = "http://api.map.baidu.com/geocoding/v3/?address=" + address + "&output=json&ak=" + AK;
+            String json = loadJSON(url);
+            if (json != null && !"".equals(json)) {
+                JSONObject obj = JSONObject.parseObject(json);
+                if ("0".equals(obj.getString("status"))) {
+                    double lng = obj.getJSONObject("result").getJSONObject("location").getDouble("lng"); // 经度
+                    double lat = obj.getJSONObject("result").getJSONObject("location").getDouble("lat"); // 纬度
+                    DecimalFormat df = new DecimalFormat("#.######");
+                    return df.format(lng) + "," + df.format(lat);
+                }
+            }
+        }
+        return null;
+    }
+
+    public static String loadJSON(String url) {
+        StringBuilder json = new StringBuilder();
+        try {
+            URL oracle = new URL(url);
+            URLConnection yc = oracle.openConnection();
+            BufferedReader in = new BufferedReader(new InputStreamReader(yc.getInputStream(), "UTF-8"));
+            String inputLine = null;
+            while ((inputLine = in.readLine()) != null) {
+                json.append(inputLine);
+            }
+            in.close();
+        } catch (MalformedURLException e) {} catch (IOException e) {}
+        return json.toString();
+    }
+}

+ 56 - 1
unimall-data/src/main/resources/com/iotechn/unimall/data/mapper/FoodInfoMapper.xml

@@ -3,7 +3,62 @@
 PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.iotechn.unimall.data.mapper.FoodInfoMapper">
-    
 
 
+    <select id="getFoodInfoPage" resultType="com.iotechn.unimall.data.domain.FoodInfo">
+        SELECT
+            f.id,
+            f.common_id AS commonId,
+            f.main_body AS mainBody,
+            f.shop_names AS shopNames,
+            f.cover_image AS coverImage,
+            f.indoor_image AS indoorImage,
+            f.province,
+            f.city,
+            f.area,
+            f.location,
+            f.detailed_address AS detailedAddress,
+            f.operater,
+            f.operater_phone AS operaterPhone,
+            f.contacts,
+            f.contacts_phone AS contactsPhone,
+            f.label,
+            f.start_date AS startDate,
+            f.end_date AS endDate,
+            f.look_flag AS lookFlag,
+            f.weight_sort AS weightSort,
+            ( SELECT COUNT( id ) FROM like_collection_info WHERE delete_flag = '0' AND interaction_flag = 1 AND info_id = f.id ) AS collectionNum,
+            ( SELECT COUNT( id ) FROM like_collection_info WHERE delete_flag = '0' AND interaction_flag = 1 AND info_id = f.id AND common_id = #{commonId} ) AS collectionFlag,
+            ( SELECT COUNT( id ) FROM like_collection_info WHERE delete_flag = '0' AND interaction_flag = 2 AND info_id = f.id ) AS likeNum,
+            ( SELECT COUNT( id ) FROM like_collection_info WHERE delete_flag = '0' AND interaction_flag = 2 AND info_id = f.id AND common_id = #{commonId} ) AS likeFlag,
+            f.STATUS,
+            f.gmt_create AS gmtCreate
+        FROM
+            food_info f
+                LEFT JOIN like_collection_info lci ON lci.info_id = f.id
+                AND lci.delete_flag = 0
+                AND lci.interaction_flag = 1
+                AND lci.common_id = #{commonId}
+        WHERE
+            f.delete_flag = 0
+          AND f.`status` = '显示中'
+        <if test="label != null and label != ''">
+            AND (lower(f.label) like lower(CONCAT('%',#{label},'%')))
+        </if>
+        <if test="searchKeyWord != null and searchKeyWord != ''">
+            AND (lower(f.label) like lower(CONCAT('%',#{searchKeyWord},'%'))
+            OR lower(f.shop_names) like lower(CONCAT('%',#{searchKeyWord},'%')))
+        </if>
+        <if test="searchType != null and searchType == 4">
+            and lci.id is not null
+        </if>
+        GROUP BY f.id
+        <if test="searchType != null and searchType == 3">
+            ORDER BY likeNum DESC
+        </if>
+        <if test="searchType != null and searchType == 1">
+            order by f.weight_sort DESC,f.gmt_create DESC
+        </if>
+        limit #{i},#{limit}
+    </select>
 </mapper>

+ 9 - 0
unimall-data/src/main/resources/com/iotechn/unimall/data/mapper/PlayInfoMapper.xml

@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.iotechn.unimall.data.mapper.PlayInfoMapper">
+    
+
+
+</mapper>