AR--修改--获取资源位信息时增加作品名和详情

This commit is contained in:
haotian 2025-02-17 10:44:20 +08:00
parent 4aa4a45e74
commit 3bd4be0ca6
6 changed files with 136 additions and 10 deletions

View File

@ -0,0 +1,79 @@
package com.ruoyi.system.domain.dto;
// 向AR发送资源位有关数据
public class ShowSysSourceARListDto {
private Long sourceId;
private int cX;
private int cY;
private String sourceStatus;
private String part;
private String workAddress;
private String workName;
private String detail;
public Long getSourceId() {
return sourceId;
}
public void setSourceId(Long sourceId) {
this.sourceId = sourceId;
}
public int getcX() {
return cX;
}
public void setcX(int cX) {
this.cX = cX;
}
public int getcY() {
return cY;
}
public void setcY(int cY) {
this.cY = cY;
}
public String getSourceStatus() {
return sourceStatus;
}
public void setSourceStatus(String sourceStatus) {
this.sourceStatus = sourceStatus;
}
public String getPart() {
return part;
}
public void setPart(String part) {
this.part = part;
}
public String getWorkAddress() {
return workAddress;
}
public void setWorkAddress(String workAddress) {
this.workAddress = workAddress;
}
public String getWorkName() {
return workName;
}
public void setWorkName(String workName) {
this.workName = workName;
}
public String getDetail() {
return detail;
}
public void setDetail(String detail) {
this.detail = detail;
}
}

View File

@ -8,7 +8,6 @@ public class ShowSysSourceListDto {
private int cY;
private String sourceStatus;
private String part;
private String workAddress;
public Long getSourceId() {

View File

@ -2,10 +2,7 @@ package com.ruoyi.system.mapper;
import java.util.List;
import com.ruoyi.system.domain.SysSource;
import com.ruoyi.system.domain.dto.HotSourceDto;
import com.ruoyi.system.domain.dto.SourceListDto;
import com.ruoyi.system.domain.dto.SourcePriceDto;
import com.ruoyi.system.domain.dto.UserPublishWorkSourceListDto;
import com.ruoyi.system.domain.dto.*;
import org.apache.ibatis.annotations.Param;
/**
@ -75,10 +72,15 @@ public interface SysSourceMapper
public List<HotSourceDto> getHotSource();
public int updateSysSourceByCP(SysSource sysSource);
public int updateSysSourceByCP(SysSource sysSource);
/*
* 查看我的发布资源位详情
* */
public List<UserPublishWorkSourceListDto> getUserPublishWorkSourceList(Long workId);
/*
* AR 获取资源位信息列表, 包括作品标题和介绍
* */
public List<ShowSysSourceARListDto> getSysSourceARList(SysSource sysSource);
}

View File

@ -28,6 +28,11 @@ public interface ISysSourceService
*/
public List<SysSource> selectSysSourceList(SysSource sysSource);
/*
* AR 获取资源位信息列表, 包括作品标题和介绍
* */
public List<ShowSysSourceARListDto> getSysSourceARList(SysSource sysSource);
/**
* 新增资源位
*

View File

@ -2,10 +2,7 @@ package com.ruoyi.system.service.impl;
import java.util.List;
import com.ruoyi.system.domain.dto.HotSourceDto;
import com.ruoyi.system.domain.dto.SourceListDto;
import com.ruoyi.system.domain.dto.SourcePriceDto;
import com.ruoyi.system.domain.dto.UserPublishWorkSourceListDto;
import com.ruoyi.system.domain.dto.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysSourceMapper;
@ -130,4 +127,12 @@ public class SysSourceServiceImpl implements ISysSourceService
public List<UserPublishWorkSourceListDto> getUserPublishWorkSourceList(Long workId){
return sysSourceMapper.getUserPublishWorkSourceList(workId);
}
/*
* AR 获取资源位信息列表, 包括作品标题和介绍
* */
@Override
public List<ShowSysSourceARListDto> getSysSourceARList(SysSource sysSource){
return sysSourceMapper.getSysSourceARList(sysSource);
}
}

View File

@ -65,6 +65,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<resultMap id="ShowSysSourceARListDtoResult" type="ShowSysSourceARListDto">
<result property="sourceId" column="source_id" />
<result property="cX" column="c_x" />
<result property="cY" column="c_y" />
<result property="sourceStatus" column="source_status" />
<result property="part" column="part" />
<result property="workAddress" column="work_address" />
<result property="workName" column="work_name" />
<result property="detail" column="detail" />
</resultMap>
<sql id="selectSysSourceVo">
select source_id, city_id, city, scenic_id, scenic, part, scale, coordinate, price, source_status, work_address, start_time, end_time, b_bought, order_id, work_id, c_x, c_y from sys_source
@ -139,6 +150,31 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<select id="getSysSourceARList" resultMap="ShowSysSourceARListDtoResult">
select s.source_id, s.c_x, s.c_y, s.source_status, s.part, s.work_address, w.work_name, w.detail
from sys_source s
left join user_work w
on s.work_id = w.work_id
<where>
<if test="cityId != null "> and city_id = #{cityId}</if>
<if test="city != null and city != ''"> and s.city = #{city}</if>
<if test="scenicId != null "> and scenic_id = #{scenicId}</if>
<if test="scenic != null and scenic != ''"> and s.scenic = #{scenic}</if>
<if test="part != null and part != ''"> and s.part = #{part}</if>
<if test="scale != null and scale != ''"> and scale = #{scale}</if>
<if test="coordinate != null and coordinate != ''"> and coordinate = #{coordinate}</if>
<if test="price != null and price != ''"> and price = #{price}</if>
<if test="sourceStatus != null and sourceStatus != ''"> and source_status = #{sourceStatus}</if>
<if test="workAddress != null and workAddress != ''"> and work_address = #{workAddress}</if>
<if test="startTime != null "> and start_time = #{startTime}</if>
<if test="endTime != null "> and end_time = #{endTime}</if>
<if test="bBought != null "> and b_bought = #{bBought}</if>
<if test="orderId != null "> and order_id = #{orderId}</if>
<if test="workId != null "> and s.work_id = #{workId}</if>
</where>
</select>
<insert id="insertSysSource" parameterType="SysSource" useGeneratedKeys="true" keyProperty="sourceId">
insert into sys_source