Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
Z
zion
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
1
合并请求
1
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
zhengfg
zion
Commits
3d413ebe
提交
3d413ebe
authored
11月 23, 2019
作者:
zgy
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修改优惠券有效时间
上级
7d8251b2
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
13 个修改的文件
包含
943 行增加
和
59 行删除
+943
-59
LoginController.java
...m/diaoyun/zion/chinafrica/controller/LoginController.java
+9
-1
ShopifyController.java
...diaoyun/zion/chinafrica/controller/ShopifyController.java
+19
-2
ShopifyService.java
...a/com/diaoyun/zion/chinafrica/service/ShopifyService.java
+2
-2
ShopifyServiceImpl.java
...oyun/zion/chinafrica/service/impl/ShopifyServiceImpl.java
+55
-14
TbCfUserInfoServiceImpl.java
...zion/chinafrica/service/impl/TbCfUserInfoServiceImpl.java
+2
-2
Image.java
src/main/java/com/diaoyun/zion/chinafrica/vo/Image.java
+116
-0
Images.java
src/main/java/com/diaoyun/zion/chinafrica/vo/Images.java
+116
-0
Options.java
src/main/java/com/diaoyun/zion/chinafrica/vo/Options.java
+63
-0
Products.java
src/main/java/com/diaoyun/zion/chinafrica/vo/Products.java
+172
-0
Variants.java
src/main/java/com/diaoyun/zion/chinafrica/vo/Variants.java
+300
-0
ListUtil.java
src/main/java/com/diaoyun/zion/master/util/ListUtil.java
+32
-0
TbCfCouponDao.xml
src/main/resources/mapper/TbCfCouponDao.xml
+6
-6
PayTest.java
src/test/java/com/diaoyun/zion/PayTest.java
+51
-32
没有找到文件。
src/main/java/com/diaoyun/zion/chinafrica/controller/LoginController.java
浏览文件 @
3d413ebe
...
...
@@ -5,6 +5,7 @@ import com.diaoyun.zion.chinafrica.service.TbCfUserInfoService;
import
com.diaoyun.zion.chinafrica.vo.TbCfUserInfoVo
;
import
com.diaoyun.zion.master.base.BaseController
;
import
com.diaoyun.zion.master.base.Result
;
import
com.diaoyun.zion.master.enums.ResultCodeEnum
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
...
...
@@ -91,9 +92,16 @@ public class LoginController extends BaseController {
@ApiOperation
(
value
=
"校验账户和昵称"
)
@GetMapping
(
"/checkAccount"
)
public
Result
checkUserByNick
(
@ApiParam
(
"用户昵称 url编码"
)
@RequestParam
(
"name"
)
String
name
)
{
Result
result
=
new
Result
();
boolean
b
=
tbCfUserInfoService
.
checkUserByNick
(
name
);
UserInfo
userInfo
=
new
UserInfo
();
userInfo
.
setAvailable
(
b
);
return
new
Result
(
userInfo
);
if
(!
b
)
{
result
.
setCode
(
ResultCodeEnum
.
VALIDATE_ERROR
.
getCode
()).
setMessage
(
"Do not use!"
);
}
else
{
result
.
setCode
(
ResultCodeEnum
.
SUCCESS
.
getCode
()).
setMessage
(
"available!"
);
}
result
.
setData
(
userInfo
);
return
result
;
}
}
src/main/java/com/diaoyun/zion/chinafrica/controller/ShopifyController.java
浏览文件 @
3d413ebe
...
...
@@ -51,10 +51,27 @@ public class ShopifyController {
@ApiOperation
(
value
=
"查询分类商品"
)
@GetMapping
(
"/queryproductsbytype"
)
public
Result
queryProductsByType
(
@ApiParam
(
"商品分类"
)
@RequestParam
(
"product_type"
)
String
product_type
,
@ApiParam
(
"商品ID"
)
@RequestParam
(
value
=
"product_id"
,
required
=
false
)
String
product_id
)
{
@ApiParam
(
"商品ID"
)
@RequestParam
(
value
=
"product_id"
,
required
=
false
)
String
product_id
,
@ApiParam
(
value
=
"页数 默认1"
)
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
,
@ApiParam
(
value
=
"每页大小 默认10"
)
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"10"
)
Integer
pageSize
)
{
return
shopifyService
.
queryProductsByType
(
product_type
,
product_id
);
return
shopifyService
.
queryProductsByType
(
product_type
,
product_id
,
pageNum
,
pageSize
);
}
// /**
// * 查询分类商品
// *
// * @param product_type 商品分类
// * @param product_id 商品ID
// * @return
// */
// @ApiOperation(value = "查询分类商品")
// @GetMapping("/queryproductsbytype")
// public Result queryProductsByType(@ApiParam("商品分类") @RequestParam("product_type") String product_type,
// @ApiParam("商品ID") @RequestParam(value = "product_id", required = false) String product_id
// ) {
//
// return shopifyService.queryProductsByType(product_type, product_id);
// }
/**
* 查看商品详情
...
...
src/main/java/com/diaoyun/zion/chinafrica/service/ShopifyService.java
浏览文件 @
3d413ebe
...
...
@@ -13,8 +13,8 @@ import org.springframework.web.bind.annotation.RequestParam;
public
interface
ShopifyService
{
Result
queryShopifyProducts
();
Result
queryProductsByType
(
String
product_type
,
String
product_id
);
Result
queryProductsByType
(
String
product_type
,
String
product_id
,
Integer
pageNum
,
Integer
pageSize
);
//Result queryProductsByType(String product_type, String product_id);
Result
queryProductsDetails
(
String
product_id
);
Result
queryAllProducts
(
String
product_id
);
...
...
src/main/java/com/diaoyun/zion/chinafrica/service/impl/ShopifyServiceImpl.java
浏览文件 @
3d413ebe
package
com
.
diaoyun
.
zion
.
chinafrica
.
service
.
impl
;
import
com.alibaba.fastjson.JSON
;
import
com.diaoyun.zion.chinafrica.constant.KeyConstant
;
import
com.diaoyun.zion.chinafrica.service.ShopifyService
;
import
com.diaoyun.zion.chinafrica.vo.ShopifyConstant
;
...
...
@@ -7,7 +8,7 @@ import com.diaoyun.zion.master.base.Result;
import
com.diaoyun.zion.master.common.RedisCache
;
import
com.diaoyun.zion.master.enums.ResultCodeEnum
;
import
com.diaoyun.zion.master.util.HttpClientUtil
;
import
net.sf.json.JSON
;
import
com.diaoyun.zion.master.util.ListUtil
;
import
net.sf.json.JSONArray
;
import
net.sf.json.JSONObject
;
import
org.slf4j.Logger
;
...
...
@@ -59,7 +60,7 @@ public class ShopifyServiceImpl implements ShopifyService {
params
.
put
(
"limit"
,
ShopifyConstant
.
SHOPIFY_LIMIT
);
String
data
=
HttpClientUtil
.
createConnection
(
ShopifyConstant
.
productTypeUrl
(),
params
,
"UTF-8"
);
list
.
add
(
data
);
redisCache
.
set
(
KeyConstant
.
SHOPIFY_ITEMS
,
list
,
36
00
);
redisCache
.
set
(
KeyConstant
.
SHOPIFY_ITEMS
,
list
,
864
00
);
}
System
.
out
.
println
(
list
);
JSONArray
jsonArr
=
JSONArray
.
fromObject
(
list
);
...
...
@@ -79,23 +80,31 @@ public class ShopifyServiceImpl implements ShopifyService {
* @return
*/
@Override
public
Result
queryProductsByType
(
String
product_type
,
String
product_id
)
{
public
Result
queryProductsByType
(
String
product_type
,
String
product_id
,
Integer
pageNum
,
Integer
pageSize
)
{
Result
result
=
new
Result
();
String
typeProducts
=
(
String
)
redisCache
.
get
(
KeyConstant
.
SHOPIFY_TYPE_ITEMS
+
product_type
+
product_id
);
if
(
typeProducts
!=
null
)
{
JSONObject
object
=
JSONObject
.
fromObject
(
typeProducts
);
result
.
setData
(
object
);
return
result
;
}
List
list
=
new
ArrayList
(
);
// Object typeProducts = redisCache.get(KeyConstant.SHOPIFY_TYPE_ITEMS + product_type + product_id + pageNum);
// if (typeProducts != null) {
// result.setData(typeProducts
);
//
return result;
//
}
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"product_type"
,
product_type
);
//params.put("limit",
ShopifyConstant.SHOPIFY_PAGE_SIZE
);
//params.put("limit",
"250"
);
params
.
put
(
"since_id"
,
product_id
);
try
{
String
data
=
HttpClientUtil
.
createConnection
(
ShopifyConstant
.
productTypeUrl
(),
params
,
"UTF-8"
);
JSONObject
jsonObject
=
JSONObject
.
fromObject
(
data
);
result
.
setData
(
jsonObject
);
redisCache
.
set
(
KeyConstant
.
SHOPIFY_TYPE_ITEMS
+
product_type
+
product_id
,
data
,
3600
);
JSONArray
products
=
JSONObject
.
fromObject
(
data
).
getJSONArray
(
"products"
);
System
.
out
.
println
(
products
.
size
());
for
(
int
i
=
0
;
i
<
products
.
size
();
i
++)
{
list
.
add
(
products
.
getJSONObject
(
i
));
}
Map
<
String
,
List
<
String
>>
listMap
=
new
HashMap
<>();
List
<
String
>
strings
=
ListUtil
.
pageBySubList
(
list
,
pageNum
,
pageSize
);
listMap
.
put
(
"products"
,
strings
);
System
.
out
.
println
(
"===>>>"
+
strings
.
size
());
result
.
setData
(
JSON
.
toJSON
(
listMap
));
//redisCache.set(KeyConstant.SHOPIFY_TYPE_ITEMS + product_type + product_id + pageNum, JSON.toJSON(listMap), 86400);
}
catch
(
IOException
e
)
{
result
.
setCode
(
ResultCodeEnum
.
QUERY_ERROR
.
getCode
()).
setMessage
(
e
.
getMessage
());
logger
.
error
(
e
.
getMessage
(),
e
);
...
...
@@ -104,6 +113,38 @@ public class ShopifyServiceImpl implements ShopifyService {
return
result
;
}
// /**
// * 查询分类商品
// *
// * @param product_type
// * @return
// */
// @Override
// public Result queryProductsByType(String product_type, String product_id) {
// Result result = new Result();
//// String typeProducts = (String) redisCache.get(KeyConstant.SHOPIFY_TYPE_ITEMS + product_type + product_id);
//// if (typeProducts != null) {
//// JSONObject object = JSONObject.fromObject(typeProducts);
//// result.setData(object);
//// return result;
//// }
// Map<String, Object> params = new HashMap<>();
// params.put("product_type", product_type);
// params.put("limit", ShopifyConstant.SHOPIFY_PAGE_SIZE);
// params.put("since_id", product_id);
// try {
// String data = HttpClientUtil.createConnection(ShopifyConstant.productTypeUrl(), params, "UTF-8");
// JSONObject jsonObject = JSONObject.fromObject(data);
// result.setData(jsonObject);
// redisCache.set(KeyConstant.SHOPIFY_TYPE_ITEMS + product_type + product_id, data, 86400);
// } catch (IOException e) {
// result.setCode(ResultCodeEnum.QUERY_ERROR.getCode()).setMessage(e.getMessage());
// logger.error(e.getMessage(), e);
// return result;
// }
// return result;
// }
/**
* 查看商品详情
*
...
...
@@ -123,7 +164,7 @@ public class ShopifyServiceImpl implements ShopifyService {
params
.
put
(
"ids"
,
product_id
);
String
data
=
HttpClientUtil
.
createConnection
(
ShopifyConstant
.
productTypeUrl
(),
params
,
"UTF-8"
);
jsonProduct
=
JSONObject
.
fromObject
(
data
);
redisCache
.
set
(
KeyConstant
.
SHOPIFY_ITEM
+
product_id
,
data
,
36
00
);
redisCache
.
set
(
KeyConstant
.
SHOPIFY_ITEM
+
product_id
,
data
,
864
00
);
}
result
.
setData
(
jsonProduct
);
}
catch
(
IOException
e
)
{
...
...
src/main/java/com/diaoyun/zion/chinafrica/service/impl/TbCfUserInfoServiceImpl.java
浏览文件 @
3d413ebe
...
...
@@ -182,7 +182,7 @@ public class TbCfUserInfoServiceImpl implements TbCfUserInfoService {
//获取当前时间的时分秒
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd 00:00:00"
);
//设置日期格式
Calendar
c
=
Calendar
.
getInstance
();
c
.
add
(
Calendar
.
DATE
,
+
7
);
c
.
add
(
Calendar
.
DATE
,
+
30
);
Date
time
=
c
.
getTime
();
Date
startDate
=
sdf
.
parse
(
sdf
.
format
(
new
Date
()));
Date
endDate
=
sdf
.
parse
(
sdf
.
format
(
time
));
...
...
@@ -257,7 +257,7 @@ public class TbCfUserInfoServiceImpl implements TbCfUserInfoService {
List
<
TbCfCouponEntity
>
couponVailList
=
tbCfCouponService
.
getCouponAndVaildAll
();
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd 00:00:00"
);
//设置日期格式
Calendar
c
=
Calendar
.
getInstance
();
c
.
add
(
Calendar
.
DATE
,
+
7
);
c
.
add
(
Calendar
.
DATE
,
+
30
);
Date
time
=
c
.
getTime
();
Date
startDate
=
sdf
.
parse
(
sdf
.
format
(
new
Date
()));
Date
endDate
=
sdf
.
parse
(
sdf
.
format
(
time
));
...
...
src/main/java/com/diaoyun/zion/chinafrica/vo/Image.java
0 → 100644
浏览文件 @
3d413ebe
package
com
.
diaoyun
.
zion
.
chinafrica
.
vo
;
import
java.util.List
;
/**
* @Auther: wudepeng
* @Date: 2019/11/23
* @Description:
*/
public
class
Image
{
private
int
id
;
private
int
product_id
;
private
int
position
;
private
String
created_at
;
private
String
updated_at
;
private
String
alt
;
private
int
width
;
private
int
height
;
private
String
src
;
private
List
<
String
>
variant_ids
;
private
String
admin_graphql_api_id
;
public
void
setId
(
int
id
){
this
.
id
=
id
;
}
public
int
getId
(){
return
this
.
id
;
}
public
void
setProduct_id
(
int
product_id
){
this
.
product_id
=
product_id
;
}
public
int
getProduct_id
(){
return
this
.
product_id
;
}
public
void
setPosition
(
int
position
){
this
.
position
=
position
;
}
public
int
getPosition
(){
return
this
.
position
;
}
public
void
setCreated_at
(
String
created_at
){
this
.
created_at
=
created_at
;
}
public
String
getCreated_at
(){
return
this
.
created_at
;
}
public
void
setUpdated_at
(
String
updated_at
){
this
.
updated_at
=
updated_at
;
}
public
String
getUpdated_at
(){
return
this
.
updated_at
;
}
public
void
setAlt
(
String
alt
){
this
.
alt
=
alt
;
}
public
String
getAlt
(){
return
this
.
alt
;
}
public
void
setWidth
(
int
width
){
this
.
width
=
width
;
}
public
int
getWidth
(){
return
this
.
width
;
}
public
void
setHeight
(
int
height
){
this
.
height
=
height
;
}
public
int
getHeight
(){
return
this
.
height
;
}
public
void
setSrc
(
String
src
){
this
.
src
=
src
;
}
public
String
getSrc
(){
return
this
.
src
;
}
public
void
setVariant_ids
(
List
<
String
>
variant_ids
){
this
.
variant_ids
=
variant_ids
;
}
public
List
<
String
>
getVariant_ids
(){
return
this
.
variant_ids
;
}
public
void
setAdmin_graphql_api_id
(
String
admin_graphql_api_id
){
this
.
admin_graphql_api_id
=
admin_graphql_api_id
;
}
public
String
getAdmin_graphql_api_id
(){
return
this
.
admin_graphql_api_id
;
}
@Override
public
String
toString
()
{
return
"Image{"
+
"id="
+
id
+
", product_id="
+
product_id
+
", position="
+
position
+
", created_at='"
+
created_at
+
'\''
+
", updated_at='"
+
updated_at
+
'\''
+
", alt='"
+
alt
+
'\''
+
", width="
+
width
+
", height="
+
height
+
", src='"
+
src
+
'\''
+
", variant_ids="
+
variant_ids
+
", admin_graphql_api_id='"
+
admin_graphql_api_id
+
'\''
+
'}'
;
}
}
src/main/java/com/diaoyun/zion/chinafrica/vo/Images.java
0 → 100644
浏览文件 @
3d413ebe
package
com
.
diaoyun
.
zion
.
chinafrica
.
vo
;
import
java.util.List
;
/**
* @Auther: wudepeng
* @Date: 2019/11/23
* @Description:
*/
public
class
Images
{
private
int
id
;
private
int
product_id
;
private
int
position
;
private
String
created_at
;
private
String
updated_at
;
private
String
alt
;
private
int
width
;
private
int
height
;
private
String
src
;
private
List
<
String
>
variant_ids
;
private
String
admin_graphql_api_id
;
public
void
setId
(
int
id
){
this
.
id
=
id
;
}
public
int
getId
(){
return
this
.
id
;
}
public
void
setProduct_id
(
int
product_id
){
this
.
product_id
=
product_id
;
}
public
int
getProduct_id
(){
return
this
.
product_id
;
}
public
void
setPosition
(
int
position
){
this
.
position
=
position
;
}
public
int
getPosition
(){
return
this
.
position
;
}
public
void
setCreated_at
(
String
created_at
){
this
.
created_at
=
created_at
;
}
public
String
getCreated_at
(){
return
this
.
created_at
;
}
public
void
setUpdated_at
(
String
updated_at
){
this
.
updated_at
=
updated_at
;
}
public
String
getUpdated_at
(){
return
this
.
updated_at
;
}
public
void
setAlt
(
String
alt
){
this
.
alt
=
alt
;
}
public
String
getAlt
(){
return
this
.
alt
;
}
public
void
setWidth
(
int
width
){
this
.
width
=
width
;
}
public
int
getWidth
(){
return
this
.
width
;
}
public
void
setHeight
(
int
height
){
this
.
height
=
height
;
}
public
int
getHeight
(){
return
this
.
height
;
}
public
void
setSrc
(
String
src
){
this
.
src
=
src
;
}
public
String
getSrc
(){
return
this
.
src
;
}
public
void
setVariant_ids
(
List
<
String
>
variant_ids
){
this
.
variant_ids
=
variant_ids
;
}
public
List
<
String
>
getVariant_ids
(){
return
this
.
variant_ids
;
}
public
void
setAdmin_graphql_api_id
(
String
admin_graphql_api_id
){
this
.
admin_graphql_api_id
=
admin_graphql_api_id
;
}
public
String
getAdmin_graphql_api_id
(){
return
this
.
admin_graphql_api_id
;
}
@Override
public
String
toString
()
{
return
"Images{"
+
"id="
+
id
+
", product_id="
+
product_id
+
", position="
+
position
+
", created_at='"
+
created_at
+
'\''
+
", updated_at='"
+
updated_at
+
'\''
+
", alt='"
+
alt
+
'\''
+
", width="
+
width
+
", height="
+
height
+
", src='"
+
src
+
'\''
+
", variant_ids="
+
variant_ids
+
", admin_graphql_api_id='"
+
admin_graphql_api_id
+
'\''
+
'}'
;
}
}
src/main/java/com/diaoyun/zion/chinafrica/vo/Options.java
0 → 100644
浏览文件 @
3d413ebe
package
com
.
diaoyun
.
zion
.
chinafrica
.
vo
;
import
java.util.List
;
/**
* @Auther: wudepeng
* @Date: 2019/11/23
* @Description:
*/
public
class
Options
{
private
int
id
;
private
int
product_id
;
private
String
name
;
private
int
position
;
private
List
<
String
>
values
;
public
void
setId
(
int
id
){
this
.
id
=
id
;
}
public
int
getId
(){
return
this
.
id
;
}
public
void
setProduct_id
(
int
product_id
){
this
.
product_id
=
product_id
;
}
public
int
getProduct_id
(){
return
this
.
product_id
;
}
public
void
setName
(
String
name
){
this
.
name
=
name
;
}
public
String
getName
(){
return
this
.
name
;
}
public
void
setPosition
(
int
position
){
this
.
position
=
position
;
}
public
int
getPosition
(){
return
this
.
position
;
}
public
void
setValues
(
List
<
String
>
values
){
this
.
values
=
values
;
}
public
List
<
String
>
getValues
(){
return
this
.
values
;
}
@Override
public
String
toString
()
{
return
"Options{"
+
"id="
+
id
+
", product_id="
+
product_id
+
", name='"
+
name
+
'\''
+
", position="
+
position
+
", values="
+
values
+
'}'
;
}
}
src/main/java/com/diaoyun/zion/chinafrica/vo/Products.java
0 → 100644
浏览文件 @
3d413ebe
package
com
.
diaoyun
.
zion
.
chinafrica
.
vo
;
import
java.util.List
;
/**
* @Auther: wudepeng
* @Date: 2019/11/23
* @Description:
*/
public
class
Products
{
private
int
id
;
private
String
title
;
private
String
body_html
;
private
String
vendor
;
private
String
product_type
;
private
String
created_at
;
private
String
handle
;
private
String
updated_at
;
private
String
published_at
;
private
String
template_suffix
;
private
String
tags
;
private
String
published_scope
;
private
String
admin_graphql_api_id
;
private
List
<
Variants
>
variants
;
private
List
<
Options
>
options
;
private
List
<
Images
>
images
;
private
Image
image
;
public
void
setId
(
int
id
){
this
.
id
=
id
;
}
public
int
getId
(){
return
this
.
id
;
}
public
void
setTitle
(
String
title
){
this
.
title
=
title
;
}
public
String
getTitle
(){
return
this
.
title
;
}
public
void
setBody_html
(
String
body_html
){
this
.
body_html
=
body_html
;
}
public
String
getBody_html
(){
return
this
.
body_html
;
}
public
void
setVendor
(
String
vendor
){
this
.
vendor
=
vendor
;
}
public
String
getVendor
(){
return
this
.
vendor
;
}
public
void
setProduct_type
(
String
product_type
){
this
.
product_type
=
product_type
;
}
public
String
getProduct_type
(){
return
this
.
product_type
;
}
public
void
setCreated_at
(
String
created_at
){
this
.
created_at
=
created_at
;
}
public
String
getCreated_at
(){
return
this
.
created_at
;
}
public
void
setHandle
(
String
handle
){
this
.
handle
=
handle
;
}
public
String
getHandle
(){
return
this
.
handle
;
}
public
void
setUpdated_at
(
String
updated_at
){
this
.
updated_at
=
updated_at
;
}
public
String
getUpdated_at
(){
return
this
.
updated_at
;
}
public
void
setPublished_at
(
String
published_at
){
this
.
published_at
=
published_at
;
}
public
String
getPublished_at
(){
return
this
.
published_at
;
}
public
void
setTemplate_suffix
(
String
template_suffix
){
this
.
template_suffix
=
template_suffix
;
}
public
String
getTemplate_suffix
(){
return
this
.
template_suffix
;
}
public
void
setTags
(
String
tags
){
this
.
tags
=
tags
;
}
public
String
getTags
(){
return
this
.
tags
;
}
public
void
setPublished_scope
(
String
published_scope
){
this
.
published_scope
=
published_scope
;
}
public
String
getPublished_scope
(){
return
this
.
published_scope
;
}
public
void
setAdmin_graphql_api_id
(
String
admin_graphql_api_id
){
this
.
admin_graphql_api_id
=
admin_graphql_api_id
;
}
public
String
getAdmin_graphql_api_id
(){
return
this
.
admin_graphql_api_id
;
}
public
void
setVariants
(
List
<
Variants
>
variants
){
this
.
variants
=
variants
;
}
public
List
<
Variants
>
getVariants
(){
return
this
.
variants
;
}
public
void
setOptions
(
List
<
Options
>
options
){
this
.
options
=
options
;
}
public
List
<
Options
>
getOptions
(){
return
this
.
options
;
}
public
void
setImages
(
List
<
Images
>
images
){
this
.
images
=
images
;
}
public
List
<
Images
>
getImages
(){
return
this
.
images
;
}
public
void
setImage
(
Image
image
){
this
.
image
=
image
;
}
public
Image
getImage
(){
return
this
.
image
;
}
@Override
public
String
toString
()
{
return
"Products{"
+
"id="
+
id
+
", title='"
+
title
+
'\''
+
", body_html='"
+
body_html
+
'\''
+
", vendor='"
+
vendor
+
'\''
+
", product_type='"
+
product_type
+
'\''
+
", created_at='"
+
created_at
+
'\''
+
", handle='"
+
handle
+
'\''
+
", updated_at='"
+
updated_at
+
'\''
+
", published_at='"
+
published_at
+
'\''
+
", template_suffix='"
+
template_suffix
+
'\''
+
", tags='"
+
tags
+
'\''
+
", published_scope='"
+
published_scope
+
'\''
+
", admin_graphql_api_id='"
+
admin_graphql_api_id
+
'\''
+
", variants="
+
variants
+
", options="
+
options
+
", images="
+
images
+
", image="
+
image
+
'}'
;
}
}
src/main/java/com/diaoyun/zion/chinafrica/vo/Variants.java
0 → 100644
浏览文件 @
3d413ebe
package
com
.
diaoyun
.
zion
.
chinafrica
.
vo
;
/**
* @Auther: wudepeng
* @Date: 2019/11/23
* @Description:
*/
public
class
Variants
{
private
int
id
;
private
int
product_id
;
private
String
title
;
private
String
price
;
private
String
sku
;
private
int
position
;
private
String
inventory_policy
;
private
String
compare_at_price
;
private
String
fulfillment_service
;
private
String
inventory_management
;
private
String
option1
;
private
String
option2
;
private
String
option3
;
private
String
created_at
;
private
String
updated_at
;
private
boolean
taxable
;
private
String
barcode
;
private
int
grams
;
private
String
image_id
;
private
int
weight
;
private
String
weight_unit
;
private
int
inventory_item_id
;
private
int
inventory_quantity
;
private
int
old_inventory_quantity
;
private
boolean
requires_shipping
;
private
String
admin_graphql_api_id
;
public
void
setId
(
int
id
)
{
this
.
id
=
id
;
}
public
int
getId
()
{
return
this
.
id
;
}
public
void
setProduct_id
(
int
product_id
)
{
this
.
product_id
=
product_id
;
}
public
int
getProduct_id
()
{
return
this
.
product_id
;
}
public
void
setTitle
(
String
title
)
{
this
.
title
=
title
;
}
public
String
getTitle
()
{
return
this
.
title
;
}
public
void
setPrice
(
String
price
)
{
this
.
price
=
price
;
}
public
String
getPrice
()
{
return
this
.
price
;
}
public
void
setSku
(
String
sku
)
{
this
.
sku
=
sku
;
}
public
String
getSku
()
{
return
this
.
sku
;
}
public
void
setPosition
(
int
position
)
{
this
.
position
=
position
;
}
public
int
getPosition
()
{
return
this
.
position
;
}
public
void
setInventory_policy
(
String
inventory_policy
)
{
this
.
inventory_policy
=
inventory_policy
;
}
public
String
getInventory_policy
()
{
return
this
.
inventory_policy
;
}
public
void
setCompare_at_price
(
String
compare_at_price
)
{
this
.
compare_at_price
=
compare_at_price
;
}
public
String
getCompare_at_price
()
{
return
this
.
compare_at_price
;
}
public
void
setFulfillment_service
(
String
fulfillment_service
)
{
this
.
fulfillment_service
=
fulfillment_service
;
}
public
String
getFulfillment_service
()
{
return
this
.
fulfillment_service
;
}
public
void
setInventory_management
(
String
inventory_management
)
{
this
.
inventory_management
=
inventory_management
;
}
public
String
getInventory_management
()
{
return
this
.
inventory_management
;
}
public
void
setOption1
(
String
option1
)
{
this
.
option1
=
option1
;
}
public
String
getOption1
()
{
return
this
.
option1
;
}
public
void
setOption2
(
String
option2
)
{
this
.
option2
=
option2
;
}
public
String
getOption2
()
{
return
this
.
option2
;
}
public
void
setOption3
(
String
option3
)
{
this
.
option3
=
option3
;
}
public
String
getOption3
()
{
return
this
.
option3
;
}
public
void
setCreated_at
(
String
created_at
)
{
this
.
created_at
=
created_at
;
}
public
String
getCreated_at
()
{
return
this
.
created_at
;
}
public
void
setUpdated_at
(
String
updated_at
)
{
this
.
updated_at
=
updated_at
;
}
public
String
getUpdated_at
()
{
return
this
.
updated_at
;
}
public
void
setTaxable
(
boolean
taxable
)
{
this
.
taxable
=
taxable
;
}
public
boolean
getTaxable
()
{
return
this
.
taxable
;
}
public
void
setBarcode
(
String
barcode
)
{
this
.
barcode
=
barcode
;
}
public
String
getBarcode
()
{
return
this
.
barcode
;
}
public
void
setGrams
(
int
grams
)
{
this
.
grams
=
grams
;
}
public
int
getGrams
()
{
return
this
.
grams
;
}
public
void
setImage_id
(
String
image_id
)
{
this
.
image_id
=
image_id
;
}
public
String
getImage_id
()
{
return
this
.
image_id
;
}
public
void
setWeight
(
int
weight
)
{
this
.
weight
=
weight
;
}
public
int
getWeight
()
{
return
this
.
weight
;
}
public
void
setWeight_unit
(
String
weight_unit
)
{
this
.
weight_unit
=
weight_unit
;
}
public
String
getWeight_unit
()
{
return
this
.
weight_unit
;
}
public
void
setInventory_item_id
(
int
inventory_item_id
)
{
this
.
inventory_item_id
=
inventory_item_id
;
}
public
int
getInventory_item_id
()
{
return
this
.
inventory_item_id
;
}
public
void
setInventory_quantity
(
int
inventory_quantity
)
{
this
.
inventory_quantity
=
inventory_quantity
;
}
public
int
getInventory_quantity
()
{
return
this
.
inventory_quantity
;
}
public
void
setOld_inventory_quantity
(
int
old_inventory_quantity
)
{
this
.
old_inventory_quantity
=
old_inventory_quantity
;
}
public
int
getOld_inventory_quantity
()
{
return
this
.
old_inventory_quantity
;
}
public
void
setRequires_shipping
(
boolean
requires_shipping
)
{
this
.
requires_shipping
=
requires_shipping
;
}
public
boolean
getRequires_shipping
()
{
return
this
.
requires_shipping
;
}
public
void
setAdmin_graphql_api_id
(
String
admin_graphql_api_id
)
{
this
.
admin_graphql_api_id
=
admin_graphql_api_id
;
}
public
String
getAdmin_graphql_api_id
()
{
return
this
.
admin_graphql_api_id
;
}
@Override
public
String
toString
()
{
return
"Variants{"
+
"id="
+
id
+
", product_id="
+
product_id
+
", title='"
+
title
+
'\''
+
", price='"
+
price
+
'\''
+
", sku='"
+
sku
+
'\''
+
", position="
+
position
+
", inventory_policy='"
+
inventory_policy
+
'\''
+
", compare_at_price='"
+
compare_at_price
+
'\''
+
", fulfillment_service='"
+
fulfillment_service
+
'\''
+
", inventory_management='"
+
inventory_management
+
'\''
+
", option1='"
+
option1
+
'\''
+
", option2='"
+
option2
+
'\''
+
", option3='"
+
option3
+
'\''
+
", created_at='"
+
created_at
+
'\''
+
", updated_at='"
+
updated_at
+
'\''
+
", taxable="
+
taxable
+
", barcode='"
+
barcode
+
'\''
+
", grams="
+
grams
+
", image_id='"
+
image_id
+
'\''
+
", weight="
+
weight
+
", weight_unit='"
+
weight_unit
+
'\''
+
", inventory_item_id="
+
inventory_item_id
+
", inventory_quantity="
+
inventory_quantity
+
", old_inventory_quantity="
+
old_inventory_quantity
+
", requires_shipping="
+
requires_shipping
+
", admin_graphql_api_id='"
+
admin_graphql_api_id
+
'\''
+
'}'
;
}
}
src/main/java/com/diaoyun/zion/master/util/ListUtil.java
0 → 100644
浏览文件 @
3d413ebe
package
com
.
diaoyun
.
zion
.
master
.
util
;
import
java.util.List
;
/**
* @Auther: wudepeng
* @Date: 2019/11/23
* @Description:
*/
public
class
ListUtil
{
public
static
List
<
String
>
pageBySubList
(
List
list
,
int
pageNum
,
int
pageSize
)
{
int
totalcount
=
list
.
size
();
int
pagecount
=
0
;
List
<
String
>
subList
;
int
m
=
totalcount
%
pageSize
;
if
(
m
>
0
)
{
pagecount
=
totalcount
/
pageSize
+
1
;
}
else
{
pagecount
=
totalcount
/
pageSize
;
}
if
(
m
==
0
)
{
subList
=
list
.
subList
((
pageNum
-
1
)
*
pageSize
,
pageSize
*
(
pageNum
));
}
else
{
if
(
pageNum
==
pagecount
)
{
subList
=
list
.
subList
((
pageNum
-
1
)
*
pageSize
,
totalcount
);
}
else
{
subList
=
list
.
subList
((
pageNum
-
1
)
*
pageSize
,
pageSize
*
(
pageNum
));
}
}
return
subList
;
}
}
src/main/resources/mapper/TbCfCouponDao.xml
浏览文件 @
3d413ebe
...
...
@@ -279,8 +279,8 @@
t2.used_count,
t2.start_time,
t2.end_time,
t
2.
valid_start_time,
t
2.
valid_end_time,
t
3.start_time
valid_start_time,
t
3.end_time
valid_end_time,
t2.status,
t2.create_user_id,
t2.create_time,
...
...
@@ -315,8 +315,8 @@
t2.used_count,
t2.start_time,
t2.end_time,
t
2.
valid_start_time,
t
2.
valid_end_time,
t
3.start_time
valid_start_time,
t
3.end_time
valid_end_time,
t2.status,
t2.create_user_id,
t2.create_time,
...
...
@@ -344,8 +344,8 @@
t2.used_count,
t2.start_time,
t2.end_time,
t
2.
valid_start_time,
t
2.
valid_end_time,
t
3.start_time
valid_start_time,
t
3.end_time
valid_end_time,
t2.status,
t2.create_user_id,
t2.create_time,
...
...
src/test/java/com/diaoyun/zion/PayTest.java
浏览文件 @
3d413ebe
差异被折叠。
点击展开。
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论