Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
cms
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
iuav
cms
Commits
e7f2e07d
提交
e7f2e07d
authored
7月 17, 2023
作者:
xiaowang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修复:修复网点编辑报错问题
上级
df5b953a
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
49 行增加
和
2 行删除
+49
-2
ApplyTagEditVO.java
.../main/java/com/mmc/iuav/user/model/vo/ApplyTagEditVO.java
+2
-0
CooperationDao.java
...r/src/main/java/com/mmc/iuav/user/dao/CooperationDao.java
+4
-0
CooperationServiceImpl.java
...om/mmc/iuav/user/service/impl/CooperationServiceImpl.java
+10
-2
CooperationDao.xml
...service-user/src/main/resources/mapper/CooperationDao.xml
+33
-0
没有找到文件。
cms-common/cms-common-model/src/main/java/com/mmc/iuav/user/model/vo/ApplyTagEditVO.java
浏览文件 @
e7f2e07d
...
...
@@ -20,6 +20,8 @@ import java.io.Serializable;
public
class
ApplyTagEditVO
implements
Serializable
{
@ApiModelProperty
(
value
=
"id"
)
private
Integer
id
;
@ApiModelProperty
(
value
=
"网点id"
)
private
Integer
websiteId
;
@ApiModelProperty
(
value
=
"标签id"
)
private
Integer
cooperationTagId
;
@ApiModelProperty
(
value
=
"网点名称"
)
...
...
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/dao/CooperationDao.java
浏览文件 @
e7f2e07d
...
...
@@ -120,4 +120,8 @@ public interface CooperationDao {
int
countServiceBitmapData
(
Integer
type
);
List
<
WebsiteInfoDO
>
listServiceBitmapData
(
Integer
type
,
Double
lon
,
Double
lat
,
int
pageNo
,
Integer
pageSize
);
void
updateWebsiteInfo
(
ApplyTagEditVO
applyTagEditVO
);
WebsiteInfoDO
getWebsiteInfoByUserApplyId
(
Integer
id
);
}
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/service/impl/CooperationServiceImpl.java
浏览文件 @
e7f2e07d
...
...
@@ -162,8 +162,16 @@ public class CooperationServiceImpl implements CooperationService {
userApplyTagDO
.
setContent
(
applyTagEditVO
.
getContent
());
userApplyTagDO
.
setScore
(
applyTagEditVO
.
getScore
());
cooperationDao
.
updateUserApplyTag
(
userApplyTagDO
);
// 保存网点信息
cooperationDao
.
addWebsiteInfo
(
applyTagEditVO
);
// 保存网点之前判断该网点是否存在 存在则修改不存在则新增
WebsiteInfoDO
websiteInfoDO
=
cooperationDao
.
getWebsiteInfoByUserApplyId
(
applyTagEditVO
.
getId
());
if
(
websiteInfoDO
==
null
)
{
// 保存网点信息
cooperationDao
.
addWebsiteInfo
(
applyTagEditVO
);
}
else
{
applyTagEditVO
.
setWebsiteId
(
websiteInfoDO
.
getId
());
// 修改网点信息
cooperationDao
.
updateWebsiteInfo
(
applyTagEditVO
);
}
return
ResultBody
.
success
();
}
...
...
csm-service/cms-service-user/src/main/resources/mapper/CooperationDao.xml
浏览文件 @
e7f2e07d
...
...
@@ -34,6 +34,27 @@
values (#{name}, #{address}, #{lat}, #{lon}, #{cooperationTagId}, #{id})
</insert>
<update
id=
"updateWebsiteInfo"
>
update website_info
<set>
<if
test=
"name != null and name != ''"
>
name = #{name},
</if>
<if
test=
"address != null and address != ''"
>
address = #{address},
</if>
<if
test=
"lat != null"
>
lat = #{lat},
</if>
<if
test=
"lon != null"
>
lon = #{lon},
</if>
<if
test=
"cooperationTagId != null"
>
type = #{cooperationTagId}
</if>
</set>
where id = #{websiteId}
</update>
<update
id=
"updateUserApplyTag"
parameterType=
"com.mmc.iuav.user.entity.UserApplyTagDO"
>
UPDATE user_apply_tag
<set>
...
...
@@ -239,4 +260,15 @@
ORDER BY distance ASC
LIMIT #{pageNo}, #{pageSize}
</select>
<select
id=
"getWebsiteInfoByUserApplyId"
resultType=
"com.mmc.iuav.user.entity.WebsiteInfoDO"
>
select id,
`name`,
address,
lat,
lon,
`type`,
user_apply_tag
from website_info
where user_apply_tag = #{id}
</select>
</mapper>
\ No newline at end of file
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论