Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wecloud_im_server
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hewei
wecloud_im_server
Commits
b4e1cb20
Commit
b4e1cb20
authored
Sep 18, 2021
by
giaogiao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
apns推送 数据库增删改查
parent
fada5499
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
375 additions
and
0 deletions
+375
-0
common/src/main/java/com/wecloud/im/controller/ImApplicationController.java
+0
-0
common/src/main/java/com/wecloud/im/controller/ImIosApnsController.java
+82
-0
common/src/main/java/com/wecloud/im/entity/ImIosApns.java
+48
-0
common/src/main/java/com/wecloud/im/mapper/ImIosApnsMapper.java
+40
-0
common/src/main/java/com/wecloud/im/param/ImIosApnsPageParam.java
+23
-0
common/src/main/java/com/wecloud/im/param/ImIosApnsQueryVo.java
+42
-0
common/src/main/java/com/wecloud/im/service/ImIosApnsService.java
+60
-0
common/src/main/java/com/wecloud/im/service/impl/ImIosApnsServiceImpl.java
+56
-0
common/src/main/resources/mapper/ImIosApnsMapper.xml
+24
-0
No files found.
common/src/main/java/com/wecloud/im/controller/ImApplicationController.java
View file @
b4e1cb20
This diff is collapsed.
Click to expand it.
common/src/main/java/com/wecloud/im/controller/ImIosApnsController.java
0 → 100644
View file @
b4e1cb20
//package com.wecloud.im.controller;
//
//import com.wecloud.im.service.ImIosApnsService;
//import io.geekidea.springbootplus.framework.common.controller.BaseController;
//import io.swagger.annotations.Api;
//import lombok.extern.slf4j.Slf4j;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RestController;
//
///**
// * apns配置表 控制器
// *
// * @author wei
// * @since 2021-09-18
// */
//@Slf4j
//@RestController
//@RequestMapping("/imIosApns")
//@Api(value = "apns配置表API", tags = {"apns配置表"})
//public class ImIosApnsController extends BaseController {
//
// @Autowired
// private ImIosApnsService imIosApnsService;
////
//// /**
//// * 添加apns配置表
//// */
//// @PostMapping("/add")
//// @OperationLog(name = "添加apns配置表", type = OperationLogType.ADD)
//// @ApiOperation(value = "添加apns配置表")
//// public ApiResult<Boolean> addImIosApns(@Validated(Add.class) @RequestBody ImIosApns imIosApns) throws Exception {
//// boolean flag = imIosApnsService.saveImIosApns(imIosApns);
//// return ApiResult.result(flag);
//// }
////
//// /**
//// * 修改apns配置表
//// */
//// @PostMapping("/update")
//// @OperationLog(name = "修改apns配置表", type = OperationLogType.UPDATE)
//// @ApiOperation(value = "修改apns配置表")
//// public ApiResult<Boolean> updateImIosApns(@Validated(Update.class) @RequestBody ImIosApns imIosApns) throws Exception {
//// boolean flag = imIosApnsService.updateImIosApns(imIosApns);
//// return ApiResult.result(flag);
//// }
////
//// /**
//// * 删除apns配置表
//// */
//// @PostMapping("/delete/{id}")
//// @OperationLog(name = "删除apns配置表", type = OperationLogType.DELETE)
//// @ApiOperation(value = "删除apns配置表")
//// public ApiResult<Boolean> deleteImIosApns(@PathVariable("id") Long id) throws Exception {
//// boolean flag = imIosApnsService.deleteImIosApns(id);
//// return ApiResult.result(flag);
//// }
////
//// /**
//// * 获取apns配置表详情
//// */
//// @GetMapping("/info/{id}")
//// @OperationLog(name = "apns配置表详情", type = OperationLogType.INFO)
//// @ApiOperation(value = "apns配置表详情")
//// public ApiResult<ImIosApnsQueryVo> getImIosApns(@PathVariable("id") Long id) throws Exception {
//// ImIosApnsQueryVo imIosApnsQueryVo = imIosApnsService.getImIosApnsById(id);
//// return ApiResult.ok(imIosApnsQueryVo);
//// }
//
//// /**
//// * apns配置表分页列表
//// */
//// @PostMapping("/getPageList")
//// @OperationLog(name = "apns配置表分页列表", type = OperationLogType.PAGE)
//// @ApiOperation(value = "apns配置表分页列表")
//// public ApiResult<Paging<ImIosApnsQueryVo>>getImIosApnsPageList(@Validated @RequestBody ImIosApnsPageParam imIosApnsPageParam)throws Exception{
//// Paging<ImIosApnsQueryVo> paging = imIosApnsService.getImIosApnsPageList(imIosApnsPageParam);
//// return ApiResult.ok(paging);
//// }
////
//}
//
common/src/main/java/com/wecloud/im/entity/ImIosApns.java
0 → 100644
View file @
b4e1cb20
package
com
.
wecloud
.
im
.
entity
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
io.geekidea.springbootplus.framework.common.entity.BaseEntity
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
import
javax.validation.constraints.NotNull
;
/**
* apns配置表
*
* @author wei
* @since 2021-09-18
*/
@Data
@Accessors
(
chain
=
true
)
@EqualsAndHashCode
(
callSuper
=
true
)
@ApiModel
(
value
=
"ImIosApns对象"
)
public
class
ImIosApns
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
@NotNull
(
message
=
"id不能为空"
)
@ApiModelProperty
(
"id"
)
@TableId
(
value
=
"id"
,
type
=
IdType
.
INPUT
)
private
Long
id
;
@NotNull
(
message
=
"应用appid不能为空"
)
@ApiModelProperty
(
"应用appid"
)
private
Long
fkAppId
;
@ApiModelProperty
(
"Base62(apns.p12)"
)
private
String
apnsFileValue
;
@ApiModelProperty
(
"环境,正式1,测试0"
)
private
Integer
env
;
@ApiModelProperty
(
"bundle_id"
)
private
String
bundleId
;
@ApiModelProperty
(
"证书密码"
)
private
String
pwd
;
}
common/src/main/java/com/wecloud/im/mapper/ImIosApnsMapper.java
0 → 100644
View file @
b4e1cb20
package
com
.
wecloud
.
im
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.wecloud.im.entity.ImIosApns
;
import
com.wecloud.im.param.ImIosApnsPageParam
;
import
com.wecloud.im.param.ImIosApnsQueryVo
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.stereotype.Repository
;
import
java.io.Serializable
;
/**
* apns配置表 Mapper 接口
*
* @author wei
* @since 2021-09-18
*/
@Repository
public
interface
ImIosApnsMapper
extends
BaseMapper
<
ImIosApns
>
{
/**
* 根据ID获取查询对象
*
* @param id
* @return
*/
ImIosApnsQueryVo
getImIosApnsById
(
Serializable
id
);
/**
* 获取分页对象
*
* @param page
* @param imIosApnsPageParam
* @return
*/
IPage
<
ImIosApnsQueryVo
>
getImIosApnsPageList
(
@Param
(
"page"
)
Page
page
,
@Param
(
"param"
)
ImIosApnsPageParam
imIosApnsPageParam
);
}
common/src/main/java/com/wecloud/im/param/ImIosApnsPageParam.java
0 → 100644
View file @
b4e1cb20
package
com
.
wecloud
.
im
.
param
;
import
io.geekidea.springbootplus.framework.core.pagination.BasePageOrderParam
;
import
io.swagger.annotations.ApiModel
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
/**
* <pre>
* apns配置表 分页参数对象
* </pre>
*
* @author wei
* @date 2021-09-18
*/
@Data
@Accessors
(
chain
=
true
)
@EqualsAndHashCode
(
callSuper
=
true
)
@ApiModel
(
value
=
"apns配置表分页参数"
)
public
class
ImIosApnsPageParam
extends
BasePageOrderParam
{
private
static
final
long
serialVersionUID
=
1L
;
}
common/src/main/java/com/wecloud/im/param/ImIosApnsQueryVo.java
0 → 100644
View file @
b4e1cb20
package
com
.
wecloud
.
im
.
param
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.experimental.Accessors
;
import
java.io.Serializable
;
/**
* <pre>
* apns配置表 查询结果对象
* </pre>
*
* @author wei
* @date 2021-09-18
*/
@Data
@Accessors
(
chain
=
true
)
@ApiModel
(
value
=
"ImIosApnsQueryVo对象"
)
public
class
ImIosApnsQueryVo
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
"id"
)
private
Long
id
;
@ApiModelProperty
(
"应用appid"
)
private
Long
fkAppId
;
@ApiModelProperty
(
"Base62(apns.p12)"
)
private
String
apnsFileValue
;
@ApiModelProperty
(
"环境,正式1,测试0"
)
private
Integer
env
;
@ApiModelProperty
(
"bundle_id"
)
private
String
bundleId
;
@ApiModelProperty
(
"证书密码"
)
private
String
pwd
;
}
\ No newline at end of file
common/src/main/java/com/wecloud/im/service/ImIosApnsService.java
0 → 100644
View file @
b4e1cb20
package
com
.
wecloud
.
im
.
service
;
import
com.wecloud.im.entity.ImIosApns
;
import
com.wecloud.im.param.ImIosApnsQueryVo
;
import
io.geekidea.springbootplus.framework.common.service.BaseService
;
/**
* apns配置表 服务类
*
* @author wei
* @since 2021-09-18
*/
public
interface
ImIosApnsService
extends
BaseService
<
ImIosApns
>
{
/**
* 保存
*
* @param imIosApns
* @return
* @throws Exception
*/
boolean
saveImIosApns
(
ImIosApns
imIosApns
)
throws
Exception
;
/**
* 修改
*
* @param imIosApns
* @return
* @throws Exception
*/
boolean
updateImIosApns
(
ImIosApns
imIosApns
)
throws
Exception
;
/**
* 删除
*
* @param id
* @return
* @throws Exception
*/
boolean
deleteImIosApns
(
Long
id
)
throws
Exception
;
/**
* 根据ID获取查询对象
*
* @param id
* @return
* @throws Exception
*/
ImIosApnsQueryVo
getImIosApnsById
(
Long
id
)
throws
Exception
;
/**
* 获取分页对象
*
* @param imIosApnsPageParam
* @return
* @throws Exception
*/
// Paging<ImIosApnsQueryVo> getImIosApnsPageList(ImIosApnsPageParam imIosApnsPageParam) throws Exception;
}
common/src/main/java/com/wecloud/im/service/impl/ImIosApnsServiceImpl.java
0 → 100644
View file @
b4e1cb20
package
com
.
wecloud
.
im
.
service
.
impl
;
import
com.wecloud.im.entity.ImIosApns
;
import
com.wecloud.im.mapper.ImIosApnsMapper
;
import
com.wecloud.im.param.ImIosApnsQueryVo
;
import
com.wecloud.im.service.ImIosApnsService
;
import
io.geekidea.springbootplus.framework.common.service.impl.BaseServiceImpl
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
/**
* apns配置表 服务实现类
*
* @author wei
* @since 2021-09-18
*/
@Slf4j
@Service
public
class
ImIosApnsServiceImpl
extends
BaseServiceImpl
<
ImIosApnsMapper
,
ImIosApns
>
implements
ImIosApnsService
{
@Autowired
private
ImIosApnsMapper
imIosApnsMapper
;
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Override
public
boolean
saveImIosApns
(
ImIosApns
imIosApns
)
throws
Exception
{
return
super
.
save
(
imIosApns
);
}
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Override
public
boolean
updateImIosApns
(
ImIosApns
imIosApns
)
throws
Exception
{
return
super
.
updateById
(
imIosApns
);
}
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Override
public
boolean
deleteImIosApns
(
Long
id
)
throws
Exception
{
return
super
.
removeById
(
id
);
}
@Override
public
ImIosApnsQueryVo
getImIosApnsById
(
Long
id
)
throws
Exception
{
return
imIosApnsMapper
.
getImIosApnsById
(
id
);
}
// @Override
// public Paging<ImIosApnsQueryVo> getImIosApnsPageList(ImIosApnsPageParam imIosApnsPageParam) throws Exception {
// Page<ImIosApnsQueryVo> page;
// IPage<ImIosApnsQueryVo> iPage = imIosApnsMapper.getImIosApnsPageList(page, imIosApnsPageParam);
// return new Paging<ImIosApnsQueryVo>(iPage);
// }
}
common/src/main/resources/mapper/ImIosApnsMapper.xml
0 → 100644
View file @
b4e1cb20
<?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.wecloud.im.mapper.ImIosApnsMapper"
>
<!-- 通用查询结果列 -->
<sql
id=
"Base_Column_List"
>
id
, fk_app_id, apns_file_value, env, bundle_id, pwd
</sql>
<select
id=
"getImIosApnsById"
resultType=
"com.wecloud.im.param.ImIosApnsQueryVo"
>
select
<include
refid=
"Base_Column_List"
/>
from im_ios_apns where id = #{id}
</select>
<select
id=
"getImIosApnsPageList"
parameterType=
"com.wecloud.im.param.ImIosApnsPageParam"
resultType=
"com.wecloud.im.param.ImIosApnsQueryVo"
>
select
<include
refid=
"Base_Column_List"
/>
from im_ios_apns
</select>
</mapper>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment