Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Q
qk_backend
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
quanku
qk_backend
Commits
c3fde926
Commit
c3fde926
authored
May 06, 2024
by
shiyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
图录
parent
a46fb2ba
Changes
22
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
4000 additions
and
8 deletions
+4000
-8
ch-admin-api/src/main/java/com/wwdz/ch/admin/controller/ImageCatelogController.java
.../com/wwdz/ch/admin/controller/ImageCatelogController.java
+31
-0
ch-admin-api/src/main/java/com/wwdz/ch/admin/impl/ImageCatelogServiceImpl.java
.../java/com/wwdz/ch/admin/impl/ImageCatelogServiceImpl.java
+36
-0
ch-admin-api/src/main/java/com/wwdz/ch/admin/service/ImageCatelogService.java
...n/java/com/wwdz/ch/admin/service/ImageCatelogService.java
+10
-0
ch-admin-api/src/test/java/com/wwdz/ch/admin/impl/UploadImageCatelogUtilTest.java
...va/com/wwdz/ch/admin/impl/UploadImageCatelogUtilTest.java
+23
-0
ch-core/src/main/java/com/wwdz/ch/core/api/WxAppletApi.java
ch-core/src/main/java/com/wwdz/ch/core/api/WxAppletApi.java
+41
-1
ch-core/src/main/java/com/wwdz/ch/core/util/UploadImageCatelogUtil.java
...in/java/com/wwdz/ch/core/util/UploadImageCatelogUtil.java
+82
-0
ch-dao/src/main/java/com/wwdz/ch/db/dao/distribution/ImageCatelogDao.java
...java/com/wwdz/ch/db/dao/distribution/ImageCatelogDao.java
+13
-0
ch-dao/src/main/java/com/wwdz/ch/db/dao/distribution/ImageCatelogDetailDao.java
...om/wwdz/ch/db/dao/distribution/ImageCatelogDetailDao.java
+8
-0
ch-dao/src/main/java/com/wwdz/ch/db/domain/distribution/ImageCatelog.java
...java/com/wwdz/ch/db/domain/distribution/ImageCatelog.java
+278
-0
ch-dao/src/main/java/com/wwdz/ch/db/domain/distribution/ImageCatelogDetail.java
...om/wwdz/ch/db/domain/distribution/ImageCatelogDetail.java
+266
-0
ch-dao/src/main/java/com/wwdz/ch/db/domain/distribution/ImageCatelogDetailExample.java
.../ch/db/domain/distribution/ImageCatelogDetailExample.java
+973
-0
ch-dao/src/main/java/com/wwdz/ch/db/domain/distribution/ImageCatelogExample.java
...m/wwdz/ch/db/domain/distribution/ImageCatelogExample.java
+1125
-0
ch-dao/src/main/java/com/wwdz/ch/db/dto/request/distribution/ImageCatelogRequestDto.java
...h/db/dto/request/distribution/ImageCatelogRequestDto.java
+278
-0
ch-dao/src/main/java/com/wwdz/ch/db/impl/distribution/ImageCatelogDaoImpl.java
...com/wwdz/ch/db/impl/distribution/ImageCatelogDaoImpl.java
+47
-0
ch-dao/src/main/java/com/wwdz/ch/db/impl/distribution/ImageCatelogDetailDaoImpl.java
...dz/ch/db/impl/distribution/ImageCatelogDetailDaoImpl.java
+20
-0
ch-dao/src/main/java/com/wwdz/ch/db/mapper/distribution/ImageCatelogDetailMapper.java
...z/ch/db/mapper/distribution/ImageCatelogDetailMapper.java
+69
-0
ch-dao/src/main/java/com/wwdz/ch/db/mapper/distribution/ImageCatelogMapper.java
...om/wwdz/ch/db/mapper/distribution/ImageCatelogMapper.java
+69
-0
ch-dao/src/main/resources/com/wwdz/ch/db/mapper/distribution/ImageCatelogDetailMapper.xml
...dz/ch/db/mapper/distribution/ImageCatelogDetailMapper.xml
+306
-0
ch-dao/src/main/resources/com/wwdz/ch/db/mapper/distribution/ImageCatelogMapper.xml
...com/wwdz/ch/db/mapper/distribution/ImageCatelogMapper.xml
+321
-0
ch-dao/src/main/resources/generatorConfig_new.xml
ch-dao/src/main/resources/generatorConfig_new.xml
+1
-1
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/DistributionOrderServiceImpl.java
...ch/wx/impl/distribution/DistributionOrderServiceImpl.java
+2
-5
ch-wx-api/src/test/java/com/wwdz/ch/wx/api/WxPayServiceTest.java
...pi/src/test/java/com/wwdz/ch/wx/api/WxPayServiceTest.java
+1
-1
No files found.
ch-admin-api/src/main/java/com/wwdz/ch/admin/controller/ImageCatelogController.java
0 → 100644
View file @
c3fde926
package
com.wwdz.ch.admin.controller
;
import
com.alibaba.fastjson.JSON
;
import
com.wwdz.ch.admin.service.ImageCatelogService
;
import
com.wwdz.ch.core.type.Result
;
import
com.wwdz.ch.db.dto.request.distribution.ImageCatelogRequestDto
;
import
io.swagger.annotations.ApiOperation
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
@RestController
@RequestMapping
(
"/admin/imageCatelog"
)
public
class
ImageCatelogController
{
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
ImageCatelogController
.
class
);
@Autowired
ImageCatelogService
imageCatelogService
;
@ApiOperation
(
value
=
"查询图录列表"
)
@PostMapping
(
"/find"
)
public
Result
update
(
@RequestBody
ImageCatelogRequestDto
dto
)
{
logger
.
info
(
"查询图录列表,请求参数:{}"
,
JSON
.
toJSONString
(
dto
));
return
imageCatelogService
.
findList
(
dto
);
}
}
ch-admin-api/src/main/java/com/wwdz/ch/admin/impl/ImageCatelogServiceImpl.java
0 → 100644
View file @
c3fde926
package
com.wwdz.ch.admin.impl
;
import
com.github.pagehelper.PageInfo
;
import
com.wwdz.ch.admin.service.ImageCatelogService
;
import
com.wwdz.ch.core.type.PageSearchResult
;
import
com.wwdz.ch.core.type.Result
;
import
com.wwdz.ch.db.dao.distribution.ImageCatelogDao
;
import
com.wwdz.ch.db.domain.distribution.ImageCatelog
;
import
com.wwdz.ch.db.dto.request.distribution.ImageCatelogRequestDto
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
@Service
public
class
ImageCatelogServiceImpl
implements
ImageCatelogService
{
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
ImageCatelogServiceImpl
.
class
);
@Autowired
ImageCatelogDao
imageCatelogDao
;
@Override
public
Result
findList
(
ImageCatelogRequestDto
dto
)
{
try
{
List
<
ImageCatelog
>
list
=
imageCatelogDao
.
findList
(
dto
);
PageInfo
pageInfo
=
new
PageInfo
(
list
);
return
Result
.
success
(
PageSearchResult
.
of
(
pageInfo
));
}
catch
(
Exception
e
)
{
logger
.
error
(
"查询图录列表 error:{}"
,
e
);
}
return
Result
.
failed
();
}
}
ch-admin-api/src/main/java/com/wwdz/ch/admin/service/ImageCatelogService.java
0 → 100644
View file @
c3fde926
package
com.wwdz.ch.admin.service
;
import
com.wwdz.ch.core.type.Result
;
import
com.wwdz.ch.db.dto.request.distribution.ImageCatelogRequestDto
;
public
interface
ImageCatelogService
{
Result
findList
(
ImageCatelogRequestDto
dto
);
}
ch-admin-api/src/test/java/com/wwdz/ch/admin/impl/UploadImageCatelogUtilTest.java
0 → 100644
View file @
c3fde926
package
com.wwdz.ch.admin.impl
;
import
com.wwdz.ch.core.util.UploadImageCatelogUtil
;
import
org.junit.Test
;
import
org.junit.runner.RunWith
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.test.context.SpringBootTest
;
import
org.springframework.test.context.junit4.SpringJUnit4ClassRunner
;
import
org.springframework.test.context.web.WebAppConfiguration
;
@WebAppConfiguration
@RunWith
(
SpringJUnit4ClassRunner
.
class
)
@SpringBootTest
public
class
UploadImageCatelogUtilTest
{
@Autowired
UploadImageCatelogUtil
uploadImageCatelogUtil
;
@Test
public
void
upload
()
{
uploadImageCatelogUtil
.
upload
();
}
}
\ No newline at end of file
ch-core/src/main/java/com/wwdz/ch/core/api/WxAppletApi.java
View file @
c3fde926
package
com.wwdz.ch.core.api
;
package
com.wwdz.ch.core.api
;
import
com.alibaba.fastjson.JSONArray
;
import
com.wwdz.ch.core.entity.WxCheckMediaRequestDto
;
import
com.wwdz.ch.core.entity.WxCheckMediaRequestDto
;
import
com.wwdz.ch.core.type.Result
;
import
com.wwdz.ch.core.util.OkHttpUtil
;
import
com.wwdz.ch.core.util.OkHttpUtil
;
import
com.xxdxxs.utils.JsonUtils
;
import
com.xxdxxs.utils.JsonUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
...
@@ -10,6 +12,7 @@ import org.springframework.beans.factory.annotation.Value;
...
@@ -10,6 +12,7 @@ import org.springframework.beans.factory.annotation.Value;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
@Component
@Component
...
@@ -36,6 +39,9 @@ public class WxAppletApi {
...
@@ -36,6 +39,9 @@ public class WxAppletApi {
private
static
final
String
URL_LINK
=
"https://api.weixin.qq.com/wxa/generate_urllink?access_token=%s"
;
private
static
final
String
URL_LINK
=
"https://api.weixin.qq.com/wxa/generate_urllink?access_token=%s"
;
//获取用户访问小程序数据日趋势
private
static
final
String
GET_ACCESS_DATA_URL
=
"https://api.weixin.qq.com/datacube/getweanalysisappiddailyvisittrend?access_token=%s"
;
public
String
checkMedia
(
WxCheckMediaRequestDto
dto
)
{
public
String
checkMedia
(
WxCheckMediaRequestDto
dto
)
{
String
accessToken
=
wxLoginManager
.
getAccessToken
();
String
accessToken
=
wxLoginManager
.
getAccessToken
();
String
url
=
String
.
format
(
MEDIA_CHECK_URL
,
accessToken
);
String
url
=
String
.
format
(
MEDIA_CHECK_URL
,
accessToken
);
...
@@ -83,8 +89,42 @@ public class WxAppletApi {
...
@@ -83,8 +89,42 @@ public class WxAppletApi {
return
urlLink
+
" "
;
return
urlLink
+
" "
;
}
}
/**
* 获取小程序访问数据
* @param startTime
* @param endTime
* @param type
* @return
*/
public
Result
getAccessData
(
String
startTime
,
String
endTime
,
int
type
)
{
try
{
String
accessToken
=
wxLoginManager
.
getAccessToken
();
String
url
=
String
.
format
(
GET_ACCESS_DATA_URL
,
accessToken
);
OkHttpUtil
okHttpUtil
=
OkHttpUtil
.
builder
().
url
(
url
);
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"begin_date"
,
startTime
);
map
.
put
(
"end_date"
,
endTime
);
logger
.
info
(
"获取加密URLLink 参数:{}"
,
JsonUtils
.
from
(
map
));
okHttpUtil
.
addParams
(
map
);
okHttpUtil
.
post
(
true
);
String
responseStr
=
okHttpUtil
.
async
();
logger
.
info
(
"获取用户访问小程序数据 response :{}"
,
responseStr
);
String
listInfo
=
JsonUtils
.
getValueByPath
(
responseStr
,
"list"
);
List
<
Map
<
String
,
Object
>>
dataList
=
JsonUtils
.
toMapList
(
listInfo
);
//session_cnt
int
sessionCnt
=
(
int
)
dataList
.
get
(
0
).
get
(
"session_cnt"
);
//访问次数
int
visitPv
=
(
int
)
dataList
.
get
(
0
).
get
(
"visit_pv"
);
//访问人数
int
visitUv
=
(
int
)
dataList
.
get
(
0
).
get
(
"visit_uv"
);
//新用户数
int
visitUvNew
=
(
int
)
dataList
.
get
(
0
).
get
(
"visit_uv_new"
);
}
catch
(
Exception
e
)
{
logger
.
error
(
"获取用户访问小程序数据失败:{}"
,
e
);
}
return
Result
.
failed
();
}
}
}
ch-core/src/main/java/com/wwdz/ch/core/util/UploadImageCatelogUtil.java
0 → 100644
View file @
c3fde926
package
com.wwdz.ch.core.util
;
import
com.wwdz.ch.core.consts.CommConsts
;
import
com.wwdz.ch.core.consts.MediaTypeEnum
;
import
com.wwdz.ch.core.storage.QiniuStorage
;
import
com.wwdz.ch.core.type.Result
;
import
com.wwdz.ch.db.dao.distribution.ImageCatelogDao
;
import
com.wwdz.ch.db.dao.distribution.ImageCatelogDetailDao
;
import
com.wwdz.ch.db.domain.distribution.ImageCatelog
;
import
com.wwdz.ch.db.domain.distribution.ImageCatelogDetail
;
import
com.xxdxxs.utils.CommonUtils
;
import
jodd.io.findfile.FindFile
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
javax.imageio.ImageIO
;
import
java.awt.image.BufferedImage
;
import
java.io.File
;
import
java.io.InputStream
;
import
java.util.Date
;
import
static
com
.
wwdz
.
ch
.
core
.
util
.
MediaUtil
.
bufferedImageToInputStream
;
@Component
public
class
UploadImageCatelogUtil
{
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
UploadImageCatelogUtil
.
class
);
private
final
static
String
IMAGE_PATH
=
"/Users/xxdxxs/Documents/image_catelog/img/"
;
private
final
static
Integer
CATELOG_ID
=
1
;
@Autowired
ImageCatelogDetailDao
imageCatelogDetailDao
;
@Autowired
ImageCatelogDao
imageCatelogDao
;
@Autowired
QiniuStorage
qiniuStorage
;
public
Result
upload
()
{
try
{
ImageCatelog
imageCatelog
=
imageCatelogDao
.
findById
(
CATELOG_ID
);
logger
.
info
(
"当前上传的图录名称为 : {}"
,
imageCatelog
.
getName
());
File
folder
=
new
File
(
IMAGE_PATH
);
File
[]
listOfFiles
=
folder
.
listFiles
();
java
.
util
.
Arrays
.
sort
(
listOfFiles
,
new
FindFile
.
FileNameComparator
(
true
));
logger
.
info
(
"============ 当前目录下共有文件 : {} 个 ============="
,
listOfFiles
.
length
);
int
sort
=
1
;
for
(
File
file
:
listOfFiles
)
{
logger
.
info
(
">>>>>>>>>> 当前处理的文件名称:{} <<<<<<<<<<"
,
file
.
getName
());
if
(
isImageFile
(
file
))
{
BufferedImage
bufferedImage
=
ImageIO
.
read
(
file
);
String
keyName
=
CommConsts
.
UPLOAD_PRE_DIRECTORY
+
CommonUtils
.
getUUID
()
+
"_"
+
bufferedImage
.
getWidth
()
+
"x"
+
bufferedImage
.
getHeight
()
+
"."
+
MediaTypeEnum
.
IMAGE_JPG
.
getExt
();
InputStream
imageStream
=
bufferedImageToInputStream
(
bufferedImage
,
MediaTypeEnum
.
IMAGE_JPG
.
getExt
());
qiniuStorage
.
store
(
imageStream
,
1
,
MediaTypeEnum
.
IMAGE_JPG
.
getMime
(),
keyName
);
String
imageUrl
=
qiniuStorage
.
generateUrl
(
keyName
);
ImageCatelogDetail
imageCatelogDetail
=
new
ImageCatelogDetail
();
imageCatelogDetail
.
setImgUrl
(
imageUrl
);
imageCatelogDetail
.
setCatalogId
(
CATELOG_ID
);
imageCatelogDetail
.
setSort
(
sort
);
imageCatelogDetail
.
setCreateTime
(
new
Date
());
imageCatelogDetailDao
.
insert
(
imageCatelogDetail
);
sort
=
sort
+
1
;
logger
.
info
(
">>>>>>>>>> 文件名称:{}, 上传成功 <<<<<<<<<<<<"
,
file
.
getName
());
}
}
logger
.
info
(
"******************* 文件上传成功 *******************"
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
logger
.
error
(
"上传文件出错 :{}"
,
e
);
}
return
Result
.
success
();
}
public
static
boolean
isImageFile
(
File
file
)
{
String
fileName
=
file
.
getName
().
toLowerCase
();
return
fileName
.
endsWith
(
".png"
)
||
fileName
.
endsWith
(
".jpg"
)
||
fileName
.
endsWith
(
".jpeg"
)
||
fileName
.
endsWith
(
".gif"
);
}
}
ch-dao/src/main/java/com/wwdz/ch/db/dao/distribution/ImageCatelogDao.java
0 → 100644
View file @
c3fde926
package
com.wwdz.ch.db.dao.distribution
;
import
com.wwdz.ch.db.domain.distribution.ImageCatelog
;
import
com.wwdz.ch.db.dto.request.distribution.ImageCatelogRequestDto
;
import
java.util.List
;
public
interface
ImageCatelogDao
{
ImageCatelog
findById
(
int
id
);
List
<
ImageCatelog
>
findList
(
ImageCatelogRequestDto
dto
);
}
ch-dao/src/main/java/com/wwdz/ch/db/dao/distribution/ImageCatelogDetailDao.java
0 → 100644
View file @
c3fde926
package
com.wwdz.ch.db.dao.distribution
;
import
com.wwdz.ch.db.domain.distribution.ImageCatelogDetail
;
public
interface
ImageCatelogDetailDao
{
void
insert
(
ImageCatelogDetail
imageCatelogDetail
);
}
ch-dao/src/main/java/com/wwdz/ch/db/domain/distribution/ImageCatelog.java
0 → 100644
View file @
c3fde926
package
com.wwdz.ch.db.domain.distribution
;
import
java.io.Serializable
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Date
;
import
com.xxdxxs.entity.Entity
;
import
lombok.Data
;
/**
* @author shiyu
* @date 2024/05/06
*/
@Data
public
class
ImageCatelog
implements
Entity
{
/**
* id
*/
private
Integer
id
;
/**
* 标题
*/
private
String
title
;
/**
* 名称
*/
private
String
name
;
/**
* 创建时间
*/
private
Date
createTime
;
/**
* 预览图
*/
private
String
preview
;
/**
* 是否有效
*/
private
Boolean
isValid
;
private
static
final
long
serialVersionUID
=
1L
;
@Override
public
String
toString
()
{
StringBuilder
sb
=
new
StringBuilder
();
sb
.
append
(
getClass
().
getSimpleName
());
sb
.
append
(
" ["
);
sb
.
append
(
"Hash = "
).
append
(
hashCode
());
sb
.
append
(
", id="
).
append
(
id
);
sb
.
append
(
", title="
).
append
(
title
);
sb
.
append
(
", name="
).
append
(
name
);
sb
.
append
(
", createTime="
).
append
(
createTime
);
sb
.
append
(
", preview="
).
append
(
preview
);
sb
.
append
(
", isValid="
).
append
(
isValid
);
sb
.
append
(
", serialVersionUID="
).
append
(
serialVersionUID
);
sb
.
append
(
"]"
);
return
sb
.
toString
();
}
@Override
public
boolean
equals
(
Object
that
)
{
if
(
this
==
that
)
{
return
true
;
}
if
(
that
==
null
)
{
return
false
;
}
if
(
getClass
()
!=
that
.
getClass
())
{
return
false
;
}
ImageCatelog
other
=
(
ImageCatelog
)
that
;
return
(
this
.
getId
()
==
null
?
other
.
getId
()
==
null
:
this
.
getId
().
equals
(
other
.
getId
()))
&&
(
this
.
getTitle
()
==
null
?
other
.
getTitle
()
==
null
:
this
.
getTitle
().
equals
(
other
.
getTitle
()))
&&
(
this
.
getName
()
==
null
?
other
.
getName
()
==
null
:
this
.
getName
().
equals
(
other
.
getName
()))
&&
(
this
.
getCreateTime
()
==
null
?
other
.
getCreateTime
()
==
null
:
this
.
getCreateTime
().
equals
(
other
.
getCreateTime
()))
&&
(
this
.
getPreview
()
==
null
?
other
.
getPreview
()
==
null
:
this
.
getPreview
().
equals
(
other
.
getPreview
()))
&&
(
this
.
getIsValid
()
==
null
?
other
.
getIsValid
()
==
null
:
this
.
getIsValid
().
equals
(
other
.
getIsValid
()));
}
@Override
public
int
hashCode
()
{
final
int
prime
=
31
;
int
result
=
1
;
result
=
prime
*
result
+
((
getId
()
==
null
)
?
0
:
getId
().
hashCode
());
result
=
prime
*
result
+
((
getTitle
()
==
null
)
?
0
:
getTitle
().
hashCode
());
result
=
prime
*
result
+
((
getName
()
==
null
)
?
0
:
getName
().
hashCode
());
result
=
prime
*
result
+
((
getCreateTime
()
==
null
)
?
0
:
getCreateTime
().
hashCode
());
result
=
prime
*
result
+
((
getPreview
()
==
null
)
?
0
:
getPreview
().
hashCode
());
result
=
prime
*
result
+
((
getIsValid
()
==
null
)
?
0
:
getIsValid
().
hashCode
());
return
result
;
}
/**
* This enum was generated by MyBatis Generator.
* This enum corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
enum
Column
{
id
(
"id"
,
"id"
,
"INTEGER"
,
false
),
title
(
"title"
,
"title"
,
"VARCHAR"
,
false
),
name
(
"name"
,
"name"
,
"VARCHAR"
,
true
),
createTime
(
"create_time"
,
"createTime"
,
"TIMESTAMP"
,
false
),
preview
(
"preview"
,
"preview"
,
"VARCHAR"
,
false
),
isValid
(
"is_valid"
,
"isValid"
,
"BIT"
,
false
);
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private
static
final
String
BEGINNING_DELIMITER
=
"`"
;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private
static
final
String
ENDING_DELIMITER
=
"`"
;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private
final
String
column
;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private
final
boolean
isColumnNameDelimited
;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private
final
String
javaProperty
;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private
final
String
jdbcType
;
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
String
value
()
{
return
this
.
column
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
String
getValue
()
{
return
this
.
column
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
String
getJavaProperty
()
{
return
this
.
javaProperty
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
String
getJdbcType
()
{
return
this
.
jdbcType
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
Column
(
String
column
,
String
javaProperty
,
String
jdbcType
,
boolean
isColumnNameDelimited
)
{
this
.
column
=
column
;
this
.
javaProperty
=
javaProperty
;
this
.
jdbcType
=
jdbcType
;
this
.
isColumnNameDelimited
=
isColumnNameDelimited
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
String
desc
()
{
return
this
.
getEscapedColumnName
()
+
" DESC"
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
String
asc
()
{
return
this
.
getEscapedColumnName
()
+
" ASC"
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
static
Column
[]
excludes
(
Column
...
excludes
)
{
ArrayList
<
Column
>
columns
=
new
ArrayList
<>(
Arrays
.
asList
(
Column
.
values
()));
if
(
excludes
!=
null
&&
excludes
.
length
>
0
)
{
columns
.
removeAll
(
new
ArrayList
<>(
Arrays
.
asList
(
excludes
)));
}
return
columns
.
toArray
(
new
Column
[]{});
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
String
getEscapedColumnName
()
{
if
(
this
.
isColumnNameDelimited
)
{
return
new
StringBuilder
().
append
(
BEGINNING_DELIMITER
).
append
(
this
.
column
).
append
(
ENDING_DELIMITER
).
toString
();
}
else
{
return
this
.
column
;
}
}
}
}
\ No newline at end of file
ch-dao/src/main/java/com/wwdz/ch/db/domain/distribution/ImageCatelogDetail.java
0 → 100644
View file @
c3fde926
package
com.wwdz.ch.db.domain.distribution
;
import
java.io.Serializable
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Date
;
import
com.xxdxxs.entity.Entity
;
import
lombok.Data
;
/**
* @author shiyu
* @date 2024/05/06
*/
@Data
public
class
ImageCatelogDetail
implements
Entity
{
private
Integer
id
;
/**
* 图片地址
*/
private
String
imgUrl
;
/**
* 顺序
*/
private
Integer
sort
;
/**
* 创建时间
*/
private
Date
createTime
;
/**
* 图录id
*/
private
Integer
catalogId
;
private
static
final
long
serialVersionUID
=
1L
;
@Override
public
String
toString
()
{
StringBuilder
sb
=
new
StringBuilder
();
sb
.
append
(
getClass
().
getSimpleName
());
sb
.
append
(
" ["
);
sb
.
append
(
"Hash = "
).
append
(
hashCode
());
sb
.
append
(
", id="
).
append
(
id
);
sb
.
append
(
", imgUrl="
).
append
(
imgUrl
);
sb
.
append
(
", sort="
).
append
(
sort
);
sb
.
append
(
", createTime="
).
append
(
createTime
);
sb
.
append
(
", catalogId="
).
append
(
catalogId
);
sb
.
append
(
", serialVersionUID="
).
append
(
serialVersionUID
);
sb
.
append
(
"]"
);
return
sb
.
toString
();
}
@Override
public
boolean
equals
(
Object
that
)
{
if
(
this
==
that
)
{
return
true
;
}
if
(
that
==
null
)
{
return
false
;
}
if
(
getClass
()
!=
that
.
getClass
())
{
return
false
;
}
ImageCatelogDetail
other
=
(
ImageCatelogDetail
)
that
;
return
(
this
.
getId
()
==
null
?
other
.
getId
()
==
null
:
this
.
getId
().
equals
(
other
.
getId
()))
&&
(
this
.
getImgUrl
()
==
null
?
other
.
getImgUrl
()
==
null
:
this
.
getImgUrl
().
equals
(
other
.
getImgUrl
()))
&&
(
this
.
getSort
()
==
null
?
other
.
getSort
()
==
null
:
this
.
getSort
().
equals
(
other
.
getSort
()))
&&
(
this
.
getCreateTime
()
==
null
?
other
.
getCreateTime
()
==
null
:
this
.
getCreateTime
().
equals
(
other
.
getCreateTime
()))
&&
(
this
.
getCatalogId
()
==
null
?
other
.
getCatalogId
()
==
null
:
this
.
getCatalogId
().
equals
(
other
.
getCatalogId
()));
}
@Override
public
int
hashCode
()
{
final
int
prime
=
31
;
int
result
=
1
;
result
=
prime
*
result
+
((
getId
()
==
null
)
?
0
:
getId
().
hashCode
());
result
=
prime
*
result
+
((
getImgUrl
()
==
null
)
?
0
:
getImgUrl
().
hashCode
());
result
=
prime
*
result
+
((
getSort
()
==
null
)
?
0
:
getSort
().
hashCode
());
result
=
prime
*
result
+
((
getCreateTime
()
==
null
)
?
0
:
getCreateTime
().
hashCode
());
result
=
prime
*
result
+
((
getCatalogId
()
==
null
)
?
0
:
getCatalogId
().
hashCode
());
return
result
;
}
/**
* This enum was generated by MyBatis Generator.
* This enum corresponds to the database table image_catelog_detail
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
enum
Column
{
id
(
"id"
,
"id"
,
"INTEGER"
,
false
),
imgUrl
(
"img_url"
,
"imgUrl"
,
"VARCHAR"
,
false
),
sort
(
"sort"
,
"sort"
,
"INTEGER"
,
false
),
createTime
(
"create_time"
,
"createTime"
,
"TIMESTAMP"
,
false
),
catalogId
(
"catalog_id"
,
"catalogId"
,
"INTEGER"
,
false
);
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table image_catelog_detail
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private
static
final
String
BEGINNING_DELIMITER
=
"`"
;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table image_catelog_detail
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private
static
final
String
ENDING_DELIMITER
=
"`"
;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table image_catelog_detail
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private
final
String
column
;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table image_catelog_detail
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private
final
boolean
isColumnNameDelimited
;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table image_catelog_detail
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private
final
String
javaProperty
;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table image_catelog_detail
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private
final
String
jdbcType
;
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog_detail
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
String
value
()
{
return
this
.
column
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog_detail
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
String
getValue
()
{
return
this
.
column
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog_detail
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
String
getJavaProperty
()
{
return
this
.
javaProperty
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog_detail
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
String
getJdbcType
()
{
return
this
.
jdbcType
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog_detail
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
Column
(
String
column
,
String
javaProperty
,
String
jdbcType
,
boolean
isColumnNameDelimited
)
{
this
.
column
=
column
;
this
.
javaProperty
=
javaProperty
;
this
.
jdbcType
=
jdbcType
;
this
.
isColumnNameDelimited
=
isColumnNameDelimited
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog_detail
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
String
desc
()
{
return
this
.
getEscapedColumnName
()
+
" DESC"
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog_detail
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
String
asc
()
{
return
this
.
getEscapedColumnName
()
+
" ASC"
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog_detail
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
static
Column
[]
excludes
(
Column
...
excludes
)
{
ArrayList
<
Column
>
columns
=
new
ArrayList
<>(
Arrays
.
asList
(
Column
.
values
()));
if
(
excludes
!=
null
&&
excludes
.
length
>
0
)
{
columns
.
removeAll
(
new
ArrayList
<>(
Arrays
.
asList
(
excludes
)));
}
return
columns
.
toArray
(
new
Column
[]{});
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog_detail
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
String
getEscapedColumnName
()
{
if
(
this
.
isColumnNameDelimited
)
{
return
new
StringBuilder
().
append
(
BEGINNING_DELIMITER
).
append
(
this
.
column
).
append
(
ENDING_DELIMITER
).
toString
();
}
else
{
return
this
.
column
;
}
}
}
}
\ No newline at end of file
ch-dao/src/main/java/com/wwdz/ch/db/domain/distribution/ImageCatelogDetailExample.java
0 → 100644
View file @
c3fde926
This diff is collapsed.
Click to expand it.
ch-dao/src/main/java/com/wwdz/ch/db/domain/distribution/ImageCatelogExample.java
0 → 100644
View file @
c3fde926
This diff is collapsed.
Click to expand it.
ch-dao/src/main/java/com/wwdz/ch/db/dto/request/distribution/ImageCatelogRequestDto.java
0 → 100644
View file @
c3fde926
package
com.wwdz.ch.db.dto.request.distribution
;
import
com.wwdz.ch.db.dto.request.BaseRequestDto
;
import
com.xxdxxs.entity.Entity
;
import
lombok.Data
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Date
;
/**
* @author shiyu
* @date 2024/05/06
*/
@Data
public
class
ImageCatelogRequestDto
extends
BaseRequestDto
implements
Entity
{
/**
* id
*/
private
Integer
id
;
/**
* 标题
*/
private
String
title
;
/**
* 名称
*/
private
String
name
;
/**
* 创建时间
*/
private
Date
createTime
;
/**
* 预览图
*/
private
String
preview
;
/**
* 是否有效
*/
private
Boolean
isValid
;
private
static
final
long
serialVersionUID
=
1L
;
@Override
public
String
toString
()
{
StringBuilder
sb
=
new
StringBuilder
();
sb
.
append
(
getClass
().
getSimpleName
());
sb
.
append
(
" ["
);
sb
.
append
(
"Hash = "
).
append
(
hashCode
());
sb
.
append
(
", id="
).
append
(
id
);
sb
.
append
(
", title="
).
append
(
title
);
sb
.
append
(
", name="
).
append
(
name
);
sb
.
append
(
", createTime="
).
append
(
createTime
);
sb
.
append
(
", preview="
).
append
(
preview
);
sb
.
append
(
", isValid="
).
append
(
isValid
);
sb
.
append
(
", serialVersionUID="
).
append
(
serialVersionUID
);
sb
.
append
(
"]"
);
return
sb
.
toString
();
}
@Override
public
boolean
equals
(
Object
that
)
{
if
(
this
==
that
)
{
return
true
;
}
if
(
that
==
null
)
{
return
false
;
}
if
(
getClass
()
!=
that
.
getClass
())
{
return
false
;
}
ImageCatelogRequestDto
other
=
(
ImageCatelogRequestDto
)
that
;
return
(
this
.
getId
()
==
null
?
other
.
getId
()
==
null
:
this
.
getId
().
equals
(
other
.
getId
()))
&&
(
this
.
getTitle
()
==
null
?
other
.
getTitle
()
==
null
:
this
.
getTitle
().
equals
(
other
.
getTitle
()))
&&
(
this
.
getName
()
==
null
?
other
.
getName
()
==
null
:
this
.
getName
().
equals
(
other
.
getName
()))
&&
(
this
.
getCreateTime
()
==
null
?
other
.
getCreateTime
()
==
null
:
this
.
getCreateTime
().
equals
(
other
.
getCreateTime
()))
&&
(
this
.
getPreview
()
==
null
?
other
.
getPreview
()
==
null
:
this
.
getPreview
().
equals
(
other
.
getPreview
()))
&&
(
this
.
getIsValid
()
==
null
?
other
.
getIsValid
()
==
null
:
this
.
getIsValid
().
equals
(
other
.
getIsValid
()));
}
@Override
public
int
hashCode
()
{
final
int
prime
=
31
;
int
result
=
1
;
result
=
prime
*
result
+
((
getId
()
==
null
)
?
0
:
getId
().
hashCode
());
result
=
prime
*
result
+
((
getTitle
()
==
null
)
?
0
:
getTitle
().
hashCode
());
result
=
prime
*
result
+
((
getName
()
==
null
)
?
0
:
getName
().
hashCode
());
result
=
prime
*
result
+
((
getCreateTime
()
==
null
)
?
0
:
getCreateTime
().
hashCode
());
result
=
prime
*
result
+
((
getPreview
()
==
null
)
?
0
:
getPreview
().
hashCode
());
result
=
prime
*
result
+
((
getIsValid
()
==
null
)
?
0
:
getIsValid
().
hashCode
());
return
result
;
}
/**
* This enum was generated by MyBatis Generator.
* This enum corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
enum
Column
{
id
(
"id"
,
"id"
,
"INTEGER"
,
false
),
title
(
"title"
,
"title"
,
"VARCHAR"
,
false
),
name
(
"name"
,
"name"
,
"VARCHAR"
,
true
),
createTime
(
"create_time"
,
"createTime"
,
"TIMESTAMP"
,
false
),
preview
(
"preview"
,
"preview"
,
"VARCHAR"
,
false
),
isValid
(
"is_valid"
,
"isValid"
,
"BIT"
,
false
);
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private
static
final
String
BEGINNING_DELIMITER
=
"`"
;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private
static
final
String
ENDING_DELIMITER
=
"`"
;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private
final
String
column
;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private
final
boolean
isColumnNameDelimited
;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private
final
String
javaProperty
;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private
final
String
jdbcType
;
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
String
value
()
{
return
this
.
column
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
String
getValue
()
{
return
this
.
column
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
String
getJavaProperty
()
{
return
this
.
javaProperty
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
String
getJdbcType
()
{
return
this
.
jdbcType
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
Column
(
String
column
,
String
javaProperty
,
String
jdbcType
,
boolean
isColumnNameDelimited
)
{
this
.
column
=
column
;
this
.
javaProperty
=
javaProperty
;
this
.
jdbcType
=
jdbcType
;
this
.
isColumnNameDelimited
=
isColumnNameDelimited
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
String
desc
()
{
return
this
.
getEscapedColumnName
()
+
" DESC"
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
String
asc
()
{
return
this
.
getEscapedColumnName
()
+
" ASC"
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
static
Column
[]
excludes
(
Column
...
excludes
)
{
ArrayList
<
Column
>
columns
=
new
ArrayList
<>(
Arrays
.
asList
(
Column
.
values
()));
if
(
excludes
!=
null
&&
excludes
.
length
>
0
)
{
columns
.
removeAll
(
new
ArrayList
<>(
Arrays
.
asList
(
excludes
)));
}
return
columns
.
toArray
(
new
Column
[]{});
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
String
getEscapedColumnName
()
{
if
(
this
.
isColumnNameDelimited
)
{
return
new
StringBuilder
().
append
(
BEGINNING_DELIMITER
).
append
(
this
.
column
).
append
(
ENDING_DELIMITER
).
toString
();
}
else
{
return
this
.
column
;
}
}
}
}
\ No newline at end of file
ch-dao/src/main/java/com/wwdz/ch/db/impl/distribution/ImageCatelogDaoImpl.java
0 → 100644
View file @
c3fde926
package
com.wwdz.ch.db.impl.distribution
;
import
com.github.pagehelper.PageHelper
;
import
com.wwdz.ch.db.dao.distribution.ImageCatelogDao
;
import
com.wwdz.ch.db.domain.distribution.ImageCatelog
;
import
com.wwdz.ch.db.domain.distribution.ImageCatelogExample
;
import
com.wwdz.ch.db.dto.request.distribution.ImageCatelogRequestDto
;
import
com.wwdz.ch.db.mapper.distribution.ImageCatelogMapper
;
import
com.xxdxxs.db.component.JdbcHelper
;
import
com.xxdxxs.utils.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Repository
;
import
java.util.List
;
@Repository
public
class
ImageCatelogDaoImpl
implements
ImageCatelogDao
{
@Autowired
ImageCatelogMapper
imageCatelogMapper
;
@Override
public
ImageCatelog
findById
(
int
id
)
{
ImageCatelogExample
example
=
new
ImageCatelogExample
();
ImageCatelogExample
.
Criteria
criteria
=
example
.
createCriteria
();
criteria
.
andIdEqualTo
(
id
);
criteria
.
andIsValidEqualTo
(
true
);
return
imageCatelogMapper
.
selectByPrimaryKey
(
id
);
}
@Override
public
List
<
ImageCatelog
>
findList
(
ImageCatelogRequestDto
dto
)
{
ImageCatelogExample
example
=
new
ImageCatelogExample
();
ImageCatelogExample
.
Criteria
criteria
=
example
.
createCriteria
();
if
(
StringUtils
.
hasLength
(
dto
.
getName
()))
{
criteria
.
andNameLike
(
"%"
+
dto
.
getName
()
+
"%"
);
}
if
(
StringUtils
.
hasLength
(
dto
.
getTitle
()))
{
criteria
.
andTitleLike
(
"%"
+
dto
.
getTitle
()
+
"%"
);
}
JdbcHelper
.
ifPresent
(
dto
.
getId
(),
criteria:
:
andIdEqualTo
);
criteria
.
andIsValidEqualTo
(
true
);
example
.
setOrderByClause
(
"create_time desc"
);
PageHelper
.
startPage
(
dto
.
getPage
(),
dto
.
getLimit
());
return
imageCatelogMapper
.
selectByExample
(
example
);
}
}
ch-dao/src/main/java/com/wwdz/ch/db/impl/distribution/ImageCatelogDetailDaoImpl.java
0 → 100644
View file @
c3fde926
package
com.wwdz.ch.db.impl.distribution
;
import
com.wwdz.ch.db.dao.distribution.ImageCatelogDetailDao
;
import
com.wwdz.ch.db.domain.distribution.ImageCatelogDetail
;
import
com.wwdz.ch.db.mapper.distribution.ImageCatelogDetailMapper
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Repository
;
@Repository
public
class
ImageCatelogDetailDaoImpl
implements
ImageCatelogDetailDao
{
@Autowired
ImageCatelogDetailMapper
imageCatelogDetailMapper
;
@Override
public
void
insert
(
ImageCatelogDetail
imageCatelogDetail
)
{
imageCatelogDetailMapper
.
insert
(
imageCatelogDetail
);
}
}
ch-dao/src/main/java/com/wwdz/ch/db/mapper/distribution/ImageCatelogDetailMapper.java
0 → 100644
View file @
c3fde926
package
com.wwdz.ch.db.mapper.distribution
;
import
com.wwdz.ch.db.domain.distribution.ImageCatelogDetail
;
import
com.wwdz.ch.db.domain.distribution.ImageCatelogDetailExample
;
import
java.util.List
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
@Mapper
public
interface
ImageCatelogDetailMapper
{
long
countByExample
(
ImageCatelogDetailExample
example
);
int
deleteByExample
(
ImageCatelogDetailExample
example
);
int
deleteByPrimaryKey
(
Integer
id
);
int
insert
(
ImageCatelogDetail
record
);
int
insertSelective
(
ImageCatelogDetail
record
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog_detail
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
ImageCatelogDetail
selectOneByExample
(
ImageCatelogDetailExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog_detail
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
ImageCatelogDetail
selectOneByExampleSelective
(
@Param
(
"example"
)
ImageCatelogDetailExample
example
,
@Param
(
"selective"
)
ImageCatelogDetail
.
Column
...
selective
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog_detail
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
List
<
ImageCatelogDetail
>
selectByExampleSelective
(
@Param
(
"example"
)
ImageCatelogDetailExample
example
,
@Param
(
"selective"
)
ImageCatelogDetail
.
Column
...
selective
);
List
<
ImageCatelogDetail
>
selectByExample
(
ImageCatelogDetailExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog_detail
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
ImageCatelogDetail
selectByPrimaryKeySelective
(
@Param
(
"id"
)
Integer
id
,
@Param
(
"selective"
)
ImageCatelogDetail
.
Column
...
selective
);
ImageCatelogDetail
selectByPrimaryKey
(
Integer
id
);
int
updateByExampleSelective
(
@Param
(
"record"
)
ImageCatelogDetail
record
,
@Param
(
"example"
)
ImageCatelogDetailExample
example
);
int
updateByExample
(
@Param
(
"record"
)
ImageCatelogDetail
record
,
@Param
(
"example"
)
ImageCatelogDetailExample
example
);
int
updateByPrimaryKeySelective
(
ImageCatelogDetail
record
);
int
updateByPrimaryKey
(
ImageCatelogDetail
record
);
}
\ No newline at end of file
ch-dao/src/main/java/com/wwdz/ch/db/mapper/distribution/ImageCatelogMapper.java
0 → 100644
View file @
c3fde926
package
com.wwdz.ch.db.mapper.distribution
;
import
com.wwdz.ch.db.domain.distribution.ImageCatelog
;
import
com.wwdz.ch.db.domain.distribution.ImageCatelogExample
;
import
java.util.List
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
@Mapper
public
interface
ImageCatelogMapper
{
long
countByExample
(
ImageCatelogExample
example
);
int
deleteByExample
(
ImageCatelogExample
example
);
int
deleteByPrimaryKey
(
Integer
id
);
int
insert
(
ImageCatelog
record
);
int
insertSelective
(
ImageCatelog
record
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
ImageCatelog
selectOneByExample
(
ImageCatelogExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
ImageCatelog
selectOneByExampleSelective
(
@Param
(
"example"
)
ImageCatelogExample
example
,
@Param
(
"selective"
)
ImageCatelog
.
Column
...
selective
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
List
<
ImageCatelog
>
selectByExampleSelective
(
@Param
(
"example"
)
ImageCatelogExample
example
,
@Param
(
"selective"
)
ImageCatelog
.
Column
...
selective
);
List
<
ImageCatelog
>
selectByExample
(
ImageCatelogExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
ImageCatelog
selectByPrimaryKeySelective
(
@Param
(
"id"
)
Integer
id
,
@Param
(
"selective"
)
ImageCatelog
.
Column
...
selective
);
ImageCatelog
selectByPrimaryKey
(
Integer
id
);
int
updateByExampleSelective
(
@Param
(
"record"
)
ImageCatelog
record
,
@Param
(
"example"
)
ImageCatelogExample
example
);
int
updateByExample
(
@Param
(
"record"
)
ImageCatelog
record
,
@Param
(
"example"
)
ImageCatelogExample
example
);
int
updateByPrimaryKeySelective
(
ImageCatelog
record
);
int
updateByPrimaryKey
(
ImageCatelog
record
);
}
\ No newline at end of file
ch-dao/src/main/resources/com/wwdz/ch/db/mapper/distribution/ImageCatelogDetailMapper.xml
0 → 100644
View file @
c3fde926
This diff is collapsed.
Click to expand it.
ch-dao/src/main/resources/com/wwdz/ch/db/mapper/distribution/ImageCatelogMapper.xml
0 → 100644
View file @
c3fde926
This diff is collapsed.
Click to expand it.
ch-dao/src/main/resources/generatorConfig_new.xml
View file @
c3fde926
...
@@ -72,7 +72,7 @@
...
@@ -72,7 +72,7 @@
<javaClientGenerator
type=
"XMLMAPPER"
targetPackage=
"com.wwdz.ch.db.mapper.distribution"
<javaClientGenerator
type=
"XMLMAPPER"
targetPackage=
"com.wwdz.ch.db.mapper.distribution"
targetProject=
"ch-dao/src/main/java"
/>
targetProject=
"ch-dao/src/main/java"
/>
<table
tableName=
"
supplier_item
"
enableCountByExample=
"true"
enableUpdateByExample=
"true"
enableDeleteByExample=
"true"
enableSelectByExample=
"true"
selectByExampleQueryId=
"true"
>
<table
tableName=
"
image_catelog
"
enableCountByExample=
"true"
enableUpdateByExample=
"true"
enableDeleteByExample=
"true"
enableSelectByExample=
"true"
selectByExampleQueryId=
"true"
>
<generatedKey
column=
"id"
sqlStatement=
"Mysql"
identity=
"true"
/>
<generatedKey
column=
"id"
sqlStatement=
"Mysql"
identity=
"true"
/>
</table>
</table>
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/DistributionOrderServiceImpl.java
View file @
c3fde926
...
@@ -4,10 +4,7 @@ import com.github.pagehelper.PageInfo;
...
@@ -4,10 +4,7 @@ import com.github.pagehelper.PageInfo;
import
com.wechat.pay.java.service.refund.model.Refund
;
import
com.wechat.pay.java.service.refund.model.Refund
;
import
com.wechat.pay.java.service.refund.model.Status
;
import
com.wechat.pay.java.service.refund.model.Status
;
import
com.wwdz.ch.core.api.wxpay.WxPayServiceApi
;
import
com.wwdz.ch.core.api.wxpay.WxPayServiceApi
;
import
com.wwdz.ch.core.consts.CommConsts
;
import
com.wwdz.ch.core.consts.*
;
import
com.wwdz.ch.core.consts.DistributionEnum
;
import
com.wwdz.ch.core.consts.LogisticsEnum
;
import
com.wwdz.ch.core.consts.ResultCode
;
import
com.wwdz.ch.core.entity.wxPay.DistributionOrderRefundRequestDto
;
import
com.wwdz.ch.core.entity.wxPay.DistributionOrderRefundRequestDto
;
import
com.wwdz.ch.core.notify.AliSmsSender
;
import
com.wwdz.ch.core.notify.AliSmsSender
;
import
com.wwdz.ch.core.type.PageSearchResult
;
import
com.wwdz.ch.core.type.PageSearchResult
;
...
@@ -1134,7 +1131,7 @@ public class DistributionOrderServiceImpl implements DistributionOrderService {
...
@@ -1134,7 +1131,7 @@ public class DistributionOrderServiceImpl implements DistributionOrderService {
refundOrder
.
setDistributorId
(
distributionOrder
.
getSellerId
());
refundOrder
.
setDistributorId
(
distributionOrder
.
getSellerId
());
refundOrder
.
setCreateTime
(
now
);
refundOrder
.
setCreateTime
(
now
);
refundOrder
.
setUpdateTime
(
now
);
refundOrder
.
setUpdateTime
(
now
);
refundOrder
.
setState
(
DistributionEnum
.
RefundOrder
StateEnum
.
PROCESSING
.
getCode
());
refundOrder
.
setState
(
RefundOrderEnum
.
StateEnum
.
PROCESSING
.
getCode
());
refundOrderDao
.
insert
(
refundOrder
);
refundOrderDao
.
insert
(
refundOrder
);
//退款受理成功,订单的状态改为退款受理中
//退款受理成功,订单的状态改为退款受理中
distributionOrderDao
.
updateState
(
distributionOrderId
,
DistributionEnum
.
DistributionOrderStateEnum
.
REFUNDING
.
getCode
());
distributionOrderDao
.
updateState
(
distributionOrderId
,
DistributionEnum
.
DistributionOrderStateEnum
.
REFUNDING
.
getCode
());
...
...
ch-wx-api/src/test/java/com/wwdz/ch/wx/api/WxPayServiceTest.java
View file @
c3fde926
...
@@ -89,7 +89,7 @@ public class WxPayServiceTest {
...
@@ -89,7 +89,7 @@ public class WxPayServiceTest {
@Test
@Test
public
void
refund
()
{
public
void
refund
()
{
List
<
String
>
list
=
Arrays
.
asList
(
"DA2404
231044297455211
"
);
List
<
String
>
list
=
Arrays
.
asList
(
"DA2404
301433196070258
"
);
list
.
forEach
(
orderId
->{
list
.
forEach
(
orderId
->{
DistributionOrderRequestDto
dto
=
new
DistributionOrderRequestDto
();
DistributionOrderRequestDto
dto
=
new
DistributionOrderRequestDto
();
dto
.
setDistributionOrderId
(
orderId
);
dto
.
setDistributionOrderId
(
orderId
);
...
...
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