Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
Z
zion
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
1
合并请求
1
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
zhengfg
zion
Commits
8c0a308a
提交
8c0a308a
authored
10月 23, 2019
作者:
张光耀
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
添加了,版本更新
上级
83ac52ac
隐藏空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
378 行增加
和
12 行删除
+378
-12
TokenVerification.java
...com/diaoyun/zion/chinafrica/client/TokenVerification.java
+1
-0
VersionController.java
...diaoyun/zion/chinafrica/controller/VersionController.java
+29
-0
TbCfVersionDao.java
.../java/com/diaoyun/zion/chinafrica/dao/TbCfVersionDao.java
+15
-0
TbCfVersionEntity.java
...com/diaoyun/zion/chinafrica/entity/TbCfVersionEntity.java
+85
-0
TbCfVersionService.java
...m/diaoyun/zion/chinafrica/service/TbCfVersionService.java
+74
-0
TbCfVersionServiceImpl.java
.../zion/chinafrica/service/impl/TbCfVersionServiceImpl.java
+64
-0
TbCfVersionDao.xml
src/main/resources/mapper/TbCfVersionDao.xml
+98
-0
ZionApplicationTests.java
src/test/java/com/diaoyun/zion/ZionApplicationTests.java
+12
-12
没有找到文件。
src/main/java/com/diaoyun/zion/chinafrica/client/TokenVerification.java
浏览文件 @
8c0a308a
...
...
@@ -44,6 +44,7 @@ public class TokenVerification {
"&&!execution(* com.diaoyun.zion.chinafrica.controller.TbCfFeedbackController.getFeedbackList(..))"
+
"&&!execution(* com.diaoyun.zion.chinafrica.controller.TbCfUserInfoController.getUserIdentifyCode(..))"
+
"&&!execution(* com.diaoyun.zion.chinafrica.controller.GoodsTypeController.*(..))"
+
"&&!execution(* com.diaoyun.zion.chinafrica.controller.VersionController.*(..))"
+
"&&!execution(* com.diaoyun.zion.chinafrica.controller.TbCfFeeController.*(..))"
)
public
void
controllerAspect
()
{
...
...
src/main/java/com/diaoyun/zion/chinafrica/controller/VersionController.java
0 → 100644
浏览文件 @
8c0a308a
package
com
.
diaoyun
.
zion
.
chinafrica
.
controller
;
import
com.diaoyun.zion.chinafrica.entity.TbCfVersionEntity
;
import
com.diaoyun.zion.chinafrica.service.TbCfVersionService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.HashMap
;
import
java.util.Map
;
@RestController
@RequestMapping
(
"/version"
)
public
class
VersionController
{
@Autowired
private
TbCfVersionService
tbCfVersionService
;
@RequestMapping
(
"/getVersionCode"
)
@GetMapping
public
Map
<
String
,
TbCfVersionEntity
>
getGoodsTypeList
(
@RequestParam
(
required
=
false
)
String
code
)
{
Map
<
String
,
TbCfVersionEntity
>
map
=
new
HashMap
<>();
TbCfVersionEntity
version
=
tbCfVersionService
.
getVersionCode
(
code
);
map
.
put
(
"data"
,
version
);
return
map
;
}
}
src/main/java/com/diaoyun/zion/chinafrica/dao/TbCfVersionDao.java
0 → 100644
浏览文件 @
8c0a308a
package
com
.
diaoyun
.
zion
.
chinafrica
.
dao
;
import
com.diaoyun.zion.chinafrica.entity.TbCfVersionEntity
;
import
com.diaoyun.zion.master.dao.BaseDao
;
/**
* Dao
*
* @author lipengjun
* @date 2019-10-22 14:33:29
*/
public
interface
TbCfVersionDao
extends
BaseDao
<
TbCfVersionEntity
>
{
TbCfVersionEntity
getVersionCode
(
String
code
);
}
src/main/java/com/diaoyun/zion/chinafrica/entity/TbCfVersionEntity.java
0 → 100644
浏览文件 @
8c0a308a
package
com
.
diaoyun
.
zion
.
chinafrica
.
entity
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* 实体
* 表名 tb_cf_version
*
* @author lipengjun
* @date 2019-10-22 14:33:29
*/
public
class
TbCfVersionEntity
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 版本号Id
*/
private
String
versionId
;
/**
* 版本code
*/
private
String
versionCode
;
/**
* 版本更新链接
*/
private
String
versionLike
;
/**
* 版本更新内容
*/
private
String
versionDetail
;
/**
* 设置:版本号Id
*/
public
void
setVersionId
(
String
versionId
)
{
this
.
versionId
=
versionId
;
}
/**
* 获取:版本号Id
*/
public
String
getVersionId
()
{
return
versionId
;
}
/**
* 设置:版本code
*/
public
void
setVersionCode
(
String
versionCode
)
{
this
.
versionCode
=
versionCode
;
}
/**
* 获取:版本code
*/
public
String
getVersionCode
()
{
return
versionCode
;
}
/**
* 设置:版本更新链接
*/
public
void
setVersionLike
(
String
versionLike
)
{
this
.
versionLike
=
versionLike
;
}
/**
* 获取:版本更新链接
*/
public
String
getVersionLike
()
{
return
versionLike
;
}
/**
* 设置:版本更新内容
*/
public
void
setVersionDetail
(
String
versionDetail
)
{
this
.
versionDetail
=
versionDetail
;
}
/**
* 获取:版本更新内容
*/
public
String
getVersionDetail
()
{
return
versionDetail
;
}
}
src/main/java/com/diaoyun/zion/chinafrica/service/TbCfVersionService.java
0 → 100644
浏览文件 @
8c0a308a
package
com
.
diaoyun
.
zion
.
chinafrica
.
service
;
import
com.diaoyun.zion.chinafrica.entity.TbCfVersionEntity
;
import
java.util.List
;
import
java.util.Map
;
/**
* Service接口
*
* @author lipengjun
* @date 2019-10-22 14:33:29
*/
public
interface
TbCfVersionService
{
/**
* 根据主键查询实体
*
* @param id 主键
* @return 实体
*/
TbCfVersionEntity
queryObject
(
String
versionId
);
/**
* 分页查询
*
* @param map 参数
* @return list
*/
List
<
TbCfVersionEntity
>
queryList
(
Map
<
String
,
Object
>
map
);
/**
* 分页统计总数
*
* @param map 参数
* @return 总数
*/
int
queryTotal
(
Map
<
String
,
Object
>
map
);
/**
* 保存实体
*
* @param tbCfVersion 实体
* @return 保存条数
*/
int
save
(
TbCfVersionEntity
tbCfVersion
);
/**
* 根据主键更新实体
*
* @param tbCfVersion 实体
* @return 更新条数
*/
int
update
(
TbCfVersionEntity
tbCfVersion
);
/**
* 根据主键删除
*
* @param versionId
* @return 删除条数
*/
int
delete
(
String
versionId
);
/**
* 根据主键批量删除
*
* @param versionIds
* @return 删除条数
*/
int
deleteBatch
(
String
[]
versionIds
);
TbCfVersionEntity
getVersionCode
(
String
code
);
}
src/main/java/com/diaoyun/zion/chinafrica/service/impl/TbCfVersionServiceImpl.java
0 → 100644
浏览文件 @
8c0a308a
package
com
.
diaoyun
.
zion
.
chinafrica
.
service
.
impl
;
import
com.diaoyun.zion.chinafrica.dao.TbCfVersionDao
;
import
com.diaoyun.zion.chinafrica.entity.TbCfVersionEntity
;
import
com.diaoyun.zion.chinafrica.service.TbCfVersionService
;
import
com.diaoyun.zion.master.util.IdUtil
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
import
java.util.Map
;
/**
* Service实现类
*
* @author lipengjun
* @date 2019-10-22 14:33:29
*/
@Service
(
"tbCfVersionService"
)
public
class
TbCfVersionServiceImpl
implements
TbCfVersionService
{
@Autowired
private
TbCfVersionDao
tbCfVersionDao
;
@Override
public
TbCfVersionEntity
queryObject
(
String
versionId
)
{
return
tbCfVersionDao
.
queryObject
(
versionId
);
}
@Override
public
List
<
TbCfVersionEntity
>
queryList
(
Map
<
String
,
Object
>
map
)
{
return
tbCfVersionDao
.
queryList
(
map
);
}
@Override
public
int
queryTotal
(
Map
<
String
,
Object
>
map
)
{
return
tbCfVersionDao
.
queryTotal
(
map
);
}
@Override
public
int
save
(
TbCfVersionEntity
tbCfVersion
)
{
tbCfVersion
.
setVersionId
(
IdUtil
.
createIdbyUUID
());
return
tbCfVersionDao
.
save
(
tbCfVersion
);
}
@Override
public
int
update
(
TbCfVersionEntity
tbCfVersion
)
{
return
tbCfVersionDao
.
update
(
tbCfVersion
);
}
@Override
public
int
delete
(
String
versionId
)
{
return
tbCfVersionDao
.
delete
(
versionId
);
}
@Override
public
int
deleteBatch
(
String
[]
versionIds
)
{
return
tbCfVersionDao
.
deleteBatch
(
versionIds
);
}
@Override
public
TbCfVersionEntity
getVersionCode
(
String
code
)
{
return
tbCfVersionDao
.
getVersionCode
(
code
);
}
}
src/main/resources/mapper/TbCfVersionDao.xml
0 → 100644
浏览文件 @
8c0a308a
<?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.diaoyun.zion.chinafrica.dao.TbCfVersionDao"
>
<resultMap
type=
"com.diaoyun.zion.chinafrica.entity.TbCfVersionEntity"
id=
"tbCfVersionMap"
>
<result
property=
"versionId"
column=
"version_id"
/>
<result
property=
"versionCode"
column=
"version_code"
/>
<result
property=
"versionLike"
column=
"version_like"
/>
<result
property=
"versionDetail"
column=
"version_detail"
/>
</resultMap>
<select
id=
"getVersionCode"
resultType=
"com.diaoyun.zion.chinafrica.entity.TbCfVersionEntity"
>
select
`version_id`,
`version_code`,
`version_like`,
`version_detail`
from tb_cf_version
where version_code = #{code}
</select>
<select
id=
"queryObject"
resultType=
"com.diaoyun.zion.chinafrica.entity.TbCfVersionEntity"
>
select
`version_id`,
`version_code`,
`version_like`,
`version_detail`
from tb_cf_version
where version_id = #{id}
</select>
<select
id=
"queryList"
resultType=
"com.diaoyun.zion.chinafrica.entity.TbCfVersionEntity"
>
select
`version_id`,
`version_code`,
`version_like`,
`version_detail`
from tb_cf_version
WHERE 1=1
<if
test=
"name != null and name.trim() != ''"
>
AND name LIKE concat('%',#{name},'%')
</if>
<choose>
<when
test=
"sidx != null and sidx.trim() != ''"
>
order by ${sidx} ${order}
</when>
<otherwise>
order by version_id desc
</otherwise>
</choose>
<if
test=
"offset != null and limit != null"
>
limit #{offset}, #{limit}
</if>
</select>
<select
id=
"queryTotal"
resultType=
"int"
>
select count(*) from tb_cf_version
WHERE 1=1
<if
test=
"name != null and name.trim() != ''"
>
AND name LIKE concat('%',#{name},'%')
</if>
</select>
<insert
id=
"save"
parameterType=
"com.diaoyun.zion.chinafrica.entity.TbCfVersionEntity"
>
insert into tb_cf_version(
`version_id`,
`version_code`,
`version_like`,
`version_detail`)
values(
#{versionId},
#{versionCode},
#{versionLike},
#{versionDetail})
</insert>
<update
id=
"update"
parameterType=
"com.diaoyun.zion.chinafrica.entity.TbCfVersionEntity"
>
update tb_cf_version
<set>
<if
test=
"versionCode != null"
>
`version_code` = #{versionCode},
</if>
<if
test=
"versionLike != null"
>
`version_like` = #{versionLike},
</if>
<if
test=
"versionDetail != null"
>
`version_detail` = #{versionDetail}
</if>
</set>
where version_id = #{versionId}
</update>
<delete
id=
"delete"
>
delete from tb_cf_version where version_id = #{value}
</delete>
<delete
id=
"deleteBatch"
>
delete from tb_cf_version where version_id in
<foreach
item=
"versionId"
collection=
"array"
open=
"("
separator=
","
close=
")"
>
#{versionId}
</foreach>
</delete>
</mapper>
\ No newline at end of file
src/test/java/com/diaoyun/zion/ZionApplicationTests.java
浏览文件 @
8c0a308a
...
...
@@ -367,7 +367,7 @@ public class ZionApplicationTests {
*
* @param usableSibUrl
* @return
*/
private
String
deleteLoginModule
(
String
usableSibUrl
)
{
usableSibUrl
=
usableSibUrl
.
replaceAll
(
"couponActivity"
,
""
);
usableSibUrl
=
usableSibUrl
.
replaceAll
(
"soldQuantity"
,
""
);
...
...
@@ -378,8 +378,8 @@ public class ZionApplicationTests {
usableSibUrl
=
usableSibUrl
.
replaceAll
(
"delivery"
,
""
);
return
usableSibUrl
;
}
*/
/*
//使用序列化的方式保存CookieStore到本地文件,方便后续的读取使用
private
static
void
saveCookieStore
(
CookieStore
cookieStore
,
String
savePath
)
throws
IOException
{
...
...
@@ -388,8 +388,8 @@ public class ZionApplicationTests {
os
.
writeObject
(
cookieStore
);
os
.
close
();
}
*/
/*
}
//读取Cookie的序列化文件,读取后可以直接使用
private
static
CookieStore
readCookieStore
(
String
savePath
)
throws
IOException
,
ClassNotFoundException
{
...
...
@@ -400,8 +400,8 @@ public class ZionApplicationTests {
return
cookieStore
;
}
*/
/*
}
private
List
<
NameValuePair
>
setHttpParams
(
Map
<
String
,
Object
>
paramsMap
)
{
List
<
NameValuePair
>
list
=
new
ArrayList
<
NameValuePair
>();
for
(
String
key
:
paramsMap
.
keySet
())
{
...
...
@@ -409,8 +409,8 @@ public class ZionApplicationTests {
}
return
list
;
}
*/
/*
@Test
public
void
testDate
()
throws
ParseException
{
...
...
@@ -421,8 +421,8 @@ public class ZionApplicationTests {
String
s
=
String
.
valueOf
(
it
);
System
.
out
.
println
(
s
);
}
*/
/*
}
@Test
public
void
testP
(){
...
...
@@ -430,7 +430,7 @@ public class ZionApplicationTests {
BigDecimal
de
=
new
BigDecimal
(
"100"
);
decimal
.
divide
(
de
,
2
,
BigDecimal
.
ROUND_HALF_UP
);
}
*/
}
@Test
public
void
testAesut
(){
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论