提交 39a1089d 作者: zhenjie 提交者: 余乾开

合作加盟接口添加和切换测试数据库

上级 d7e95e3b
...@@ -29,6 +29,13 @@ public class CooperationController { ...@@ -29,6 +29,13 @@ public class CooperationController {
return cooperationService.listTag(); return cooperationService.listTag();
} }
@ApiOperation(value = "根据id获取标签信息")
@ApiResponses({ @ApiResponse(code = 200, message = "OK", response = CooperationTagVO.class) })
@GetMapping("getTagById")
public ResultBody getTagById(@RequestParam("id") Integer id) {
return cooperationService.getTagById(id);
}
@ApiOperation(value = "申请加盟") @ApiOperation(value = "申请加盟")
@ApiResponses({ @ApiResponse(code = 200, message = "OK", response = ResultBody.class) }) @ApiResponses({ @ApiResponse(code = 200, message = "OK", response = ResultBody.class) })
@PostMapping("apply") @PostMapping("apply")
......
...@@ -56,4 +56,11 @@ public interface CooperationDao { ...@@ -56,4 +56,11 @@ public interface CooperationDao {
* @param userTagDO * @param userTagDO
*/ */
void updateUserTag(UserTagDO userTagDO); void updateUserTag(UserTagDO userTagDO);
/**
* 根据id查询标签信息
* @param id
* @return
*/
CooperationTagDO getTagById(Integer id);
} }
...@@ -28,4 +28,11 @@ public interface CooperationService { ...@@ -28,4 +28,11 @@ public interface CooperationService {
* @return * @return
*/ */
ResultBody changeUserTag(Integer userAccountId, Integer cooperationTagId); ResultBody changeUserTag(Integer userAccountId, Integer cooperationTagId);
/**
* 根据ID查询标签信息
* @param id
* @return
*/
ResultBody getTagById(Integer id);
} }
...@@ -77,4 +77,13 @@ public class CooperationServiceImpl implements CooperationService { ...@@ -77,4 +77,13 @@ public class CooperationServiceImpl implements CooperationService {
cooperationDao.updateUserTag(userTagDO); cooperationDao.updateUserTag(userTagDO);
return ResultBody.success(); return ResultBody.success();
} }
@Override
public ResultBody getTagById(Integer id) {
CooperationTagDO cooperationTagDO = cooperationDao.getTagById(id);
if (cooperationTagDO == null){
return ResultBody.success();
}
return ResultBody.success(cooperationTagDO.buildCooperationTagVO());
}
} }
...@@ -3,7 +3,7 @@ spring: ...@@ -3,7 +3,7 @@ spring:
#Database #Database
datasource: datasource:
driver-class-name: com.mysql.cj.jdbc.Driver driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://mysql.default:3306/iuav_cms?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=GMT%2B8 url: jdbc:mysql://mysql.default:3306/iuav_cms_dev?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=GMT%2B8
username: tmj username: tmj
password: MMC@2022&MYSQL password: MMC@2022&MYSQL
# Druid数据源配置 # Druid数据源配置
......
...@@ -3,7 +3,7 @@ spring: ...@@ -3,7 +3,7 @@ spring:
#Database #Database
datasource: datasource:
driver-class-name: com.mysql.cj.jdbc.Driver driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://rm-wz9dd796t4j1giz6t2o.mysql.rds.aliyuncs.com:3306/iuav_cms?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=GMT%2B8 url: jdbc:mysql://rm-wz9dd796t4j1giz6t2o.mysql.rds.aliyuncs.com:3306/iuav_cms_dev?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=GMT%2B8
username: tmj username: tmj
password: MMC@2022&MYSQL password: MMC@2022&MYSQL
# Druid数据源配置 # Druid数据源配置
......
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
</update> </update>
<select id="listTags" resultType="com.mmc.iuav.user.entity.CooperationTagDO"> <select id="listTags" resultType="com.mmc.iuav.user.entity.CooperationTagDO">
select id, tag_name, tag_img, tag_description, create_time from cooperation_tag select id, tag_name, tag_img, tag_description, create_time from cooperation_tag where is_deleted = 0
</select> </select>
<select id="getUserApplyTag" resultType="com.mmc.iuav.user.entity.UserApplyTagDO"> <select id="getUserApplyTag" resultType="com.mmc.iuav.user.entity.UserApplyTagDO">
...@@ -58,4 +58,8 @@ ...@@ -58,4 +58,8 @@
from user_tag from user_tag
where user_account_id = #{userAccountId} and is_deleted = 0 where user_account_id = #{userAccountId} and is_deleted = 0
</select> </select>
<select id="getTagById" resultType="com.mmc.iuav.user.entity.CooperationTagDO">
select id, tag_name, tag_img, tag_description, create_time from cooperation_tag where id = #{id} and is_deleted = 0
</select>
</mapper> </mapper>
\ No newline at end of file
...@@ -10,6 +10,7 @@ data-filter: ...@@ -10,6 +10,7 @@ data-filter:
- /userapp/auth/testAppletLogin - /userapp/auth/testAppletLogin
- /userapp/auth/appletLogin - /userapp/auth/appletLogin
- /userapp/cooperation/listTag - /userapp/cooperation/listTag
- /userapp/cooperation/getTagById
- /userapp/temp-auth/getLoginInfo - /userapp/temp-auth/getLoginInfo
- /userapp/wx/getAppletQRCode - /userapp/wx/getAppletQRCode
- /userapp/wx/wxSendMessage - /userapp/wx/wxSendMessage
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论