fix:appCode
This commit is contained in:
+9
-5
@@ -353,8 +353,8 @@ public class SysUserController {
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/users-anon/miniApp")
|
||||
public MiniAppConfig findAppByAppId(@RequestParam String appId) {
|
||||
return miniAppConfigService.getByAppid(appId);
|
||||
public MiniAppConfig findAppByAppId(@RequestParam String appCode) {
|
||||
return miniAppConfigService.getByAppCode(appCode);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -436,9 +436,13 @@ public class SysUserController {
|
||||
/**
|
||||
* 新增或修改小程序配置
|
||||
*/
|
||||
@PostMapping("/miniapp/saveOrUpdate")
|
||||
@PostMapping("/miniApp/saveOrUpdate")
|
||||
@Operation(summary = "新增或修改小程序配置")
|
||||
public Result<Boolean> saveOrUpdateMiniAppConfig(@RequestBody MiniAppConfig config) {
|
||||
if (ObjectUtil.isNull(config.getAppCode())) {
|
||||
String codeId = UUID.randomUUID().toString();
|
||||
config.setAppCode(codeId);
|
||||
}
|
||||
boolean success = miniAppConfigService.saveOrUpdate(config);
|
||||
return success ? Result.succeed(true, "操作成功") : Result.failed("操作失败");
|
||||
}
|
||||
@@ -448,7 +452,7 @@ public class SysUserController {
|
||||
@Parameter(name = "page", description = "分页起始位置", required = true, in = ParameterIn.QUERY),
|
||||
@Parameter(name = "limit", description = "分页结束位置", required = true, in = ParameterIn.QUERY)
|
||||
})
|
||||
@GetMapping("/miniapp/list")
|
||||
@GetMapping("/miniApp/list")
|
||||
public PageResult<MiniAppConfig> findMiniAppConfigs(@RequestParam Map<String, Object> params) {
|
||||
return miniAppConfigService.findMiniAppConfigs(params);
|
||||
}
|
||||
@@ -456,7 +460,7 @@ public class SysUserController {
|
||||
/**
|
||||
* 根据ID查询小程序配置
|
||||
*/
|
||||
@GetMapping("/miniapp/{id}")
|
||||
@GetMapping("/miniApp/{id}")
|
||||
@Operation(summary = "根据ID查询小程序配置")
|
||||
public Result<MiniAppConfig> getMiniAppConfigById(@PathVariable Long id) {
|
||||
MiniAppConfig config = miniAppConfigService.getById(id);
|
||||
|
||||
+2
-2
@@ -7,6 +7,6 @@ import org.apache.ibatis.annotations.Select;
|
||||
|
||||
@Mapper
|
||||
public interface MiniAppConfigMapper extends SuperMapper<MiniAppConfig> {
|
||||
@Select("SELECT * FROM mini_app_config WHERE appid = #{appid} AND status = 1 LIMIT 1")
|
||||
MiniAppConfig selectByAppid(String appid);
|
||||
@Select("SELECT * FROM mini_app_config WHERE appCode = #{appCode} AND status = 1 LIMIT 1")
|
||||
MiniAppConfig selectByAppCode(String appCode);
|
||||
}
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ import com.central.common.service.ISuperService;
|
||||
import java.util.Map;
|
||||
|
||||
public interface MiniAppConfigService extends ISuperService<MiniAppConfig> {
|
||||
MiniAppConfig getByAppid(String appid);
|
||||
MiniAppConfig getByAppCode(String appCode);
|
||||
|
||||
PageResult<MiniAppConfig> findMiniAppConfigs(Map<String, Object> params);
|
||||
}
|
||||
|
||||
+2
-2
@@ -20,8 +20,8 @@ public class MiniAppConfigServiceImpl extends SuperServiceImpl<MiniAppConfigMapp
|
||||
private MiniAppConfigMapper miniAppConfigMapper;
|
||||
|
||||
@Override
|
||||
public MiniAppConfig getByAppid(String appid) {
|
||||
return miniAppConfigMapper.selectByAppid(appid);
|
||||
public MiniAppConfig getByAppCode(String appCode) {
|
||||
return miniAppConfigMapper.selectByAppCode(appCode);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -39,7 +39,7 @@ zlt:
|
||||
- sys_user
|
||||
- sys_role_user
|
||||
- sys_role_menu
|
||||
- sys_tenant
|
||||
- mini_app_config
|
||||
ignoreSqls:
|
||||
# 用户关联角色时,显示所有角色
|
||||
- com.central.user.mapper.SysRoleMapper.findAll
|
||||
|
||||
Reference in New Issue
Block a user