Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
Z
zion
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
1
合并请求
1
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
zhengfg
zion
Commits
a0551f6c
提交
a0551f6c
authored
9月 07, 2019
作者:
zhengfg
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
更新
上级
3ccaa6bf
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
97 个修改的文件
包含
3384 行增加
和
357 行删除
+3384
-357
pom.xml
pom.xml
+13
-0
NetWorkSpider.java
...a/com/diaoyun/zion/chinafrica/bis/impl/NetWorkSpider.java
+1
-1
StripePay.java
.../java/com/diaoyun/zion/chinafrica/bis/impl/StripePay.java
+33
-0
TbItemSpider.java
...va/com/diaoyun/zion/chinafrica/bis/impl/TbItemSpider.java
+13
-11
KeyConstant.java
...ava/com/diaoyun/zion/chinafrica/constant/KeyConstant.java
+9
-0
LoginController.java
...m/diaoyun/zion/chinafrica/controller/LoginController.java
+3
-3
SpiderController.java
.../diaoyun/zion/chinafrica/controller/SpiderController.java
+4
-4
TbCfAddressController.java
...yun/zion/chinafrica/controller/TbCfAddressController.java
+9
-1
TbCfCategoryHsController.java
.../zion/chinafrica/controller/TbCfCategoryHsController.java
+2
-3
TbCfCouponController.java
...oyun/zion/chinafrica/controller/TbCfCouponController.java
+9
-1
TbCfCouponUseController.java
...n/zion/chinafrica/controller/TbCfCouponUseController.java
+4
-4
TbCfExpCatRelController.java
...n/zion/chinafrica/controller/TbCfExpCatRelController.java
+2
-1
TbCfExpressTemplateController.java
.../chinafrica/controller/TbCfExpressTemplateController.java
+1
-1
TbCfFeedbackController.java
...un/zion/chinafrica/controller/TbCfFeedbackController.java
+20
-0
TbCfItemDetailController.java
.../zion/chinafrica/controller/TbCfItemDetailController.java
+11
-2
TbCfOrderController.java
...aoyun/zion/chinafrica/controller/TbCfOrderController.java
+46
-2
TbCfPlatformController.java
...un/zion/chinafrica/controller/TbCfPlatformController.java
+20
-0
TbCfProblemController.java
...yun/zion/chinafrica/controller/TbCfProblemController.java
+21
-0
TbCfStationItemController.java
...zion/chinafrica/controller/TbCfStationItemController.java
+21
-0
TbCfStoreController.java
...aoyun/zion/chinafrica/controller/TbCfStoreController.java
+20
-0
TbCfCartRecordRDao.java
...a/com/diaoyun/zion/chinafrica/dao/TbCfCartRecordRDao.java
+2
-0
TbCfCouponDao.java
...n/java/com/diaoyun/zion/chinafrica/dao/TbCfCouponDao.java
+8
-1
TbCfCouponUseDao.java
...ava/com/diaoyun/zion/chinafrica/dao/TbCfCouponUseDao.java
+2
-2
TbCfFeedbackDao.java
...java/com/diaoyun/zion/chinafrica/dao/TbCfFeedbackDao.java
+14
-0
TbCfItemDetailDao.java
...va/com/diaoyun/zion/chinafrica/dao/TbCfItemDetailDao.java
+8
-0
TbCfItemOrderRDao.java
...va/com/diaoyun/zion/chinafrica/dao/TbCfItemOrderRDao.java
+9
-0
TbCfOrderDao.java
...in/java/com/diaoyun/zion/chinafrica/dao/TbCfOrderDao.java
+17
-0
TbCfPlatformDao.java
...java/com/diaoyun/zion/chinafrica/dao/TbCfPlatformDao.java
+14
-0
TbCfProblemDao.java
.../java/com/diaoyun/zion/chinafrica/dao/TbCfProblemDao.java
+14
-0
TbCfStationItemDao.java
...a/com/diaoyun/zion/chinafrica/dao/TbCfStationItemDao.java
+14
-0
TbCfStoreDao.java
...in/java/com/diaoyun/zion/chinafrica/dao/TbCfStoreDao.java
+14
-0
TbCfTakeCouponDao.java
...va/com/diaoyun/zion/chinafrica/dao/TbCfTakeCouponDao.java
+16
-0
TbCfCouponEntity.java
.../com/diaoyun/zion/chinafrica/entity/TbCfCouponEntity.java
+27
-3
TbCfCouponUseEntity.java
...m/diaoyun/zion/chinafrica/entity/TbCfCouponUseEntity.java
+2
-2
TbCfFeedbackEntity.java
...om/diaoyun/zion/chinafrica/entity/TbCfFeedbackEntity.java
+102
-0
TbCfPlatformEntity.java
...om/diaoyun/zion/chinafrica/entity/TbCfPlatformEntity.java
+153
-0
TbCfProblemEntity.java
...com/diaoyun/zion/chinafrica/entity/TbCfProblemEntity.java
+102
-0
TbCfStationItemEntity.java
...diaoyun/zion/chinafrica/entity/TbCfStationItemEntity.java
+204
-0
TbCfStoreEntity.java
...a/com/diaoyun/zion/chinafrica/entity/TbCfStoreEntity.java
+187
-0
TbCfTakeCouponEntity.java
.../diaoyun/zion/chinafrica/entity/TbCfTakeCouponEntity.java
+12
-0
TbCfCouponUseService.java
...diaoyun/zion/chinafrica/service/TbCfCouponUseService.java
+8
-8
TbCfFeedbackService.java
.../diaoyun/zion/chinafrica/service/TbCfFeedbackService.java
+71
-0
TbCfItemDetailService.java
...iaoyun/zion/chinafrica/service/TbCfItemDetailService.java
+8
-0
TbCfOrderService.java
...com/diaoyun/zion/chinafrica/service/TbCfOrderService.java
+34
-0
TbCfPlatformService.java
.../diaoyun/zion/chinafrica/service/TbCfPlatformService.java
+71
-0
TbCfProblemService.java
...m/diaoyun/zion/chinafrica/service/TbCfProblemService.java
+71
-0
TbCfStationItemService.java
...aoyun/zion/chinafrica/service/TbCfStationItemService.java
+71
-0
TbCfStoreService.java
...com/diaoyun/zion/chinafrica/service/TbCfStoreService.java
+71
-0
SpiderServiceImpl.java
...aoyun/zion/chinafrica/service/impl/SpiderServiceImpl.java
+2
-1
TbCfAddressServiceImpl.java
.../zion/chinafrica/service/impl/TbCfAddressServiceImpl.java
+1
-1
TbCfCouponServiceImpl.java
...n/zion/chinafrica/service/impl/TbCfCouponServiceImpl.java
+63
-25
TbCfCouponUseServiceImpl.java
...ion/chinafrica/service/impl/TbCfCouponUseServiceImpl.java
+58
-0
TbCfFeedbackServiceImpl.java
...zion/chinafrica/service/impl/TbCfFeedbackServiceImpl.java
+59
-0
TbCfItemDetailServiceImpl.java
...on/chinafrica/service/impl/TbCfItemDetailServiceImpl.java
+10
-0
TbCfOrderServiceImpl.java
...un/zion/chinafrica/service/impl/TbCfOrderServiceImpl.java
+314
-17
TbCfPlatformServiceImpl.java
...zion/chinafrica/service/impl/TbCfPlatformServiceImpl.java
+59
-0
TbCfProblemServiceImpl.java
.../zion/chinafrica/service/impl/TbCfProblemServiceImpl.java
+59
-0
TbCfStationItemServiceImpl.java
...n/chinafrica/service/impl/TbCfStationItemServiceImpl.java
+59
-0
TbCfStoreServiceImpl.java
...un/zion/chinafrica/service/impl/TbCfStoreServiceImpl.java
+58
-0
TbCfUserInfoServiceImpl.java
...zion/chinafrica/service/impl/TbCfUserInfoServiceImpl.java
+9
-0
DetailParamVo.java
...in/java/com/diaoyun/zion/chinafrica/vo/DetailParamVo.java
+23
-0
TbCfAddressVo.java
...in/java/com/diaoyun/zion/chinafrica/vo/TbCfAddressVo.java
+19
-0
TbCfCartItemDetailVo.java
.../com/diaoyun/zion/chinafrica/vo/TbCfCartItemDetailVo.java
+36
-0
TbCfItemDetailVo.java
...java/com/diaoyun/zion/chinafrica/vo/TbCfItemDetailVo.java
+19
-1
TbCfOrderVo.java
...main/java/com/diaoyun/zion/chinafrica/vo/TbCfOrderVo.java
+33
-0
TbCfUserInfoVo.java
...n/java/com/diaoyun/zion/chinafrica/vo/TbCfUserInfoVo.java
+27
-1
LocalTokenManager.java
...ava/com/diaoyun/zion/master/common/LocalTokenManager.java
+1
-1
RedisTokenManager.java
...ava/com/diaoyun/zion/master/common/RedisTokenManager.java
+1
-1
RedisConfig.java
...main/java/com/diaoyun/zion/master/config/RedisConfig.java
+14
-0
RedisKeyExpirationListener.java
...oyun/zion/master/listener/RedisKeyExpirationListener.java
+40
-0
TranslateCallable.java
...ava/com/diaoyun/zion/master/thread/TranslateCallable.java
+1
-1
WordposCallable.java
.../java/com/diaoyun/zion/master/thread/WordposCallable.java
+1
-2
AESUtils.java
src/main/java/com/diaoyun/zion/master/util/AESUtils.java
+69
-0
EmailHelper.java
src/main/java/com/diaoyun/zion/master/util/EmailHelper.java
+1
-1
PasswordProvider.java
...n/java/com/diaoyun/zion/master/util/PasswordProvider.java
+2
-2
application.yml
src/main/resources/application.yml
+14
-7
logback-spring.xml
src/main/resources/logback-spring.xml
+5
-5
TbCfCouponDao.xml
src/main/resources/mapper/TbCfCouponDao.xml
+6
-2
TbCfFeedbackDao.xml
src/main/resources/mapper/TbCfFeedbackDao.xml
+95
-0
TbCfItemDetailDao.xml
src/main/resources/mapper/TbCfItemDetailDao.xml
+5
-0
TbCfItemOrderRDao.xml
src/main/resources/mapper/TbCfItemOrderRDao.xml
+19
-0
TbCfOrderDao.xml
src/main/resources/mapper/TbCfOrderDao.xml
+11
-0
TbCfPlatformDao.xml
src/main/resources/mapper/TbCfPlatformDao.xml
+113
-0
TbCfProblemDao.xml
src/main/resources/mapper/TbCfProblemDao.xml
+95
-0
TbCfStationItemDao.xml
src/main/resources/mapper/TbCfStationItemDao.xml
+131
-0
TbCfStoreDao.xml
src/main/resources/mapper/TbCfStoreDao.xml
+125
-0
TbCfTakeCouponDao.xml
src/main/resources/mapper/TbCfTakeCouponDao.xml
+28
-11
TbCfUseCouponDao.xml
src/main/resources/mapper/TbCfUseCouponDao.xml
+13
-13
domain.properties
src/main/resources/properties/domain.properties
+10
-4
test.js
src/main/resources/templates/test.js
+0
-94
一种规格TM.html
src/main/resources/templates/一种规格TM.html
+0
-70
只有一种规格的tb.html
src/main/resources/templates/只有一种规格的tb.html
+0
-2
多种规格的tb.html
src/main/resources/templates/多种规格的tb.html
+0
-0
多规格TM.html
src/main/resources/templates/多规格TM.html
+0
-7
没有规格.html
src/main/resources/templates/没有规格.html
+0
-0
没有规格的tb.html
src/main/resources/templates/没有规格的tb.html
+0
-0
ZionApplicationTests.java
src/test/java/com/diaoyun/zion/ZionApplicationTests.java
+88
-38
没有找到文件。
pom.xml
浏览文件 @
a0551f6c
...
...
@@ -193,6 +193,19 @@
<artifactId>
spring-boot-starter-data-redis
</artifactId>
</dependency>
<!-- https://mvnrepository.com/artifact/com.github.pagehelper/pagehelper-spring-boot-starter -->
<dependency>
<groupId>
com.github.pagehelper
</groupId>
<artifactId>
pagehelper-spring-boot-starter
</artifactId>
<version>
1.2.10
</version>
</dependency>
<!--stripe-->
<dependency>
<groupId>
com.stripe
</groupId>
<artifactId>
stripe-java
</artifactId>
<version>
11.6.1
</version>
</dependency>
</dependencies>
...
...
src/main/java/com/diaoyun/zion/chinafrica/bis/impl/NetWorkSpider.java
浏览文件 @
a0551f6c
...
...
@@ -19,7 +19,7 @@ public class NetWorkSpider {
// FOREXAUDUSD,FOREXGBPJPY,FOREXXAUUSD&column=Price,Code,Name,UpdownRate,PriceWeight'
private
static
final
String
exchangeRateUrl
=
"http://webforex.hermes.hexun.com/forex/quotelist?"
;
// TODO 调用和讯网的汇率接口
/**
* 从和讯网获取汇率
...
...
src/main/java/com/diaoyun/zion/chinafrica/bis/impl/StripePay.java
0 → 100644
浏览文件 @
a0551f6c
package
com
.
diaoyun
.
zion
.
chinafrica
.
bis
.
impl
;
import
com.stripe.Stripe
;
import
com.stripe.exception.StripeException
;
import
com.stripe.model.Charge
;
import
java.util.HashMap
;
import
java.util.Map
;
/**
* stripe支付相关方法
*/
public
class
StripePay
{
/**
* 发起支付,默认使用美元支付
* @param amount 货币的最小单位,比如美元,传入1000,就是1000美分,10美元
* @param sk
* @param token
* @return
*/
public
static
Charge
createCharge
(
Integer
amount
,
String
sk
,
String
token
)
throws
StripeException
{
Stripe
.
apiKey
=
sk
;
Map
<
String
,
Object
>
chargeParams
=
new
HashMap
<
String
,
Object
>();
chargeParams
.
put
(
"amount"
,
amount
);
chargeParams
.
put
(
"currency"
,
"usd"
);
// 会出现在付款后页面
// chargeParams.put("description", "Charge for jenny.rosen@example.com");
chargeParams
.
put
(
"source"
,
token
);
Charge
charge
=
Charge
.
create
(
chargeParams
);
return
charge
;
}
}
src/main/java/com/diaoyun/zion/chinafrica/bis/impl/TbItemSpider.java
浏览文件 @
a0551f6c
...
...
@@ -41,10 +41,11 @@ public class TbItemSpider implements IItemSpider {
//默认20条线程跑翻译
private
final
TaskLimitSemaphore
taskLimitSemaphore
=
new
TaskLimitSemaphore
(
20
);
private
final
List
<
Map
<
String
,
Object
>>
futureList
=
new
ArrayList
<>();
@Override
public
Map
<
String
,
Object
>
captureItem
(
String
targetUrl
)
throws
URISyntaxException
,
IOException
,
ExecutionException
,
InterruptedException
{
List
<
Map
<
String
,
Object
>>
futureList
=
new
ArrayList
<>();
//获取url中的网页内容
String
content
=
HttpClientUtil
.
getContentByUrl
(
targetUrl
);
//获取商品相关信息,比如详情url
...
...
@@ -54,7 +55,7 @@ public class TbItemSpider implements IItemSpider {
Map
<
String
,
Object
>
propMap
=
JsoupUtil
.
getPropMap
(
content
);
//调用腾讯ai,翻译规格
translateProp
(
propMap
);
translateProp
(
futureList
,
propMap
);
/* ****************获取商品详情******************* */
//删除需要登录的模块
...
...
@@ -64,9 +65,7 @@ public class TbItemSpider implements IItemSpider {
String
sibContent
=
HttpClientUtil
.
getContentByUrl
(
usableSibUrl
,
basicHeader
);
//unicode 解码
sibContent
=
StringEscapeUtils
.
unescapeJava
(
sibContent
);
Map
sibMap
=
JSONObject
.
fromObject
(
sibContent
);
sibMap
.
put
(
"Jprop"
,
propMap
);
sibMap
.
put
(
"itemProp"
,
infoMap
);
//logger.info(sibMap.toString());
//从请求结果中获取Cookie,此时的Cookie已经带有登录信息了
//CookieStore store = httpClientContext.getCookieStore();
...
...
@@ -94,6 +93,9 @@ public class TbItemSpider implements IItemSpider {
logger.info("翻译时间(毫秒):"+(d-c));
logger.info("爬取数据总共耗费时间(毫秒):"+(d-a));*/
Map
sibMap
=
JSONObject
.
fromObject
(
sibContent
);
sibMap
.
put
(
"Jprop"
,
propMap
);
sibMap
.
put
(
"itemProp"
,
infoMap
);
return
sibMap
;
}
...
...
@@ -105,18 +107,18 @@ public class TbItemSpider implements IItemSpider {
* @throws ExecutionException
* @throws InterruptedException
*/
private
void
translateProp
(
Map
<
String
,
Object
>
propMap
)
throws
ExecutionException
,
InterruptedException
{
private
void
translateProp
(
List
<
Map
<
String
,
Object
>>
futureList
,
Map
<
String
,
Object
>
propMap
)
throws
ExecutionException
,
InterruptedException
{
/*腾讯翻译*/
for
(
Map
.
Entry
<
String
,
Object
>
entry
:
propMap
.
entrySet
())
{
String
key
=
entry
.
getKey
();
Map
<
String
,
Object
>
value
=
(
Map
<
String
,
Object
>)
entry
.
getValue
();
//翻译属性名
if
(
ValidateUtils
.
isChinese
(
key
))
{
translateText
(
value
,
key
);
translateText
(
futureList
,
value
,
key
);
}
//翻译sku title
if
(
value
!=
null
&&
value
.
size
()>
0
)
{
translateTitle
(
value
);
translateTitle
(
futureList
,
value
);
}
}
}
...
...
@@ -127,7 +129,7 @@ public class TbItemSpider implements IItemSpider {
* @throws ExecutionException
* @throws InterruptedException
*/
private
void
translateTitle
(
Map
<
String
,
Object
>
skuMap
)
throws
ExecutionException
,
InterruptedException
{
private
void
translateTitle
(
List
<
Map
<
String
,
Object
>>
futureList
,
Map
<
String
,
Object
>
skuMap
)
throws
ExecutionException
,
InterruptedException
{
for
(
Map
.
Entry
<
String
,
Object
>
entry
:
skuMap
.
entrySet
())
{
String
key
=
entry
.
getKey
();
if
(
entry
.
getValue
()
instanceof
Map
)
{
...
...
@@ -136,7 +138,7 @@ public class TbItemSpider implements IItemSpider {
if
(
StringUtils
.
isNotBlank
(
title
))
{
//翻译属性名
if
(
ValidateUtils
.
isContainChinese
(
title
))
{
translateText
(
value
,
title
);
translateText
(
futureList
,
value
,
title
);
//value.put("translate", translate);
}
}
...
...
@@ -151,7 +153,7 @@ public class TbItemSpider implements IItemSpider {
* @throws ExecutionException
* @throws InterruptedException
*/
private
void
translateText
(
Map
<
String
,
Object
>
valeMap
,
String
text
)
throws
ExecutionException
,
InterruptedException
{
private
void
translateText
(
List
<
Map
<
String
,
Object
>>
futureList
,
Map
<
String
,
Object
>
valeMap
,
String
text
)
throws
ExecutionException
,
InterruptedException
{
TencentTranslateParam
tencentTranslateParam
=
new
TencentTranslateParam
(
text
);
Future
<
Map
<
String
,
Object
>>
future
=
null
;
try
{
...
...
src/main/java/com/diaoyun/zion/chinafrica/constant/KeyConstant.java
浏览文件 @
a0551f6c
...
...
@@ -4,6 +4,9 @@ package com.diaoyun.zion.chinafrica.constant;
* 各种key
*/
public
class
KeyConstant
{
//AES加密KEY 不能随便更改!!!
public
static
final
String
AES_KEY
=
"``8d47e4d5f4r7d4"
;
//验证码
public
static
String
IDENTIFY_CODE
=
"identifyCode"
;
//登录用户
...
...
@@ -11,5 +14,11 @@ public class KeyConstant {
/**
* 存放在redis的key************************************************
*/
//优惠券
public
final
static
String
COUPON
=
"coupon"
;
/////////////////订单////////////////
//订单过期前缀
public
final
static
String
ORDER_EXP
=
"order_exp"
;
//订单详情前缀
public
final
static
String
ORDER_DET
=
"order_det"
;
}
src/main/java/com/diaoyun/zion/chinafrica/controller/LoginController.java
浏览文件 @
a0551f6c
...
...
@@ -66,7 +66,7 @@ public class LoginController extends BaseController {
@ApiOperation
(
value
=
"注册并登录"
)
@PostMapping
(
value
=
"/register"
)
@ResponseBody
public
Result
registerAndLogin
(
@ApiParam
(
"用户信息"
)
@RequestBody
TbCfUserInfoVo
tbCfUserInfoVo
)
{
public
Result
<
TbCfUserInfoVo
>
registerAndLogin
(
@ApiParam
(
"用户信息"
)
@RequestBody
TbCfUserInfoVo
tbCfUserInfoVo
)
{
Result
result
=
tbCfUserInfoService
.
registerAndLogin
(
tbCfUserInfoVo
);
return
result
;
}
...
...
@@ -90,7 +90,7 @@ public class LoginController extends BaseController {
@ApiOperation
(
"登录"
)
@PostMapping
@ResponseBody
public
Result
login
(
@ApiParam
(
value
=
"登录名"
)
@RequestParam
(
required
=
false
)
String
account
,
public
Result
<
TbCfUserInfoVo
>
login
(
@ApiParam
(
value
=
"登录名"
)
@RequestParam
(
required
=
false
)
String
account
,
@ApiParam
(
value
=
"密码"
)
@RequestParam
(
required
=
false
)
String
password
)
{
Result
result
=
tbCfUserInfoService
.
login
(
getIpAddr
(
request
),
account
,
password
);
return
result
;
...
...
@@ -126,7 +126,7 @@ public class LoginController extends BaseController {
@ApiOperation
(
"第三方登录"
)
@PostMapping
(
"/thirdParty"
)
@ResponseBody
public
Result
loginByThirdParty
(
@ApiParam
(
"第三方账号"
)
@RequestParam
(
required
=
false
)
String
amount
,
public
Result
<
TbCfUserInfoVo
>
loginByThirdParty
(
@ApiParam
(
"第三方账号"
)
@RequestParam
(
required
=
false
)
String
amount
,
@ApiParam
(
"用户昵称 url编码"
)
@RequestParam
(
required
=
false
)
String
nick
,
@ApiParam
(
"账号类型"
)
@RequestParam
(
required
=
false
)
String
userType
)
throws
UnsupportedEncodingException
{
Result
result
=
tbCfUserInfoService
.
loginByThirdParty
(
getIpAddr
(
request
),
amount
,
nick
,
userType
);
...
...
src/main/java/com/diaoyun/zion/chinafrica/controller/SpiderController.java
浏览文件 @
a0551f6c
package
com
.
diaoyun
.
zion
.
chinafrica
.
controller
;
import
com.diaoyun.zion.chinafrica.service.SpiderService
;
import
com.diaoyun.zion.chinafrica.vo.DetailParamVo
;
import
com.diaoyun.zion.master.base.Result
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
...
...
@@ -28,12 +29,11 @@ public class SpiderController {
@Autowired
private
SpiderService
spiderService
;
@ApiOperation
(
"获取
用户所有地址
"
)
@ApiOperation
(
"获取
商品详情
"
)
@GetMapping
(
"/item/detail"
)
@ResponseBody
public
Result
getItemDetail
(
@ApiParam
@RequestBody
Map
<
String
,
String
>
targetMap
)
throws
InterruptedException
,
ExecutionException
,
URISyntaxException
,
IOException
{
String
targetUrl
=
targetMap
.
get
(
"targetUrl"
);
Map
<
String
,
Object
>
itemMap
=
spiderService
.
getItemDetail
(
targetUrl
);
public
Result
getItemDetail
(
@ApiParam
@RequestBody
DetailParamVo
detailParamVo
)
throws
InterruptedException
,
ExecutionException
,
URISyntaxException
,
IOException
{
Map
<
String
,
Object
>
itemMap
=
spiderService
.
getItemDetail
(
detailParamVo
.
getTargetUrl
());
Result
result
=
new
Result
(
itemMap
,
"商品规格信息"
);
return
result
;
}
...
...
src/main/java/com/diaoyun/zion/chinafrica/controller/TbCfAddressController.java
浏览文件 @
a0551f6c
...
...
@@ -27,11 +27,19 @@ public class TbCfAddressController {
@ApiOperation
(
"获取用户所有地址"
)
@GetMapping
@ResponseBody
public
Result
getUserInfoList
()
{
public
Result
<
List
<
TbCfAddressVo
>>
getUserInfoList
()
{
List
<
TbCfAddressVo
>
TbCfAddressVoList
=
tbCfAddressService
.
getUserInfoList
();
return
new
Result
(
TbCfAddressVoList
);
}
@ApiOperation
(
"增加用户地址信息"
)
@PostMapping
@ResponseBody
...
...
src/main/java/com/diaoyun/zion/chinafrica/controller/TbCfCategoryHsController.java
浏览文件 @
a0551f6c
...
...
@@ -35,9 +35,8 @@ public class TbCfCategoryHsController {
@ApiOperation
(
"查看所有列表"
)
@RequestMapping
(
"/queryAll"
)
@ResponseBody
public
Result
queryAll
()
{
Map
<
String
,
Object
>
params
=
null
;
List
<
TbCfCategoryHsEntity
>
list
=
tbCfCategoryHsService
.
queryList
(
params
);
public
Result
<
List
<
TbCfCategoryHsEntity
>>
queryAll
()
{
List
<
TbCfCategoryHsEntity
>
list
=
tbCfCategoryHsService
.
queryList
(
null
);
return
new
Result
().
setData
(
list
);
}
...
...
src/main/java/com/diaoyun/zion/chinafrica/controller/TbCfCouponController.java
浏览文件 @
a0551f6c
package
com
.
diaoyun
.
zion
.
chinafrica
.
controller
;
import
com.diaoyun.zion.chinafrica.constant.KeyConstant
;
import
com.diaoyun.zion.chinafrica.entity.TbCfCouponEntity
;
import
com.diaoyun.zion.chinafrica.service.TbCfCouponService
;
import
com.diaoyun.zion.master.base.Result
;
import
com.diaoyun.zion.master.common.RedisCache
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
...
...
@@ -9,8 +12,11 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.concurrent.ExecutorService
;
import
java.util.concurrent.Executors
;
/**
* 优惠券表Controller
...
...
@@ -28,9 +34,11 @@ public class TbCfCouponController {
@ApiOperation
(
"领取优惠券"
)
@GetMapping
(
"/{couponId}"
)
@ResponseBody
public
Result
takeCoupon
(
@ApiParam
(
"优惠券"
)
@PathVariable
(
"couponId"
)
String
couponId
)
{
public
Result
<
TbCfCouponEntity
>
takeCoupon
(
@ApiParam
(
"优惠券"
)
@PathVariable
(
"couponId"
)
String
couponId
)
{
Result
result
=
tbCfCouponService
.
takeCoupon
(
couponId
);
return
result
;
}
}
src/main/java/com/diaoyun/zion/chinafrica/controller/TbCf
UseCoupon
Controller.java
→
src/main/java/com/diaoyun/zion/chinafrica/controller/TbCf
CouponUse
Controller.java
浏览文件 @
a0551f6c
package
com
.
diaoyun
.
zion
.
chinafrica
.
controller
;
import
com.diaoyun.zion.chinafrica.service.TbCf
UseCoupon
Service
;
import
com.diaoyun.zion.chinafrica.service.TbCf
CouponUse
Service
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
...
@@ -12,10 +12,10 @@ import org.springframework.web.bind.annotation.RequestMapping;
* @date 2019-08-14 09:11:47
*/
@Controller
@RequestMapping
(
"tbcf
usecoupon
"
)
public
class
TbCf
UseCoupon
Controller
{
@RequestMapping
(
"tbcf
couponUse
"
)
public
class
TbCf
CouponUse
Controller
{
@Autowired
private
TbCf
UseCouponService
tbCfUseCoupon
Service
;
private
TbCf
CouponUseService
tbCfCouponUse
Service
;
}
src/main/java/com/diaoyun/zion/chinafrica/controller/TbCfExpCatRelController.java
浏览文件 @
a0551f6c
...
...
@@ -21,9 +21,10 @@ import java.util.Map;
* @author lipengjun
* @date 2019-08-30 09:47:20
*/
@Api
//
@Api
@Controller
@RequestMapping
(
"expcatrel"
)
@Deprecated
public
class
TbCfExpCatRelController
{
@Autowired
private
TbCfExpCatRelService
tbCfExpCatRelService
;
...
...
src/main/java/com/diaoyun/zion/chinafrica/controller/TbCfExpressTemplateController.java
浏览文件 @
a0551f6c
...
...
@@ -23,7 +23,7 @@ import java.util.Map;
* @author G
* @date 2019-08-14 09:11:48
*/
@Api
(
tags
=
"运费模板"
)
//
@Api(tags = "运费模板")
@Controller
@RequestMapping
(
"expressTemplate"
)
public
class
TbCfExpressTemplateController
{
...
...
src/main/java/com/diaoyun/zion/chinafrica/controller/TbCfFeedbackController.java
0 → 100644
浏览文件 @
a0551f6c
package
com
.
diaoyun
.
zion
.
chinafrica
.
controller
;
import
com.diaoyun.zion.chinafrica.service.TbCfFeedbackService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
/**
* 反馈情况Controller
*
* @author lipengjun
* @date 2019-09-05 16:51:07
*/
@Controller
@RequestMapping
(
"tbcffeedback"
)
public
class
TbCfFeedbackController
{
@Autowired
private
TbCfFeedbackService
tbCfFeedbackService
;
}
src/main/java/com/diaoyun/zion/chinafrica/controller/TbCfItemDetailController.java
浏览文件 @
a0551f6c
...
...
@@ -46,6 +46,15 @@ public class TbCfItemDetailController {
return
result
;
}
@ApiOperation
(
"改变购物车的商品勾选状态"
)
@PutMapping
(
"/state/{cartRecordId}/{checkFlag}"
)
@ResponseBody
public
Result
changeItemState
(
@ApiParam
(
"购物车记录id"
)
@PathVariable
(
"cartRecordId"
)
String
cartRecordId
,
@ApiParam
(
"勾选状态 0不选中,1选中"
)
@PathVariable
(
"checkFlag"
)
Integer
checkFlag
)
{
Result
result
=
tbCfItemDetailService
.
changeItemState
(
cartRecordId
,
checkFlag
);
return
result
;
}
@ApiOperation
(
"更改购物车商品数量"
)
@PutMapping
(
"/cart/{itemId}/{itemNum}"
)
@ResponseBody
...
...
@@ -57,7 +66,7 @@ public class TbCfItemDetailController {
@ApiOperation
(
"从购物车删除商品"
)
@DeleteMapping
(
"/cart"
)
@ResponseBody
public
Result
deleteItems
(
@ApiParam
(
"商品Id"
)
@RequestBody
String
[]
cartRecordIds
)
{
public
Result
deleteItems
(
@ApiParam
(
"商品Id
数组
"
)
@RequestBody
String
[]
cartRecordIds
)
{
Result
result
=
tbCfCartRecordRService
.
deleteItems
(
cartRecordIds
);
return
result
;
}
...
...
@@ -65,7 +74,7 @@ public class TbCfItemDetailController {
@ApiOperation
(
"获取用户购物车内的商品"
)
@GetMapping
(
"/cart"
)
@ResponseBody
public
Result
getCartItem
()
{
public
Result
<
List
<
TbCfCartItemDetailVo
>>
getCartItem
()
{
List
<
TbCfCartItemDetailVo
>
tbCfCartItemDetailList
=
tbCfItemDetailService
.
getCartItemList
();
Result
result
=
new
Result
(
tbCfCartItemDetailList
);
return
result
;
...
...
src/main/java/com/diaoyun/zion/chinafrica/controller/TbCfOrderController.java
浏览文件 @
a0551f6c
...
...
@@ -4,6 +4,8 @@ import com.diaoyun.zion.chinafrica.entity.TbCfOrderEntity;
import
com.diaoyun.zion.chinafrica.service.TbCfOrderService
;
import
com.diaoyun.zion.chinafrica.vo.TbCfOrderVo
;
import
com.diaoyun.zion.master.base.Result
;
import
com.github.pagehelper.PageInfo
;
import
com.stripe.exception.StripeException
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
...
...
@@ -30,9 +32,9 @@ public class TbCfOrderController {
private
TbCfOrderService
tbCfOrderService
;
@ApiOperation
(
"用户结算,返回订单"
)
@
Pos
tMapping
(
"/settle"
)
@
Ge
tMapping
(
"/settle"
)
@ResponseBody
public
Result
settleAccount
()
throws
IOException
,
URISyntaxException
{
public
Result
<
TbCfOrderVo
>
settleAccount
()
throws
IOException
,
URISyntaxException
{
Result
result
=
tbCfOrderService
.
settleAccount
();
return
result
;
}
...
...
@@ -45,4 +47,46 @@ public class TbCfOrderController {
return
result
;
}
@ApiOperation
(
"获取用户订单 默认10条"
)
@GetMapping
@ResponseBody
/**
* pageNum 页数
* pageSize 每页大小
*/
public
Result
<
PageInfo
>
getUserOrderList
(
@ApiParam
(
value
=
"页数"
)
@RequestParam
(
required
=
false
)
Integer
pageNum
,
@ApiParam
(
value
=
"每页大小"
)
@RequestParam
(
required
=
false
)
Integer
pageSize
)
{
if
(
pageNum
==
null
)
{
pageNum
=
1
;
}
if
(
pageSize
==
null
)
{
pageSize
=
10
;
}
Result
result
=
tbCfOrderService
.
getUserOrderList
(
pageNum
,
pageSize
);
return
result
;
}
@ApiOperation
(
"获取stripe公钥"
)
@GetMapping
(
"/stripe"
)
@ResponseBody
public
Result
<
String
>
getStripePublicKey
()
{
Result
result
=
tbCfOrderService
.
getStripePublicKey
();
return
result
;
}
@ApiOperation
(
"发起订单支付"
)
@PostMapping
(
"/pay/{orderId}/{token}"
)
@ResponseBody
public
Result
payForOrder
(
@ApiParam
(
"订单id"
)
@PathVariable
(
"orderId"
)
String
orderId
,
@ApiParam
(
"支付token"
)
@PathVariable
(
"token"
)
String
token
)
{
Result
result
=
tbCfOrderService
.
payForOrder
(
orderId
,
token
);
return
result
;
}
/*
@ApiOperation("取消订单")
@DeleteMapping
@ResponseBody
public Result cancelOrder*/
}
src/main/java/com/diaoyun/zion/chinafrica/controller/TbCfPlatformController.java
0 → 100644
浏览文件 @
a0551f6c
package
com
.
diaoyun
.
zion
.
chinafrica
.
controller
;
import
com.diaoyun.zion.chinafrica.service.TbCfPlatformService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
/**
* 平台管理Controller
*
* @author lipengjun
* @date 2019-09-05 16:51:07
*/
@Controller
@RequestMapping
(
"tbcfplatform"
)
public
class
TbCfPlatformController
{
@Autowired
private
TbCfPlatformService
tbCfPlatformService
;
}
src/main/java/com/diaoyun/zion/chinafrica/controller/TbCfProblemController.java
0 → 100644
浏览文件 @
a0551f6c
package
com
.
diaoyun
.
zion
.
chinafrica
.
controller
;
import
com.diaoyun.zion.chinafrica.service.TbCfProblemService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
/**
* 常见问题Controller
*
* @author lipengjun
* @date 2019-09-05 16:51:07
*/
@Controller
@RequestMapping
(
"tbcfproblem"
)
public
class
TbCfProblemController
{
@Autowired
private
TbCfProblemService
tbCfProblemService
;
}
src/main/java/com/diaoyun/zion/chinafrica/controller/TbCfStationItemController.java
0 → 100644
浏览文件 @
a0551f6c
package
com
.
diaoyun
.
zion
.
chinafrica
.
controller
;
import
com.diaoyun.zion.chinafrica.service.TbCfStationItemService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
/**
* 站点商品Controller
*
* @author lipengjun
* @date 2019-09-05 16:51:07
*/
@Controller
@RequestMapping
(
"tbcfstationitem"
)
public
class
TbCfStationItemController
{
@Autowired
private
TbCfStationItemService
tbCfStationItemService
;
}
src/main/java/com/diaoyun/zion/chinafrica/controller/TbCfStoreController.java
0 → 100644
浏览文件 @
a0551f6c
package
com
.
diaoyun
.
zion
.
chinafrica
.
controller
;
import
com.diaoyun.zion.chinafrica.service.TbCfStoreService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
/**
* 店铺管理Controller
*
* @author lipengjun
* @date 2019-09-05 16:51:07
*/
@Controller
@RequestMapping
(
"tbcfstore"
)
public
class
TbCfStoreController
{
@Autowired
private
TbCfStoreService
tbCfStoreService
;
}
src/main/java/com/diaoyun/zion/chinafrica/dao/TbCfCartRecordRDao.java
浏览文件 @
a0551f6c
...
...
@@ -18,4 +18,6 @@ public interface TbCfCartRecordRDao extends BaseDao<TbCfCartRecordREntity> {
* @return
*/
int
deleteItems
(
String
[]
cartRecordIds
);
}
src/main/java/com/diaoyun/zion/chinafrica/dao/TbCfCouponDao.java
浏览文件 @
a0551f6c
...
...
@@ -17,8 +17,15 @@ public interface TbCfCouponDao extends BaseDao<TbCfCouponEntity> {
/**
* 获取用户所有可以使用的优惠券
* @param userId
* @param
dat
e
* @param
nowTim
e
* @return
*/
List
<
TbCfCouponEntity
>
queryUserAvailableCoupon
(
String
userId
,
Date
nowTime
);
/**
* 更改优惠券统计 暂不用
* @param couponId
* @return
*/
int
updateUsedCount
(
String
couponId
);
}
src/main/java/com/diaoyun/zion/chinafrica/dao/TbCf
UseCoupon
Dao.java
→
src/main/java/com/diaoyun/zion/chinafrica/dao/TbCf
CouponUse
Dao.java
浏览文件 @
a0551f6c
package
com
.
diaoyun
.
zion
.
chinafrica
.
dao
;
import
com.diaoyun.zion.chinafrica.entity.TbCf
UseCoupon
Entity
;
import
com.diaoyun.zion.chinafrica.entity.TbCf
CouponUse
Entity
;
import
com.diaoyun.zion.master.dao.BaseDao
;
/**
* 使用优惠券记录Dao
...
...
@@ -8,6 +8,6 @@ import com.diaoyun.zion.master.dao.BaseDao;
* @author G
* @date 2019-08-14 09:11:47
*/
public
interface
TbCf
UseCouponDao
extends
BaseDao
<
TbCfUseCoupon
Entity
>
{
public
interface
TbCf
CouponUseDao
extends
BaseDao
<
TbCfCouponUse
Entity
>
{
}
src/main/java/com/diaoyun/zion/chinafrica/dao/TbCfFeedbackDao.java
0 → 100644
浏览文件 @
a0551f6c
package
com
.
diaoyun
.
zion
.
chinafrica
.
dao
;
import
com.diaoyun.zion.chinafrica.entity.TbCfFeedbackEntity
;
import
com.diaoyun.zion.master.dao.BaseDao
;
/**
* 反馈情况Dao
*
* @author lipengjun
* @date 2019-09-05 16:51:07
*/
public
interface
TbCfFeedbackDao
extends
BaseDao
<
TbCfFeedbackEntity
>
{
}
src/main/java/com/diaoyun/zion/chinafrica/dao/TbCfItemDetailDao.java
浏览文件 @
a0551f6c
...
...
@@ -21,4 +21,12 @@ public interface TbCfItemDetailDao extends BaseDao<TbCfItemDetailEntity> {
* @return
*/
List
<
TbCfCartItemDetailVo
>
getCartItemList
(
String
userId
,
Integer
checkFlag
);
/**
* 改变购物车的商品勾选状态
* @param cartRecordId
* @param checkFlag
* @return
*/
int
changeItemState
(
String
cartRecordId
,
Integer
checkFlag
);
}
src/main/java/com/diaoyun/zion/chinafrica/dao/TbCfItemOrderRDao.java
浏览文件 @
a0551f6c
...
...
@@ -2,6 +2,9 @@ package com.diaoyun.zion.chinafrica.dao;
import
com.diaoyun.zion.chinafrica.entity.TbCfItemOrderREntity
;
import
com.diaoyun.zion.master.dao.BaseDao
;
import
java.util.List
;
/**
* 订单商品对应表Dao
*
...
...
@@ -10,4 +13,10 @@ import com.diaoyun.zion.master.dao.BaseDao;
*/
public
interface
TbCfItemOrderRDao
extends
BaseDao
<
TbCfItemOrderREntity
>
{
/**
* 批量保存
* @param itemOrderRList
* @return
*/
int
saveBatch
(
List
<
TbCfItemOrderREntity
>
itemOrderRList
);
}
src/main/java/com/diaoyun/zion/chinafrica/dao/TbCfOrderDao.java
浏览文件 @
a0551f6c
package
com
.
diaoyun
.
zion
.
chinafrica
.
dao
;
import
com.diaoyun.zion.chinafrica.entity.TbCfItemDetailEntity
;
import
com.diaoyun.zion.chinafrica.entity.TbCfOrderEntity
;
import
com.diaoyun.zion.master.dao.BaseDao
;
import
java.util.List
;
/**
* Dao
*
...
...
@@ -10,4 +14,17 @@ import com.diaoyun.zion.master.dao.BaseDao;
*/
public
interface
TbCfOrderDao
extends
BaseDao
<
TbCfOrderEntity
>
{
/**
* 获取用户订单数据
* @param userId
* @return
*/
List
<
TbCfOrderEntity
>
getUserOrderList
(
String
userId
);
/**
* 获取订单内商品
* @param orderId
* @return
*/
List
<
TbCfItemDetailEntity
>
getOrderItemList
(
String
orderId
);
}
src/main/java/com/diaoyun/zion/chinafrica/dao/TbCfPlatformDao.java
0 → 100644
浏览文件 @
a0551f6c
package
com
.
diaoyun
.
zion
.
chinafrica
.
dao
;
import
com.diaoyun.zion.chinafrica.entity.TbCfPlatformEntity
;
import
com.diaoyun.zion.master.dao.BaseDao
;
/**
* 平台管理Dao
*
* @author lipengjun
* @date 2019-09-05 16:51:07
*/
public
interface
TbCfPlatformDao
extends
BaseDao
<
TbCfPlatformEntity
>
{
}
src/main/java/com/diaoyun/zion/chinafrica/dao/TbCfProblemDao.java
0 → 100644
浏览文件 @
a0551f6c
package
com
.
diaoyun
.
zion
.
chinafrica
.
dao
;
import
com.diaoyun.zion.chinafrica.entity.TbCfProblemEntity
;
import
com.diaoyun.zion.master.dao.BaseDao
;
/**
* 常见问题Dao
*
* @author lipengjun
* @date 2019-09-05 16:51:07
*/
public
interface
TbCfProblemDao
extends
BaseDao
<
TbCfProblemEntity
>
{
}
src/main/java/com/diaoyun/zion/chinafrica/dao/TbCfStationItemDao.java
0 → 100644
浏览文件 @
a0551f6c
package
com
.
diaoyun
.
zion
.
chinafrica
.
dao
;
import
com.diaoyun.zion.chinafrica.entity.TbCfStationItemEntity
;
import
com.diaoyun.zion.master.dao.BaseDao
;
/**
* 站点商品Dao
*
* @author lipengjun
* @date 2019-09-05 16:51:07
*/
public
interface
TbCfStationItemDao
extends
BaseDao
<
TbCfStationItemEntity
>
{
}
src/main/java/com/diaoyun/zion/chinafrica/dao/TbCfStoreDao.java
0 → 100644
浏览文件 @
a0551f6c
package
com
.
diaoyun
.
zion
.
chinafrica
.
dao
;
import
com.diaoyun.zion.chinafrica.entity.TbCfStoreEntity
;
import
com.diaoyun.zion.master.dao.BaseDao
;
/**
* 店铺管理Dao
*
* @author lipengjun
* @date 2019-09-05 16:51:07
*/
public
interface
TbCfStoreDao
extends
BaseDao
<
TbCfStoreEntity
>
{
}
src/main/java/com/diaoyun/zion/chinafrica/dao/TbCfTakeCouponDao.java
浏览文件 @
a0551f6c
...
...
@@ -19,4 +19,20 @@ public interface TbCfTakeCouponDao extends BaseDao<TbCfTakeCouponEntity> {
* @return takeId
*/
String
queryTakeByCouponId
(
String
userId
,
String
couponId
);
/**
* 统计已领取数量
* @param couponId
* @return
*/
Integer
queryTakeCount
(
String
couponId
);
/**
* 更改使用状态
* @param userId
* @param couponId
* @param enableFlag
* @return
*/
int
updateEnableFlag
(
String
userId
,
String
couponId
,
Integer
enableFlag
);
}
src/main/java/com/diaoyun/zion/chinafrica/entity/TbCfCouponEntity.java
浏览文件 @
a0551f6c
package
com
.
diaoyun
.
zion
.
chinafrica
.
entity
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
import
java.util.Date
;
...
...
@@ -11,88 +14,109 @@ import java.util.Date;
* @author G
* @date 2019-08-14 09:11:48
*/
@ApiModel
public
class
TbCfCouponEntity
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 优惠券id
*/
@ApiModelProperty
(
"优惠券id"
)
private
String
couponId
;
/**
* 优惠券类型
*/
@ApiModelProperty
(
"优惠券类型(暂无用)"
)
private
Integer
couponCategory
;
/**
* 可用于
* 可用于
类目
*/
@ApiModelProperty
(
"可用于类目(暂无用)"
)
private
Integer
couponUse
;
/**
* 优惠券标题
*/
@ApiModelProperty
(
"优惠券标题"
)
private
String
couponTitle
;
/**
* 优惠券图片地址
*/
@ApiModelProperty
(
"优惠券图片地址"
)
private
String
couponIcon
;
/**
* 那些站点可以使用,1111为全部
*/
@ApiModelProperty
(
"那些站点可以使用(暂无用)"
)
private
String
withStationId
;
/**
* 满多少金额可以使用
*/
@ApiModelProperty
(
"满多少金额可以使用"
)
private
BigDecimal
withAmount
;
/**
* 抵扣金额
*/
@ApiModelProperty
(
"抵扣金额"
)
private
BigDecimal
deductAmount
;
/**
* 发券数量
*/
@ApiModelProperty
(
"发券数量"
)
private
Integer
quato
;
/**
* 已领取数量
* 已领取数量
不更改,因为会被覆盖,改为查询统计来获取已经领取的优惠券数量
*/
@ApiModelProperty
(
"已领取数量(暂无用)"
)
private
Integer
takeCount
;
/**
* 已使用数量
* 已使用数量
不更改,因为会被覆盖,改为查询统计来获取已经使用的优惠券数量
*/
@ApiModelProperty
(
"已使用数量(暂无用)"
)
private
Integer
usedCount
;
/**
* 发放开始时间
*/
@ApiModelProperty
(
"发放开始时间"
)
private
Date
startTime
;
/**
* 发放结束时间
*/
@ApiModelProperty
(
"发放结束时间"
)
private
Date
endTime
;
/**
* 有效开始时间
*/
@ApiModelProperty
(
"有效开始时间"
)
private
Date
validStartTime
;
/**
* 有效结束时间
*/
@ApiModelProperty
(
"有效结束时间"
)
private
Date
validEndTime
;
/**
* 有效标志,0无效,1生效,2过期
*/
@ApiModelProperty
(
"有效标志,0无效,1生效,2过期"
)
private
Integer
status
;
/**
* 创建人
*/
@ApiModelProperty
(
"创建人"
)
private
String
createUserId
;
/**
* 创建时间
*/
@ApiModelProperty
(
"创建时间"
)
private
Date
createTime
;
/**
* 修改人
*/
@ApiModelProperty
(
"修改人"
)
private
String
updateUserId
;
/**
* 修改时间
*/
@ApiModelProperty
(
"修改时间"
)
private
Date
updateTime
;
/**
...
...
src/main/java/com/diaoyun/zion/chinafrica/entity/TbCf
UseCoupon
Entity.java
→
src/main/java/com/diaoyun/zion/chinafrica/entity/TbCf
CouponUse
Entity.java
浏览文件 @
a0551f6c
...
...
@@ -5,12 +5,12 @@ import java.util.Date;
/**
* 使用优惠券记录实体
* 表名 tb_cf_
use_coupon
* 表名 tb_cf_
coupon_use
*
* @author G
* @date 2019-08-14 09:11:47
*/
public
class
TbCf
UseCoupon
Entity
implements
Serializable
{
public
class
TbCf
CouponUse
Entity
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
...
...
src/main/java/com/diaoyun/zion/chinafrica/entity/TbCfFeedbackEntity.java
0 → 100644
浏览文件 @
a0551f6c
package
com
.
diaoyun
.
zion
.
chinafrica
.
entity
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* 反馈情况实体
* 表名 tb_cf_feedback
*
* @author lipengjun
* @date 2019-09-05 16:51:07
*/
public
class
TbCfFeedbackEntity
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 反馈id
*/
private
String
feedbackId
;
/**
* 问题
*/
private
String
question
;
/**
* 答案
*/
private
String
answer
;
/**
* 是否展示
*/
private
Integer
enableFlag
;
/**
* 创建时间
*/
private
Date
createTime
;
/**
* 设置:反馈id
*/
public
void
setFeedbackId
(
String
feedbackId
)
{
this
.
feedbackId
=
feedbackId
;
}
/**
* 获取:反馈id
*/
public
String
getFeedbackId
()
{
return
feedbackId
;
}
/**
* 设置:问题
*/
public
void
setQuestion
(
String
question
)
{
this
.
question
=
question
;
}
/**
* 获取:问题
*/
public
String
getQuestion
()
{
return
question
;
}
/**
* 设置:答案
*/
public
void
setAnswer
(
String
answer
)
{
this
.
answer
=
answer
;
}
/**
* 获取:答案
*/
public
String
getAnswer
()
{
return
answer
;
}
/**
* 设置:是否展示
*/
public
void
setEnableFlag
(
Integer
enableFlag
)
{
this
.
enableFlag
=
enableFlag
;
}
/**
* 获取:是否展示
*/
public
Integer
getEnableFlag
()
{
return
enableFlag
;
}
/**
* 设置:创建时间
*/
public
void
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
}
/**
* 获取:创建时间
*/
public
Date
getCreateTime
()
{
return
createTime
;
}
}
src/main/java/com/diaoyun/zion/chinafrica/entity/TbCfPlatformEntity.java
0 → 100644
浏览文件 @
a0551f6c
package
com
.
diaoyun
.
zion
.
chinafrica
.
entity
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* 平台管理实体
* 表名 tb_cf_platform
*
* @author lipengjun
* @date 2019-09-05 16:51:07
*/
public
class
TbCfPlatformEntity
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 平台id
*/
private
String
platformId
;
/**
* 平台编号
*/
private
String
platformCode
;
/**
* 平台名字
*/
private
String
platformName
;
/**
* 平台简介
*/
private
String
platformBrief
;
/**
* 平台链接
*/
private
String
platformUrl
;
/**
* 平台图片
*/
private
String
platformImg
;
/**
* 启用状态
*/
private
Integer
enableFlag
;
/**
* 创建日期
*/
private
Date
createTime
;
/**
* 设置:平台id
*/
public
void
setPlatformId
(
String
platformId
)
{
this
.
platformId
=
platformId
;
}
/**
* 获取:平台id
*/
public
String
getPlatformId
()
{
return
platformId
;
}
/**
* 设置:平台编号
*/
public
void
setPlatformCode
(
String
platformCode
)
{
this
.
platformCode
=
platformCode
;
}
/**
* 获取:平台编号
*/
public
String
getPlatformCode
()
{
return
platformCode
;
}
/**
* 设置:平台名字
*/
public
void
setPlatformName
(
String
platformName
)
{
this
.
platformName
=
platformName
;
}
/**
* 获取:平台名字
*/
public
String
getPlatformName
()
{
return
platformName
;
}
/**
* 设置:平台简介
*/
public
void
setPlatformBrief
(
String
platformBrief
)
{
this
.
platformBrief
=
platformBrief
;
}
/**
* 获取:平台简介
*/
public
String
getPlatformBrief
()
{
return
platformBrief
;
}
/**
* 设置:平台链接
*/
public
void
setPlatformUrl
(
String
platformUrl
)
{
this
.
platformUrl
=
platformUrl
;
}
/**
* 获取:平台链接
*/
public
String
getPlatformUrl
()
{
return
platformUrl
;
}
/**
* 设置:平台图片
*/
public
void
setPlatformImg
(
String
platformImg
)
{
this
.
platformImg
=
platformImg
;
}
/**
* 获取:平台图片
*/
public
String
getPlatformImg
()
{
return
platformImg
;
}
/**
* 设置:启用状态
*/
public
void
setEnableFlag
(
Integer
enableFlag
)
{
this
.
enableFlag
=
enableFlag
;
}
/**
* 获取:启用状态
*/
public
Integer
getEnableFlag
()
{
return
enableFlag
;
}
/**
* 设置:创建日期
*/
public
void
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
}
/**
* 获取:创建日期
*/
public
Date
getCreateTime
()
{
return
createTime
;
}
}
src/main/java/com/diaoyun/zion/chinafrica/entity/TbCfProblemEntity.java
0 → 100644
浏览文件 @
a0551f6c
package
com
.
diaoyun
.
zion
.
chinafrica
.
entity
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* 常见问题实体
* 表名 tb_cf_problem
*
* @author lipengjun
* @date 2019-09-05 16:51:07
*/
public
class
TbCfProblemEntity
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 问题id
*/
private
String
problemId
;
/**
* 问题明细
*/
private
String
question
;
/**
* 答案
*/
private
String
answer
;
/**
* 是否展示
*/
private
Integer
enableFlag
;
/**
* 创建时间
*/
private
Date
createTime
;
/**
* 设置:问题id
*/
public
void
setProblemId
(
String
problemId
)
{
this
.
problemId
=
problemId
;
}
/**
* 获取:问题id
*/
public
String
getProblemId
()
{
return
problemId
;
}
/**
* 设置:问题明细
*/
public
void
setQuestion
(
String
question
)
{
this
.
question
=
question
;
}
/**
* 获取:问题明细
*/
public
String
getQuestion
()
{
return
question
;
}
/**
* 设置:答案
*/
public
void
setAnswer
(
String
answer
)
{
this
.
answer
=
answer
;
}
/**
* 获取:答案
*/
public
String
getAnswer
()
{
return
answer
;
}
/**
* 设置:是否展示
*/
public
void
setEnableFlag
(
Integer
enableFlag
)
{
this
.
enableFlag
=
enableFlag
;
}
/**
* 获取:是否展示
*/
public
Integer
getEnableFlag
()
{
return
enableFlag
;
}
/**
* 设置:创建时间
*/
public
void
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
}
/**
* 获取:创建时间
*/
public
Date
getCreateTime
()
{
return
createTime
;
}
}
src/main/java/com/diaoyun/zion/chinafrica/entity/TbCfStationItemEntity.java
0 → 100644
浏览文件 @
a0551f6c
package
com
.
diaoyun
.
zion
.
chinafrica
.
entity
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* 站点商品实体
* 表名 tb_cf_station_item
*
* @author lipengjun
* @date 2019-09-05 16:51:07
*/
public
class
TbCfStationItemEntity
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 商品id
*/
private
String
itemId
;
/**
* 商品编号
*/
private
String
itemCode
;
/**
* 商品名字
*/
private
String
itemName
;
/**
* 商品标题简介
*/
private
String
itemBrief
;
/**
* 商品分类
*/
private
String
itemCategory
;
/**
* 商品链接
*/
private
String
itemUrl
;
/**
* 商品图片
*/
private
String
itemImg
;
/**
* 所属平台
*/
private
String
platformCode
;
/**
* 平台名
*/
private
String
platformName
;
/**
* 启用状态
*/
private
Integer
enableFlag
;
/**
* 创建日期
*/
private
Date
createTime
;
/**
* 设置:商品id
*/
public
void
setItemId
(
String
itemId
)
{
this
.
itemId
=
itemId
;
}
/**
* 获取:商品id
*/
public
String
getItemId
()
{
return
itemId
;
}
/**
* 设置:商品编号
*/
public
void
setItemCode
(
String
itemCode
)
{
this
.
itemCode
=
itemCode
;
}
/**
* 获取:商品编号
*/
public
String
getItemCode
()
{
return
itemCode
;
}
/**
* 设置:商品名字
*/
public
void
setItemName
(
String
itemName
)
{
this
.
itemName
=
itemName
;
}
/**
* 获取:商品名字
*/
public
String
getItemName
()
{
return
itemName
;
}
/**
* 设置:商品标题简介
*/
public
void
setItemBrief
(
String
itemBrief
)
{
this
.
itemBrief
=
itemBrief
;
}
/**
* 获取:商品标题简介
*/
public
String
getItemBrief
()
{
return
itemBrief
;
}
/**
* 设置:商品分类
*/
public
void
setItemCategory
(
String
itemCategory
)
{
this
.
itemCategory
=
itemCategory
;
}
/**
* 获取:商品分类
*/
public
String
getItemCategory
()
{
return
itemCategory
;
}
/**
* 设置:商品链接
*/
public
void
setItemUrl
(
String
itemUrl
)
{
this
.
itemUrl
=
itemUrl
;
}
/**
* 获取:商品链接
*/
public
String
getItemUrl
()
{
return
itemUrl
;
}
/**
* 设置:商品图片
*/
public
void
setItemImg
(
String
itemImg
)
{
this
.
itemImg
=
itemImg
;
}
/**
* 获取:商品图片
*/
public
String
getItemImg
()
{
return
itemImg
;
}
/**
* 设置:所属平台
*/
public
void
setPlatformCode
(
String
platformCode
)
{
this
.
platformCode
=
platformCode
;
}
/**
* 获取:所属平台
*/
public
String
getPlatformCode
()
{
return
platformCode
;
}
/**
* 设置:平台名
*/
public
void
setPlatformName
(
String
platformName
)
{
this
.
platformName
=
platformName
;
}
/**
* 获取:平台名
*/
public
String
getPlatformName
()
{
return
platformName
;
}
/**
* 设置:启用状态
*/
public
void
setEnableFlag
(
Integer
enableFlag
)
{
this
.
enableFlag
=
enableFlag
;
}
/**
* 获取:启用状态
*/
public
Integer
getEnableFlag
()
{
return
enableFlag
;
}
/**
* 设置:创建日期
*/
public
void
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
}
/**
* 获取:创建日期
*/
public
Date
getCreateTime
()
{
return
createTime
;
}
}
src/main/java/com/diaoyun/zion/chinafrica/entity/TbCfStoreEntity.java
0 → 100644
浏览文件 @
a0551f6c
package
com
.
diaoyun
.
zion
.
chinafrica
.
entity
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* 店铺管理实体
* 表名 tb_cf_store
*
* @author lipengjun
* @date 2019-09-05 16:51:07
*/
public
class
TbCfStoreEntity
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 店铺id
*/
private
String
storeId
;
/**
* 店铺编号
*/
private
String
storeCode
;
/**
* 店铺名字
*/
private
String
storeName
;
/**
* 店铺简介
*/
private
String
storeBrief
;
/**
* 店铺链接
*/
private
String
storeUrl
;
/**
* 店铺图片
*/
private
String
storeImg
;
/**
* 所属店铺
*/
private
String
platformCode
;
/**
* 店铺名
*/
private
String
platformName
;
/**
* 启用状态
*/
private
Integer
enableFlag
;
/**
* 创建日期
*/
private
Date
createTime
;
/**
* 设置:店铺id
*/
public
void
setStoreId
(
String
storeId
)
{
this
.
storeId
=
storeId
;
}
/**
* 获取:店铺id
*/
public
String
getStoreId
()
{
return
storeId
;
}
/**
* 设置:店铺编号
*/
public
void
setStoreCode
(
String
storeCode
)
{
this
.
storeCode
=
storeCode
;
}
/**
* 获取:店铺编号
*/
public
String
getStoreCode
()
{
return
storeCode
;
}
/**
* 设置:店铺名字
*/
public
void
setStoreName
(
String
storeName
)
{
this
.
storeName
=
storeName
;
}
/**
* 获取:店铺名字
*/
public
String
getStoreName
()
{
return
storeName
;
}
/**
* 设置:店铺简介
*/
public
void
setStoreBrief
(
String
storeBrief
)
{
this
.
storeBrief
=
storeBrief
;
}
/**
* 获取:店铺简介
*/
public
String
getStoreBrief
()
{
return
storeBrief
;
}
/**
* 设置:店铺链接
*/
public
void
setStoreUrl
(
String
storeUrl
)
{
this
.
storeUrl
=
storeUrl
;
}
/**
* 获取:店铺链接
*/
public
String
getStoreUrl
()
{
return
storeUrl
;
}
/**
* 设置:店铺图片
*/
public
void
setStoreImg
(
String
storeImg
)
{
this
.
storeImg
=
storeImg
;
}
/**
* 获取:店铺图片
*/
public
String
getStoreImg
()
{
return
storeImg
;
}
/**
* 设置:所属店铺
*/
public
void
setPlatformCode
(
String
platformCode
)
{
this
.
platformCode
=
platformCode
;
}
/**
* 获取:所属店铺
*/
public
String
getPlatformCode
()
{
return
platformCode
;
}
/**
* 设置:店铺名
*/
public
void
setPlatformName
(
String
platformName
)
{
this
.
platformName
=
platformName
;
}
/**
* 获取:店铺名
*/
public
String
getPlatformName
()
{
return
platformName
;
}
/**
* 设置:启用状态
*/
public
void
setEnableFlag
(
Integer
enableFlag
)
{
this
.
enableFlag
=
enableFlag
;
}
/**
* 获取:启用状态
*/
public
Integer
getEnableFlag
()
{
return
enableFlag
;
}
/**
* 设置:创建日期
*/
public
void
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
}
/**
* 获取:创建日期
*/
public
Date
getCreateTime
()
{
return
createTime
;
}
}
src/main/java/com/diaoyun/zion/chinafrica/entity/TbCfTakeCouponEntity.java
浏览文件 @
a0551f6c
...
...
@@ -29,6 +29,10 @@ public class TbCfTakeCouponEntity implements Serializable {
* 领取时间
*/
private
Date
createTime
;
/**
* 是否已经使用
*/
private
Integer
enableFlag
;
/**
* 设置:领取id
...
...
@@ -82,4 +86,12 @@ public class TbCfTakeCouponEntity implements Serializable {
public
Date
getCreateTime
()
{
return
createTime
;
}
public
Integer
getEnableFlag
()
{
return
enableFlag
;
}
public
void
setEnableFlag
(
Integer
enableFlag
)
{
this
.
enableFlag
=
enableFlag
;
}
}
src/main/java/com/diaoyun/zion/chinafrica/service/TbCf
UseCoupon
Service.java
→
src/main/java/com/diaoyun/zion/chinafrica/service/TbCf
CouponUse
Service.java
浏览文件 @
a0551f6c
package
com
.
diaoyun
.
zion
.
chinafrica
.
service
;
import
com.diaoyun.zion.chinafrica.entity.TbCf
UseCoupon
Entity
;
import
com.diaoyun.zion.chinafrica.entity.TbCf
CouponUse
Entity
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -11,7 +11,7 @@ import java.util.Map;
* @author G
* @date 2019-08-14 09:11:47
*/
public
interface
TbCf
UseCoupon
Service
{
public
interface
TbCf
CouponUse
Service
{
/**
* 根据主键查询实体
...
...
@@ -19,7 +19,7 @@ public interface TbCfUseCouponService {
* @param useId 主键
* @return 实体
*/
TbCf
UseCoupon
Entity
queryObject
(
String
useId
);
TbCf
CouponUse
Entity
queryObject
(
String
useId
);
/**
* 分页查询
...
...
@@ -27,7 +27,7 @@ public interface TbCfUseCouponService {
* @param map 参数
* @return list
*/
List
<
TbCf
UseCoupon
Entity
>
queryList
(
Map
<
String
,
Object
>
map
);
List
<
TbCf
CouponUse
Entity
>
queryList
(
Map
<
String
,
Object
>
map
);
/**
* 分页统计总数
...
...
@@ -40,18 +40,18 @@ public interface TbCfUseCouponService {
/**
* 保存实体
*
* @param tbCf
UseCoupon
实体
* @param tbCf
CouponUse
实体
* @return 保存条数
*/
int
save
(
TbCf
UseCouponEntity
tbCfUseCoupon
);
int
save
(
TbCf
CouponUseEntity
tbCfCouponUse
);
/**
* 根据主键更新实体
*
* @param tbCf
UseCoupon
实体
* @param tbCf
CouponUse
实体
* @return 更新条数
*/
int
update
(
TbCf
UseCouponEntity
tbCfUseCoupon
);
int
update
(
TbCf
CouponUseEntity
tbCfCouponUse
);
/**
* 根据主键删除
...
...
src/main/java/com/diaoyun/zion/chinafrica/service/TbCfFeedbackService.java
0 → 100644
浏览文件 @
a0551f6c
package
com
.
diaoyun
.
zion
.
chinafrica
.
service
;
import
com.diaoyun.zion.chinafrica.entity.TbCfFeedbackEntity
;
import
java.util.List
;
import
java.util.Map
;
/**
* 反馈情况Service接口
*
* @author lipengjun
* @date 2019-09-05 16:51:07
*/
public
interface
TbCfFeedbackService
{
/**
* 根据主键查询实体
*
* @param id 主键
* @return 实体
*/
TbCfFeedbackEntity
queryObject
(
String
feedbackId
);
/**
* 分页查询
*
* @param map 参数
* @return list
*/
List
<
TbCfFeedbackEntity
>
queryList
(
Map
<
String
,
Object
>
map
);
/**
* 分页统计总数
*
* @param map 参数
* @return 总数
*/
int
queryTotal
(
Map
<
String
,
Object
>
map
);
/**
* 保存实体
*
* @param tbCfFeedback 实体
* @return 保存条数
*/
int
save
(
TbCfFeedbackEntity
tbCfFeedback
);
/**
* 根据主键更新实体
*
* @param tbCfFeedback 实体
* @return 更新条数
*/
int
update
(
TbCfFeedbackEntity
tbCfFeedback
);
/**
* 根据主键删除
*
* @param feedbackId
* @return 删除条数
*/
int
delete
(
String
feedbackId
);
/**
* 根据主键批量删除
*
* @param feedbackIds
* @return 删除条数
*/
int
deleteBatch
(
String
[]
feedbackIds
);
}
src/main/java/com/diaoyun/zion/chinafrica/service/TbCfItemDetailService.java
浏览文件 @
a0551f6c
...
...
@@ -94,4 +94,12 @@ public interface TbCfItemDetailService {
* @return
*/
List
<
TbCfCartItemDetailVo
>
getCartItemList
();
/**
* 改变购物车的商品勾选状态
* @param cartRecordId
* @param enableFlag
* @return
*/
Result
changeItemState
(
String
cartRecordId
,
Integer
enableFlag
);
}
src/main/java/com/diaoyun/zion/chinafrica/service/TbCfOrderService.java
浏览文件 @
a0551f6c
...
...
@@ -3,6 +3,7 @@ package com.diaoyun.zion.chinafrica.service;
import
com.diaoyun.zion.chinafrica.entity.TbCfOrderEntity
;
import
com.diaoyun.zion.chinafrica.vo.TbCfOrderVo
;
import
com.diaoyun.zion.master.base.Result
;
import
com.stripe.exception.StripeException
;
import
java.io.IOException
;
import
java.net.URISyntaxException
;
...
...
@@ -75,14 +76,47 @@ public interface TbCfOrderService {
/**
* 用户结算
*
* @return
*/
Result
settleAccount
()
throws
IOException
,
URISyntaxException
;
/**
* 用户下单
*
* @param tbCfOrderVo
* @return
*/
Result
placeOrder
(
TbCfOrderVo
tbCfOrderVo
)
throws
IOException
,
URISyntaxException
;
/**
* 获取用户订单列表
*
* @return
*/
Result
getUserOrderList
(
Integer
pageNum
,
Integer
pageSize
);
/**
* 取消订单
*
* @param orderId
* @param userId
* @param couponId
*/
void
cancelOrder
(
String
orderId
,
String
userId
,
String
couponId
);
/**
* 获取stripe公钥
*
* @return
*/
Result
getStripePublicKey
();
/**
* 支付订单
*
* @param orderId
* @return
*/
Result
payForOrder
(
String
orderId
,
String
token
)
;
}
src/main/java/com/diaoyun/zion/chinafrica/service/TbCfPlatformService.java
0 → 100644
浏览文件 @
a0551f6c
package
com
.
diaoyun
.
zion
.
chinafrica
.
service
;
import
com.diaoyun.zion.chinafrica.entity.TbCfPlatformEntity
;
import
java.util.List
;
import
java.util.Map
;
/**
* 平台管理Service接口
*
* @author lipengjun
* @date 2019-09-05 16:51:07
*/
public
interface
TbCfPlatformService
{
/**
* 根据主键查询实体
*
* @param id 主键
* @return 实体
*/
TbCfPlatformEntity
queryObject
(
String
platformId
);
/**
* 分页查询
*
* @param map 参数
* @return list
*/
List
<
TbCfPlatformEntity
>
queryList
(
Map
<
String
,
Object
>
map
);
/**
* 分页统计总数
*
* @param map 参数
* @return 总数
*/
int
queryTotal
(
Map
<
String
,
Object
>
map
);
/**
* 保存实体
*
* @param tbCfPlatform 实体
* @return 保存条数
*/
int
save
(
TbCfPlatformEntity
tbCfPlatform
);
/**
* 根据主键更新实体
*
* @param tbCfPlatform 实体
* @return 更新条数
*/
int
update
(
TbCfPlatformEntity
tbCfPlatform
);
/**
* 根据主键删除
*
* @param platformId
* @return 删除条数
*/
int
delete
(
String
platformId
);
/**
* 根据主键批量删除
*
* @param platformIds
* @return 删除条数
*/
int
deleteBatch
(
String
[]
platformIds
);
}
src/main/java/com/diaoyun/zion/chinafrica/service/TbCfProblemService.java
0 → 100644
浏览文件 @
a0551f6c
package
com
.
diaoyun
.
zion
.
chinafrica
.
service
;
import
com.diaoyun.zion.chinafrica.entity.TbCfProblemEntity
;
import
java.util.List
;
import
java.util.Map
;
/**
* 常见问题Service接口
*
* @author lipengjun
* @date 2019-09-05 16:51:07
*/
public
interface
TbCfProblemService
{
/**
* 根据主键查询实体
*
* @param id 主键
* @return 实体
*/
TbCfProblemEntity
queryObject
(
String
problemId
);
/**
* 分页查询
*
* @param map 参数
* @return list
*/
List
<
TbCfProblemEntity
>
queryList
(
Map
<
String
,
Object
>
map
);
/**
* 分页统计总数
*
* @param map 参数
* @return 总数
*/
int
queryTotal
(
Map
<
String
,
Object
>
map
);
/**
* 保存实体
*
* @param tbCfProblem 实体
* @return 保存条数
*/
int
save
(
TbCfProblemEntity
tbCfProblem
);
/**
* 根据主键更新实体
*
* @param tbCfProblem 实体
* @return 更新条数
*/
int
update
(
TbCfProblemEntity
tbCfProblem
);
/**
* 根据主键删除
*
* @param problemId
* @return 删除条数
*/
int
delete
(
String
problemId
);
/**
* 根据主键批量删除
*
* @param problemIds
* @return 删除条数
*/
int
deleteBatch
(
String
[]
problemIds
);
}
src/main/java/com/diaoyun/zion/chinafrica/service/TbCfStationItemService.java
0 → 100644
浏览文件 @
a0551f6c
package
com
.
diaoyun
.
zion
.
chinafrica
.
service
;
import
com.diaoyun.zion.chinafrica.entity.TbCfStationItemEntity
;
import
java.util.List
;
import
java.util.Map
;
/**
* 站点商品Service接口
*
* @author lipengjun
* @date 2019-09-05 16:51:07
*/
public
interface
TbCfStationItemService
{
/**
* 根据主键查询实体
*
* @param id 主键
* @return 实体
*/
TbCfStationItemEntity
queryObject
(
String
itemId
);
/**
* 分页查询
*
* @param map 参数
* @return list
*/
List
<
TbCfStationItemEntity
>
queryList
(
Map
<
String
,
Object
>
map
);
/**
* 分页统计总数
*
* @param map 参数
* @return 总数
*/
int
queryTotal
(
Map
<
String
,
Object
>
map
);
/**
* 保存实体
*
* @param tbCfStationItem 实体
* @return 保存条数
*/
int
save
(
TbCfStationItemEntity
tbCfStationItem
);
/**
* 根据主键更新实体
*
* @param tbCfStationItem 实体
* @return 更新条数
*/
int
update
(
TbCfStationItemEntity
tbCfStationItem
);
/**
* 根据主键删除
*
* @param itemId
* @return 删除条数
*/
int
delete
(
String
itemId
);
/**
* 根据主键批量删除
*
* @param itemIds
* @return 删除条数
*/
int
deleteBatch
(
String
[]
itemIds
);
}
src/main/java/com/diaoyun/zion/chinafrica/service/TbCfStoreService.java
0 → 100644
浏览文件 @
a0551f6c
package
com
.
diaoyun
.
zion
.
chinafrica
.
service
;
import
com.diaoyun.zion.chinafrica.entity.TbCfStoreEntity
;
import
java.util.List
;
import
java.util.Map
;
/**
* 店铺管理Service接口
*
* @author lipengjun
* @date 2019-09-05 16:51:07
*/
public
interface
TbCfStoreService
{
/**
* 根据主键查询实体
*
* @param id 主键
* @return 实体
*/
TbCfStoreEntity
queryObject
(
String
storeId
);
/**
* 分页查询
*
* @param map 参数
* @return list
*/
List
<
TbCfStoreEntity
>
queryList
(
Map
<
String
,
Object
>
map
);
/**
* 分页统计总数
*
* @param map 参数
* @return 总数
*/
int
queryTotal
(
Map
<
String
,
Object
>
map
);
/**
* 保存实体
*
* @param tbCfStore 实体
* @return 保存条数
*/
int
save
(
TbCfStoreEntity
tbCfStore
);
/**
* 根据主键更新实体
*
* @param tbCfStore 实体
* @return 更新条数
*/
int
update
(
TbCfStoreEntity
tbCfStore
);
/**
* 根据主键删除
*
* @param storeId
* @return 删除条数
*/
int
delete
(
String
storeId
);
/**
* 根据主键批量删除
*
* @param storeIds
* @return 删除条数
*/
int
deleteBatch
(
String
[]
storeIds
);
}
src/main/java/com/diaoyun/zion/chinafrica/service/impl/SpiderServiceImpl.java
浏览文件 @
a0551f6c
...
...
@@ -13,6 +13,7 @@ import java.io.IOException;
import
java.math.BigDecimal
;
import
java.net.URI
;
import
java.net.URISyntaxException
;
import
java.nio.charset.Charset
;
import
java.util.*
;
import
java.util.concurrent.ExecutionException
;
...
...
@@ -76,7 +77,7 @@ public class SpiderServiceImpl implements SpiderService {
* @return
*/
private
Map
<
String
,
String
>
getParamMap
(
String
targetUrl
)
throws
URISyntaxException
{
List
<
NameValuePair
>
params
=
URLEncodedUtils
.
parse
(
new
URI
(
targetUrl
),
"UTF-8"
);
List
<
NameValuePair
>
params
=
URLEncodedUtils
.
parse
(
new
URI
(
targetUrl
),
Charset
.
forName
(
"UTF-8"
)
);
Map
<
String
,
String
>
paramMap
=
new
HashMap
<>();
for
(
NameValuePair
param
:
params
)
{
paramMap
.
put
(
param
.
getName
(),
param
.
getValue
());
...
...
src/main/java/com/diaoyun/zion/chinafrica/service/impl/TbCfAddressServiceImpl.java
浏览文件 @
a0551f6c
...
...
@@ -88,7 +88,7 @@ public class TbCfAddressServiceImpl implements TbCfAddressService {
fillNewAddressInfo
(
tbCfAddressVo
);
TbCfAddressEntity
tbCfAddressEntity
=
new
TbCfAddressEntity
();
BeanUtils
.
copyProperties
(
tbCfAddressVo
,
tbCfAddressEntity
);
t
his
.
save
(
tbCfAddressEntity
);
t
bCfAddressDao
.
save
(
tbCfAddressEntity
);
return
tbCfAddressVo
;
}
...
...
src/main/java/com/diaoyun/zion/chinafrica/service/impl/TbCfCouponServiceImpl.java
浏览文件 @
a0551f6c
...
...
@@ -9,11 +9,14 @@ import com.diaoyun.zion.chinafrica.service.TbCfCouponService;
import
com.diaoyun.zion.chinafrica.vo.TbCfUserInfoVo
;
import
com.diaoyun.zion.master.base.Result
;
import
com.diaoyun.zion.master.base.ResultCode
;
import
com.diaoyun.zion.master.base.StateConstant
;
import
com.diaoyun.zion.master.common.RedisCache
;
import
com.diaoyun.zion.master.common.TokenManager
;
import
com.diaoyun.zion.master.util.CookieUtils
;
import
com.diaoyun.zion.master.util.IdUtil
;
import
org.apache.commons.lang3.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
...
...
@@ -22,6 +25,8 @@ import java.util.Date;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.concurrent.locks.Lock
;
import
java.util.concurrent.locks.ReentrantLock
;
/**
* 优惠券表Service实现类
...
...
@@ -31,6 +36,10 @@ import java.util.Map;
*/
@Service
(
"tbCfCouponService"
)
public
class
TbCfCouponServiceImpl
implements
TbCfCouponService
{
private
static
Logger
logger
=
LoggerFactory
.
getLogger
(
TbCfCouponServiceImpl
.
class
);
// new一个锁对象,注意此处必须声明成类对象,保持只有一把锁,ReentrantLock是Lock的唯一实现类
private
Lock
lock
=
new
ReentrantLock
();
@Autowired
private
TbCfCouponDao
tbCfCouponDao
;
@Autowired
...
...
@@ -91,43 +100,71 @@ public class TbCfCouponServiceImpl implements TbCfCouponService {
if
(
takeFlag
)
{
result
.
setCode
(
ResultCode
.
ERROR
).
setMessage
(
"你已经领取了此优惠券"
);
}
else
{
//redisCache.delete(KeyConstant.COUPON);
//先从redis获取,若获取不到,则加入 TODO 修改的时候要同步修改redis
TbCfCouponEntity
tbCfCouponEntity
=
grabCoupon
(
couponId
);
if
(
tbCfCouponEntity
!=
null
)
{
//发放优惠券
giveOutCoupon
(
tbCfUserInfoVo
.
getUserId
(),
tbCfCouponEntity
);
result
.
setData
(
tbCfCouponEntity
);
result
.
setMessage
(
"领取成功"
);
}
else
{
result
.
setCode
(
ResultCode
.
ERROR
).
setMessage
(
"已经被抢光了!"
);
}
}
return
result
;
}
/**
* 抢优惠券
* 若能抢到,则返回优惠券,否则返回空
* @return
*/
private
TbCfCouponEntity
grabCoupon
(
String
couponId
)
{
TbCfCouponEntity
tbCfCouponEntity
=
null
;
//先从redis获取,若获取不到,则加入 TODO 修改的时候要同步修改redis
lock
.
lock
();
try
{
Map
<
String
,
TbCfCouponEntity
>
couponMap
=
redisCache
.
get
(
KeyConstant
.
COUPON
);
TbCfCouponEntity
tbCfCouponEntity
;
if
(
couponMap
==
null
)
{
tbCfCouponEntity
=
tbCfCouponDao
.
queryObject
(
couponId
);
couponMap
=
new
HashMap
<>();
couponMap
.
put
(
couponId
,
tbCfCouponEntity
);
redisCache
.
set
(
KeyConstant
.
COUPON
,
couponMap
);
}
else
if
(
couponMap
.
get
(
couponId
)==
null
)
{
if
(
couponMap
==
null
||
couponMap
.
get
(
couponId
)==
null
)
{
tbCfCouponEntity
=
tbCfCouponDao
.
queryObject
(
couponId
);
//takecount 需要另外统计
Integer
takeCount
=
tbCfTakeCouponDao
.
queryTakeCount
(
couponId
);
tbCfCouponEntity
.
setTakeCount
(
takeCount
);
if
(
couponMap
==
null
)
{
couponMap
=
new
HashMap
<>();
}
couponMap
.
put
(
couponId
,
tbCfCouponEntity
);
redisCache
.
set
(
KeyConstant
.
COUPON
,
couponMap
);
setCouponCache
(
couponMap
);
}
else
{
tbCfCouponEntity
=
couponMap
.
get
(
couponId
);
}
//发放数量
Integer
quato
=
tbCfCouponEntity
.
getQuato
();
//已经领取数量
Integer
takeCount
=
tbCfCouponEntity
.
getTakeCount
();
//可领取
if
(
quato
>
takeCount
)
{
//先改动redis,再入库,一定程度上减少数据的覆盖
//发放数量>已经领取数量
if
(
quato
>
tbCfCouponEntity
.
getTakeCount
())
{
//改动redis,
tbCfCouponEntity
.
setTakeCount
(
tbCfCouponEntity
.
getTakeCount
()+
1
);
tbCfCouponEntity
.
setQuato
(
tbCfCouponEntity
.
getQuato
()-
1
);
couponMap
.
put
(
couponId
,
tbCfCouponEntity
);
redisCache
.
set
(
KeyConstant
.
COUPON
,
couponMap
);
//发放优惠券
giveOutCoupon
(
tbCfUserInfoVo
.
getUserId
(),
tbCfCouponEntity
);
result
.
setMessage
(
"领取成功"
);
setCouponCache
(
couponMap
);
}
else
{
result
.
setCode
(
ResultCode
.
ERROR
).
setMessage
(
"已被抢光"
);
tbCfCouponEntity
=
null
;
logger
.
debug
(
"优惠券已被抢光"
);
}
}
catch
(
Exception
e
)
{
logger
.
error
(
e
.
getMessage
(),
e
);
}
finally
{
lock
.
unlock
();
}
return
tbCfCouponEntity
;
}
return
result
;
/**
* 设置优惠券缓存
* @param couponMap
*/
private
void
setCouponCache
(
Map
<
String
,
TbCfCouponEntity
>
couponMap
)
{
redisCache
.
set
(
KeyConstant
.
COUPON
,
couponMap
);
}
/**
...
...
@@ -152,9 +189,10 @@ public class TbCfCouponServiceImpl implements TbCfCouponService {
tbCfTakeCouponEntity
.
setCouponId
(
tbCfCoupon
.
getCouponId
());
tbCfTakeCouponEntity
.
setCreateTime
(
new
Date
());
tbCfTakeCouponEntity
.
setUserId
(
userId
);
tbCfTakeCouponEntity
.
setEnableFlag
(
StateConstant
.
VALID
);
tbCfTakeCouponDao
.
save
(
tbCfTakeCouponEntity
);
//更改原优惠券记录
update
(
tbCfCoupon
);
//更改原优惠券记录
不更改,因为会被覆盖,改为查询统计来获取已经领取的优惠券数量
//
update(tbCfCoupon);
}
}
src/main/java/com/diaoyun/zion/chinafrica/service/impl/TbCf
UseCoupon
ServiceImpl.java
→
src/main/java/com/diaoyun/zion/chinafrica/service/impl/TbCf
CouponUse
ServiceImpl.java
浏览文件 @
a0551f6c
package
com
.
diaoyun
.
zion
.
chinafrica
.
service
.
impl
;
import
com.diaoyun.zion.chinafrica.dao.TbCf
UseCoupon
Dao
;
import
com.diaoyun.zion.chinafrica.entity.TbCf
UseCoupon
Entity
;
import
com.diaoyun.zion.chinafrica.service.TbCf
UseCoupon
Service
;
import
com.diaoyun.zion.chinafrica.dao.TbCf
CouponUse
Dao
;
import
com.diaoyun.zion.chinafrica.entity.TbCf
CouponUse
Entity
;
import
com.diaoyun.zion.chinafrica.service.TbCf
CouponUse
Service
;
import
com.diaoyun.zion.master.util.IdUtil
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
@@ -15,44 +15,44 @@ import java.util.Map;
* @author G
* @date 2019-08-14 09:11:47
*/
@Service
(
"tbCf
UseCoupon
Service"
)
public
class
TbCf
UseCouponServiceImpl
implements
TbCfUseCoupon
Service
{
@Service
(
"tbCf
CouponUse
Service"
)
public
class
TbCf
CouponUseServiceImpl
implements
TbCfCouponUse
Service
{
@Autowired
private
TbCf
UseCouponDao
tbCfUseCoupon
Dao
;
private
TbCf
CouponUseDao
tbCfCouponUse
Dao
;
@Override
public
TbCf
UseCoupon
Entity
queryObject
(
String
useId
)
{
return
tbCf
UseCoupon
Dao
.
queryObject
(
useId
);
public
TbCf
CouponUse
Entity
queryObject
(
String
useId
)
{
return
tbCf
CouponUse
Dao
.
queryObject
(
useId
);
}
@Override
public
List
<
TbCf
UseCoupon
Entity
>
queryList
(
Map
<
String
,
Object
>
map
)
{
return
tbCf
UseCoupon
Dao
.
queryList
(
map
);
public
List
<
TbCf
CouponUse
Entity
>
queryList
(
Map
<
String
,
Object
>
map
)
{
return
tbCf
CouponUse
Dao
.
queryList
(
map
);
}
@Override
public
int
queryTotal
(
Map
<
String
,
Object
>
map
)
{
return
tbCf
UseCoupon
Dao
.
queryTotal
(
map
);
return
tbCf
CouponUse
Dao
.
queryTotal
(
map
);
}
@Override
public
int
save
(
TbCf
UseCouponEntity
tbCfUseCoupon
)
{
tbCf
UseCoupon
.
setUseId
(
IdUtil
.
createIdbyUUID
());
return
tbCf
UseCouponDao
.
save
(
tbCfUseCoupon
);
public
int
save
(
TbCf
CouponUseEntity
tbCfCouponUse
)
{
tbCf
CouponUse
.
setUseId
(
IdUtil
.
createIdbyUUID
());
return
tbCf
CouponUseDao
.
save
(
tbCfCouponUse
);
}
@Override
public
int
update
(
TbCf
UseCouponEntity
tbCfUseCoupon
)
{
return
tbCf
UseCouponDao
.
update
(
tbCfUseCoupon
);
public
int
update
(
TbCf
CouponUseEntity
tbCfCouponUse
)
{
return
tbCf
CouponUseDao
.
update
(
tbCfCouponUse
);
}
@Override
public
int
delete
(
String
useId
)
{
return
tbCf
UseCoupon
Dao
.
delete
(
useId
);
return
tbCf
CouponUse
Dao
.
delete
(
useId
);
}
@Override
public
int
deleteBatch
(
String
[]
useIds
)
{
return
tbCf
UseCoupon
Dao
.
deleteBatch
(
useIds
);
return
tbCf
CouponUse
Dao
.
deleteBatch
(
useIds
);
}
}
src/main/java/com/diaoyun/zion/chinafrica/service/impl/TbCfFeedbackServiceImpl.java
0 → 100644
浏览文件 @
a0551f6c
package
com
.
diaoyun
.
zion
.
chinafrica
.
service
.
impl
;
import
com.diaoyun.zion.chinafrica.dao.TbCfFeedbackDao
;
import
com.diaoyun.zion.chinafrica.entity.TbCfFeedbackEntity
;
import
com.diaoyun.zion.chinafrica.service.TbCfFeedbackService
;
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-09-05 16:51:07
*/
@Service
(
"tbCfFeedbackService"
)
public
class
TbCfFeedbackServiceImpl
implements
TbCfFeedbackService
{
@Autowired
private
TbCfFeedbackDao
tbCfFeedbackDao
;
@Override
public
TbCfFeedbackEntity
queryObject
(
String
feedbackId
)
{
return
tbCfFeedbackDao
.
queryObject
(
feedbackId
);
}
@Override
public
List
<
TbCfFeedbackEntity
>
queryList
(
Map
<
String
,
Object
>
map
)
{
return
tbCfFeedbackDao
.
queryList
(
map
);
}
@Override
public
int
queryTotal
(
Map
<
String
,
Object
>
map
)
{
return
tbCfFeedbackDao
.
queryTotal
(
map
);
}
@Override
public
int
save
(
TbCfFeedbackEntity
tbCfFeedback
)
{
tbCfFeedback
.
setFeedbackId
(
IdUtil
.
createIdbyUUID
());
return
tbCfFeedbackDao
.
save
(
tbCfFeedback
);
}
@Override
public
int
update
(
TbCfFeedbackEntity
tbCfFeedback
)
{
return
tbCfFeedbackDao
.
update
(
tbCfFeedback
);
}
@Override
public
int
delete
(
String
feedbackId
)
{
return
tbCfFeedbackDao
.
delete
(
feedbackId
);
}
@Override
public
int
deleteBatch
(
String
[]
feedbackIds
)
{
return
tbCfFeedbackDao
.
deleteBatch
(
feedbackIds
);
}
}
src/main/java/com/diaoyun/zion/chinafrica/service/impl/TbCfItemDetailServiceImpl.java
浏览文件 @
a0551f6c
...
...
@@ -127,6 +127,16 @@ public class TbCfItemDetailServiceImpl implements TbCfItemDetailService {
return
TbCfCartItemDetailList
;
}
@Override
public
Result
changeItemState
(
String
cartRecordId
,
Integer
checkFlag
)
{
Result
result
=
new
Result
(
"修改成功"
);
int
res
=
tbCfItemDetailDao
.
changeItemState
(
cartRecordId
,
checkFlag
);
if
(
res
<
1
)
{
result
.
setMessage
(
"修改失败"
);
}
return
result
;
}
/**
* 填充新商品必要信息
* @param tbCfItemDetailVo
...
...
src/main/java/com/diaoyun/zion/chinafrica/service/impl/TbCfOrderServiceImpl.java
浏览文件 @
a0551f6c
差异被折叠。
点击展开。
src/main/java/com/diaoyun/zion/chinafrica/service/impl/TbCfPlatformServiceImpl.java
0 → 100644
浏览文件 @
a0551f6c
package
com
.
diaoyun
.
zion
.
chinafrica
.
service
.
impl
;
import
com.diaoyun.zion.chinafrica.dao.TbCfPlatformDao
;
import
com.diaoyun.zion.chinafrica.entity.TbCfPlatformEntity
;
import
com.diaoyun.zion.chinafrica.service.TbCfPlatformService
;
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-09-05 16:51:07
*/
@Service
(
"tbCfPlatformService"
)
public
class
TbCfPlatformServiceImpl
implements
TbCfPlatformService
{
@Autowired
private
TbCfPlatformDao
tbCfPlatformDao
;
@Override
public
TbCfPlatformEntity
queryObject
(
String
platformId
)
{
return
tbCfPlatformDao
.
queryObject
(
platformId
);
}
@Override
public
List
<
TbCfPlatformEntity
>
queryList
(
Map
<
String
,
Object
>
map
)
{
return
tbCfPlatformDao
.
queryList
(
map
);
}
@Override
public
int
queryTotal
(
Map
<
String
,
Object
>
map
)
{
return
tbCfPlatformDao
.
queryTotal
(
map
);
}
@Override
public
int
save
(
TbCfPlatformEntity
tbCfPlatform
)
{
tbCfPlatform
.
setPlatformId
(
IdUtil
.
createIdbyUUID
());
return
tbCfPlatformDao
.
save
(
tbCfPlatform
);
}
@Override
public
int
update
(
TbCfPlatformEntity
tbCfPlatform
)
{
return
tbCfPlatformDao
.
update
(
tbCfPlatform
);
}
@Override
public
int
delete
(
String
platformId
)
{
return
tbCfPlatformDao
.
delete
(
platformId
);
}
@Override
public
int
deleteBatch
(
String
[]
platformIds
)
{
return
tbCfPlatformDao
.
deleteBatch
(
platformIds
);
}
}
src/main/java/com/diaoyun/zion/chinafrica/service/impl/TbCfProblemServiceImpl.java
0 → 100644
浏览文件 @
a0551f6c
package
com
.
diaoyun
.
zion
.
chinafrica
.
service
.
impl
;
import
com.diaoyun.zion.chinafrica.dao.TbCfProblemDao
;
import
com.diaoyun.zion.chinafrica.entity.TbCfProblemEntity
;
import
com.diaoyun.zion.chinafrica.service.TbCfProblemService
;
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-09-05 16:51:07
*/
@Service
(
"tbCfProblemService"
)
public
class
TbCfProblemServiceImpl
implements
TbCfProblemService
{
@Autowired
private
TbCfProblemDao
tbCfProblemDao
;
@Override
public
TbCfProblemEntity
queryObject
(
String
problemId
)
{
return
tbCfProblemDao
.
queryObject
(
problemId
);
}
@Override
public
List
<
TbCfProblemEntity
>
queryList
(
Map
<
String
,
Object
>
map
)
{
return
tbCfProblemDao
.
queryList
(
map
);
}
@Override
public
int
queryTotal
(
Map
<
String
,
Object
>
map
)
{
return
tbCfProblemDao
.
queryTotal
(
map
);
}
@Override
public
int
save
(
TbCfProblemEntity
tbCfProblem
)
{
tbCfProblem
.
setProblemId
(
IdUtil
.
createIdbyUUID
());
return
tbCfProblemDao
.
save
(
tbCfProblem
);
}
@Override
public
int
update
(
TbCfProblemEntity
tbCfProblem
)
{
return
tbCfProblemDao
.
update
(
tbCfProblem
);
}
@Override
public
int
delete
(
String
problemId
)
{
return
tbCfProblemDao
.
delete
(
problemId
);
}
@Override
public
int
deleteBatch
(
String
[]
problemIds
)
{
return
tbCfProblemDao
.
deleteBatch
(
problemIds
);
}
}
src/main/java/com/diaoyun/zion/chinafrica/service/impl/TbCfStationItemServiceImpl.java
0 → 100644
浏览文件 @
a0551f6c
package
com
.
diaoyun
.
zion
.
chinafrica
.
service
.
impl
;
import
com.diaoyun.zion.chinafrica.dao.TbCfStationItemDao
;
import
com.diaoyun.zion.chinafrica.entity.TbCfStationItemEntity
;
import
com.diaoyun.zion.chinafrica.service.TbCfStationItemService
;
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-09-05 16:51:07
*/
@Service
(
"tbCfStationItemService"
)
public
class
TbCfStationItemServiceImpl
implements
TbCfStationItemService
{
@Autowired
private
TbCfStationItemDao
tbCfStationItemDao
;
@Override
public
TbCfStationItemEntity
queryObject
(
String
itemId
)
{
return
tbCfStationItemDao
.
queryObject
(
itemId
);
}
@Override
public
List
<
TbCfStationItemEntity
>
queryList
(
Map
<
String
,
Object
>
map
)
{
return
tbCfStationItemDao
.
queryList
(
map
);
}
@Override
public
int
queryTotal
(
Map
<
String
,
Object
>
map
)
{
return
tbCfStationItemDao
.
queryTotal
(
map
);
}
@Override
public
int
save
(
TbCfStationItemEntity
tbCfStationItem
)
{
tbCfStationItem
.
setItemId
(
IdUtil
.
createIdbyUUID
());
return
tbCfStationItemDao
.
save
(
tbCfStationItem
);
}
@Override
public
int
update
(
TbCfStationItemEntity
tbCfStationItem
)
{
return
tbCfStationItemDao
.
update
(
tbCfStationItem
);
}
@Override
public
int
delete
(
String
itemId
)
{
return
tbCfStationItemDao
.
delete
(
itemId
);
}
@Override
public
int
deleteBatch
(
String
[]
itemIds
)
{
return
tbCfStationItemDao
.
deleteBatch
(
itemIds
);
}
}
src/main/java/com/diaoyun/zion/chinafrica/service/impl/TbCfStoreServiceImpl.java
0 → 100644
浏览文件 @
a0551f6c
package
com
.
diaoyun
.
zion
.
chinafrica
.
service
.
impl
;
import
com.diaoyun.zion.chinafrica.dao.TbCfStoreDao
;
import
com.diaoyun.zion.chinafrica.entity.TbCfStoreEntity
;
import
com.diaoyun.zion.chinafrica.service.TbCfStoreService
;
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-09-05 16:51:07
*/
@Service
(
"tbCfStoreService"
)
public
class
TbCfStoreServiceImpl
implements
TbCfStoreService
{
@Autowired
private
TbCfStoreDao
tbCfStoreDao
;
@Override
public
TbCfStoreEntity
queryObject
(
String
storeId
)
{
return
tbCfStoreDao
.
queryObject
(
storeId
);
}
@Override
public
List
<
TbCfStoreEntity
>
queryList
(
Map
<
String
,
Object
>
map
)
{
return
tbCfStoreDao
.
queryList
(
map
);
}
@Override
public
int
queryTotal
(
Map
<
String
,
Object
>
map
)
{
return
tbCfStoreDao
.
queryTotal
(
map
);
}
@Override
public
int
save
(
TbCfStoreEntity
tbCfStore
)
{
tbCfStore
.
setStoreId
(
IdUtil
.
createIdbyUUID
());
return
tbCfStoreDao
.
save
(
tbCfStore
);
}
@Override
public
int
update
(
TbCfStoreEntity
tbCfStore
)
{
return
tbCfStoreDao
.
update
(
tbCfStore
);
}
@Override
public
int
delete
(
String
storeId
)
{
return
tbCfStoreDao
.
delete
(
storeId
);
}
@Override
public
int
deleteBatch
(
String
[]
storeIds
)
{
return
tbCfStoreDao
.
deleteBatch
(
storeIds
);
}
}
src/main/java/com/diaoyun/zion/chinafrica/service/impl/TbCfUserInfoServiceImpl.java
浏览文件 @
a0551f6c
...
...
@@ -130,6 +130,7 @@ public class TbCfUserInfoServiceImpl implements TbCfUserInfoService {
*/
//目前有验证码的都是邮箱类型
tbCfUserInfoVo
.
setUserType
(
UserTypeEnum
.
EMAIL
.
getCode
());
tbCfUserInfoVo
.
setEmailFlag
(
StateConstant
.
VALID
);
fillUserNecessayInfo
(
tbCfUserInfoVo
);
//加密密码
String
password
=
PasswordProvider
.
encrypt
(
tbCfUserInfoVo
.
getPassword
());
...
...
@@ -195,6 +196,14 @@ public class TbCfUserInfoServiceImpl implements TbCfUserInfoService {
return
result
;
}
/**
* 登录
* @param ip
* @param account
* @param password
* @param token
* @return
*/
private
Result
loginOfficial
(
String
ip
,
String
account
,
String
password
,
String
token
)
{
Result
result
=
new
Result
();
...
...
src/main/java/com/diaoyun/zion/chinafrica/vo/DetailParamVo.java
0 → 100644
浏览文件 @
a0551f6c
package
com
.
diaoyun
.
zion
.
chinafrica
.
vo
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
/**
* 获取商品详情封装参数
*/
@ApiModel
public
class
DetailParamVo
{
//目标url
@ApiModelProperty
(
value
=
"商品url"
,
name
=
"targetUrl"
)
private
String
targetUrl
;
public
String
getTargetUrl
()
{
return
targetUrl
;
}
public
void
setTargetUrl
(
String
targetUrl
)
{
this
.
targetUrl
=
targetUrl
;
}
}
src/main/java/com/diaoyun/zion/chinafrica/vo/TbCfAddressVo.java
浏览文件 @
a0551f6c
package
com
.
diaoyun
.
zion
.
chinafrica
.
vo
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
java.io.Serializable
;
import
java.util.Date
;
...
...
@@ -10,68 +13,84 @@ import java.util.Date;
* @author G
* @date 2019-08-16 15:51:16
*/
@ApiModel
public
class
TbCfAddressVo
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 地址id
*/
@ApiModelProperty
(
"地址id"
)
private
String
addressId
;
/**
* 用户id
*/
@ApiModelProperty
(
"用户id"
)
private
String
userId
;
/**
* 收货人
*/
@ApiModelProperty
(
"收货人"
)
private
String
deliveryName
;
/**
* 联系电话
*/
@ApiModelProperty
(
"联系电话"
)
private
String
phone
;
/**
* 是否为默认地址
*/
@ApiModelProperty
(
"是否为默认地址"
)
private
Integer
defaultFlag
;
/**
* 地址详情
*/
@ApiModelProperty
(
"地址详情"
)
private
String
addressDetail
;
/**
* 所在国家code
*/
@ApiModelProperty
(
"所在国家code"
)
private
String
addressCountryCode
;
/**
* 所在国家
*/
@ApiModelProperty
(
"所在国家"
)
private
String
addressCountryName
;
/**
* 所在州code
*/
@ApiModelProperty
(
"所在州code"
)
private
String
addressStateCode
;
/**
* 所在州
*/
@ApiModelProperty
(
"所在州"
)
private
String
addressStateName
;
/**
* 所在区code
*/
@ApiModelProperty
(
"所在区code"
)
private
String
addressAreaCode
;
/**
* 所在区
*/
@ApiModelProperty
(
"所在区"
)
private
String
addressAreaName
;
/**
* 标签code
*/
@ApiModelProperty
(
"标签code"
)
private
String
labelCode
;
/**
* 创建时间
*/
@ApiModelProperty
(
"创建时间"
)
private
Date
createTime
;
/**
* 修改时间
*/
@ApiModelProperty
(
"修改时间"
)
private
Date
updateTime
;
/**
...
...
src/main/java/com/diaoyun/zion/chinafrica/vo/TbCfCartItemDetailVo.java
浏览文件 @
a0551f6c
package
com
.
diaoyun
.
zion
.
chinafrica
.
vo
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
import
java.util.Date
;
...
...
@@ -11,72 +14,89 @@ import java.util.Date;
* @author G
* @date 2019-08-16 15:51:16
*/
@ApiModel
public
class
TbCfCartItemDetailVo
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 购物车记录id
*/
@ApiModelProperty
(
"购物车记录id"
)
private
String
cartRecordId
;
/**
* 是否已经被勾选,0未勾选,1勾选
*/
@ApiModelProperty
(
"是否已经被勾选,0未勾选,1勾选"
)
private
Integer
checkFlag
;
/**
* 商品表记录id
*/
@ApiModelProperty
(
"商品表记录id"
)
private
String
itemId
;
/**
* 商品id,源平台的id,不一定有
*/
@ApiModelProperty
(
"源平台的商品id,不一定有"
)
private
String
sourceItemId
;
/**
* 来源站点id
*/
@ApiModelProperty
(
"来源站点id"
)
private
String
stationId
;
/**
* 站点类型
*/
@ApiModelProperty
(
"站点类型"
)
private
Integer
stationType
;
/**
* 商品名称
*/
@ApiModelProperty
(
"商品名称"
)
private
String
itemTitle
;
/**
* 商品数量
*/
@ApiModelProperty
(
"商品数量"
)
private
Integer
itemNum
;
/**
* 商品主图
*/
@ApiModelProperty
(
"商品主图"
)
private
String
itemImg
;
/**
* 商品价格
*/
@ApiModelProperty
(
"商品价格"
)
private
BigDecimal
itemPrice
;
/**
* 商品分类
*/
@ApiModelProperty
(
"商品分类"
)
private
String
itemCategory
;
/**
* 商品skus
*/
@ApiModelProperty
(
"商品skus"
)
private
String
itemSku
;
/**
* 所属店铺id
*/
@ApiModelProperty
(
"所属店铺id"
)
private
String
shopId
;
/**
* 所属商铺名
*/
@ApiModelProperty
(
"所属商铺名"
)
private
String
shopName
;
/**
* 所属商铺链接
*/
@ApiModelProperty
(
"所属商铺链接"
)
private
String
shopUrl
;
/**
* 创建时间
*/
@ApiModelProperty
(
"创建时间"
)
private
Date
createTime
;
/**
...
...
@@ -246,4 +266,20 @@ public class TbCfCartItemDetailVo implements Serializable {
public
void
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
}
public
String
getCartRecordId
()
{
return
cartRecordId
;
}
public
void
setCartRecordId
(
String
cartRecordId
)
{
this
.
cartRecordId
=
cartRecordId
;
}
public
Integer
getCheckFlag
()
{
return
checkFlag
;
}
public
void
setCheckFlag
(
Integer
checkFlag
)
{
this
.
checkFlag
=
checkFlag
;
}
}
src/main/java/com/diaoyun/zion/chinafrica/vo/TbCfItemDetailVo.java
浏览文件 @
a0551f6c
package
com
.
diaoyun
.
zion
.
chinafrica
.
vo
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
import
java.util.Date
;
...
...
@@ -11,64 +14,79 @@ import java.util.Date;
* @author G
* @date 2019-08-16 15:51:16
*/
@ApiModel
public
class
TbCfItemDetailVo
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 商品表记录id
*/
@ApiModelProperty
(
"商品表记录id"
)
private
String
itemId
;
/**
* 商品id,源平台的id,不一定有
*/
@ApiModelProperty
(
"源平台的商品id,不一定有"
)
private
String
sourceItemId
;
/**
* 来源站点id
*/
@ApiModelProperty
(
"来源站点id"
)
private
String
stationId
;
/**
* 站点类型
* 站点类型
1为商品独立站 2为店铺独立站 3为平台独立站
*/
@ApiModelProperty
(
"站点类型 1为商品独立站 2为店铺独立站 3为平台独立站"
)
private
Integer
stationType
;
/**
* 商品名称
*/
@ApiModelProperty
(
"商品标题"
)
private
String
itemTitle
;
/**
* 商品数量
*/
@ApiModelProperty
(
"商品数量"
)
private
Integer
itemNum
;
/**
* 商品主图
*/
@ApiModelProperty
(
"商品主图地址"
)
private
String
itemImg
;
/**
* 商品价格
*/
@ApiModelProperty
(
"商品价格"
)
private
BigDecimal
itemPrice
;
/**
* 商品分类
*/
@ApiModelProperty
(
"商品分类"
)
private
String
itemCategory
;
/**
* 商品skus
*/
@ApiModelProperty
(
"商品skus(比如 颜色:蓝色;尺寸:M)"
)
private
String
itemSku
;
/**
* 所属店铺id
*/
@ApiModelProperty
(
"所属店铺id"
)
private
String
shopId
;
/**
* 所属商铺名
*/
@ApiModelProperty
(
"所属商铺名"
)
private
String
shopName
;
/**
* 所属商铺链接
*/
@ApiModelProperty
(
"所属商铺链接"
)
private
String
shopUrl
;
/**
* 创建时间
*/
@ApiModelProperty
(
"创建时间"
)
private
Date
createTime
;
/**
...
...
src/main/java/com/diaoyun/zion/chinafrica/vo/TbCfOrderVo.java
浏览文件 @
a0551f6c
package
com
.
diaoyun
.
zion
.
chinafrica
.
vo
;
import
com.diaoyun.zion.chinafrica.entity.TbCfCouponEntity
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
...
...
@@ -14,129 +16,160 @@ import java.util.List;
* @author G
* @date 2019-08-14 09:11:48
*/
@ApiModel
public
class
TbCfOrderVo
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 订单id
*/
@ApiModelProperty
(
"订单id"
)
private
String
orderId
;
/**
* 订单号
*/
@ApiModelProperty
(
"订单号"
)
private
Long
orderNo
;
/**
* 订单名
*/
@ApiModelProperty
(
"订单名"
)
private
String
orderName
;
/**
* 订单创建时间
*/
@ApiModelProperty
(
"订单创建时间"
)
private
Date
orderTime
;
/**
* 更新时间
*/
@ApiModelProperty
(
"更新时间"
)
private
Date
updateTime
;
/**
* 成交时间
*/
@ApiModelProperty
(
"成交时间"
)
private
Date
dealTime
;
/**
* 交易关闭时间
*/
@ApiModelProperty
(
"交易关闭时间"
)
private
Date
closeTime
;
/**
* 订单状态(0取消,10未付款,20已付款,40已发货,50交易成功,60交易关闭)
*/
@ApiModelProperty
(
"订单状态(0取消,10未付款,20已付款,40已发货,50交易成功,60交易关闭)"
)
private
Integer
orderStatus
;
/**
* 用户id
*/
@ApiModelProperty
(
"用户id"
)
private
String
userId
;
/**
* 用户名
*/
@ApiModelProperty
(
"用户名"
)
private
String
userName
;
/**
* 收货地址Id
*/
@ApiModelProperty
(
"收货地址Id"
)
private
String
deliveryAddressId
;
/**
* 收货地址
*/
@ApiModelProperty
(
"收货地址"
)
private
String
deliveryAddress
;
/**
* 收货人
*/
@ApiModelProperty
(
"收货人"
)
private
String
deliveryName
;
/**
* 收货人手机
*/
@ApiModelProperty
(
"收货人手机"
)
private
String
deliveryPhone
;
/**
* 商品总价
*/
@ApiModelProperty
(
"商品总价"
)
private
BigDecimal
itemsPrice
;
/**
* 总价
*/
@ApiModelProperty
(
"总价"
)
private
BigDecimal
totalPrice
;
/**
* 实际付款
*/
@ApiModelProperty
(
"实际付款"
)
private
BigDecimal
realityPay
;
/**
* 发货标志
*/
@ApiModelProperty
(
"发货标志"
)
private
Integer
deliveryFlag
;
/**
* 发货时间
*/
@ApiModelProperty
(
"发货时间"
)
private
Date
deliveryTime
;
/**
* 快递费
*/
@ApiModelProperty
(
"快递费"
)
private
BigDecimal
expressCost
;
/**
* 优惠券id
*/
@ApiModelProperty
(
"优惠券id"
)
private
String
couponId
;
/**
* 优惠券标题
*/
@ApiModelProperty
(
"优惠券标题"
)
private
String
couponTitle
;
/**
* 优惠券减免价格
*/
@ApiModelProperty
(
"优惠券减免价格"
)
private
BigDecimal
couponPrice
;
/**
* 手续费
*/
@ApiModelProperty
(
"手续费"
)
private
BigDecimal
fee
;
/**
* 税务费
*/
@ApiModelProperty
(
"税务费"
)
private
BigDecimal
tax
;
/**
* 交易号
*/
@ApiModelProperty
(
"交易号"
)
private
String
payId
;
/**
* 支付状态,0未支付,1已支付
*/
@ApiModelProperty
(
"支付状态,0未支付,1已支付"
)
private
Integer
payStatus
;
/**
* 可用优惠券
*/
@ApiModelProperty
(
"可用优惠券"
)
private
List
<
TbCfCouponEntity
>
usableCouponList
;
/**
* 不可用优惠券
*/
@ApiModelProperty
(
"不可用优惠券"
)
private
List
<
TbCfCouponEntity
>
unusableCouponList
;
/**
* 订单中的商品
*/
@ApiModelProperty
(
"订单中的商品"
)
private
List
<
TbCfCartItemDetailVo
>
itemDetailList
;
/**
...
...
src/main/java/com/diaoyun/zion/chinafrica/vo/TbCfUserInfoVo.java
浏览文件 @
a0551f6c
package
com
.
diaoyun
.
zion
.
chinafrica
.
vo
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
java.io.Serializable
;
import
java.util.Date
;
...
...
@@ -10,97 +13,120 @@ import java.util.Date;
* @author G
* @date 2019-08-14 09:11:47
*/
@ApiModel
public
class
TbCfUserInfoVo
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 用户id
*/
@ApiModelProperty
(
value
=
"用户id"
,
name
=
"userId"
)
private
String
userId
;
/**
* 用户编号
*/
@ApiModelProperty
(
value
=
"用户编号(用于展示而已)"
,
name
=
"userNo"
)
private
String
userNo
;
/**
* 用户类型(1邮箱、2facebook、3手机)
*/
@ApiModelProperty
(
value
=
"用户类型(1邮箱、2facebook、3手机)"
,
name
=
"userType"
)
private
Integer
userType
;
/**
* 账号
*/
@ApiModelProperty
(
value
=
"账号"
,
name
=
"account"
,
required
=
true
)
private
String
account
;
/**
* 用户头像地址
*/
@ApiModelProperty
(
value
=
"用户头像地址"
)
private
String
avatar
;
/**
* 用户名
*/
@ApiModelProperty
(
value
=
"用户名"
,
required
=
true
)
private
String
nick
;
/**
* 电话号码
*/
@ApiModelProperty
(
value
=
"电话号码"
)
private
String
phone
;
/**
* 是否绑定手机
*/
@ApiModelProperty
(
value
=
"是否绑定手机"
)
private
Integer
phoneFlag
;
/**
* 密码
*/
@ApiModelProperty
(
value
=
"密码"
,
required
=
true
)
private
String
password
;
/**
* 上一次登录时间
*/
@ApiModelProperty
(
value
=
"上一次登录时间"
)
private
Date
lastLoginTime
;
/**
* 上一次登录IP
*/
@ApiModelProperty
(
value
=
"上一次登录IP"
)
private
String
lastLoginIp
;
/**
* 登录次数
*/
@ApiModelProperty
(
value
=
"登录次数"
)
private
Integer
loginCount
;
/**
* 邮箱
*/
@ApiModelProperty
(
value
=
"邮箱"
,
required
=
true
)
private
String
email
;
/**
* 邮箱验证 0未验证,1已验证
*/
@ApiModelProperty
(
value
=
"邮箱验证 0未验证,1已验证"
)
private
Integer
emailFlag
;
/**
* facebook账号
*/
@ApiModelProperty
(
value
=
"facebook账号"
)
private
String
facebook
;
/**
* 创建时间
*/
@ApiModelProperty
(
value
=
"创建时间"
)
private
Date
createTime
;
/**
* 性别
*/
@ApiModelProperty
(
value
=
"性别"
)
private
Integer
sex
;
/**
* 默认地址id
*/
@ApiModelProperty
(
value
=
"默认地址id"
)
private
String
defaultAddressId
;
/**
* 发出邀请的用户
*/
@ApiModelProperty
(
value
=
"发出邀请的用户"
)
private
String
invitedUserId
;
/**
* 总共邀请数量
* 总共邀请
用户的
数量
*/
@ApiModelProperty
(
value
=
"总共邀请用户的数量"
)
private
Integer
invitedCount
;
/**
* 是否有效
*/
@ApiModelProperty
(
value
=
"是否有效"
)
private
Integer
enableFlag
;
/**
* 验证码
*/
@ApiModelProperty
(
value
=
"验证码"
,
required
=
true
)
private
Integer
captcha
;
...
...
src/main/java/com/diaoyun/zion/master/common/LocalTokenManager.java
浏览文件 @
a0551f6c
...
...
@@ -71,7 +71,7 @@ public class LocalTokenManager extends TokenManager {
* @param dummyUser
*/
private
void
extendExpiredTime
(
DummyUser
dummyUser
)
{
String
expiredTime
=
domainProperties
.
getProperty
(
"token.expiredTime"
);
String
expiredTime
=
domainProperties
.
getProperty
(
"
redis.
token.expiredTime"
);
Integer
expired
=
1800
;
if
(
StringUtils
.
isNotBlank
(
expiredTime
))
{
expired
=
Integer
.
valueOf
(
expiredTime
);
...
...
src/main/java/com/diaoyun/zion/master/common/RedisTokenManager.java
浏览文件 @
a0551f6c
...
...
@@ -22,7 +22,7 @@ public class RedisTokenManager extends TokenManager {
@Override
public
void
addToken
(
String
token
,
TbCfUserInfoVo
loginUser
)
{
String
timeStr
=
domainProperties
.
getProperty
(
"token.expiredTime"
);
String
timeStr
=
domainProperties
.
getProperty
(
"
redis.
token.expiredTime"
);
long
expiredTime
=
tokenTimeout
;
if
(
StringUtils
.
isNotBlank
(
timeStr
))
{
expiredTime
=
Long
.
valueOf
(
timeStr
);
...
...
src/main/java/com/diaoyun/zion/master/config/RedisConfig.java
浏览文件 @
a0551f6c
...
...
@@ -4,6 +4,9 @@ import org.springframework.context.annotation.Bean;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.data.redis.connection.RedisConnectionFactory
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.data.redis.listener.RedisMessageListenerContainer
;
import
org.springframework.data.redis.serializer.GenericJackson2JsonRedisSerializer
;
import
org.springframework.data.redis.serializer.StringRedisSerializer
;
@Configuration
public
class
RedisConfig
<
T
>
{
...
...
@@ -13,6 +16,17 @@ public class RedisConfig<T> {
RedisConnectionFactory
redisConnectionFactory
)
{
RedisTemplate
<
String
,
T
>
template
=
new
RedisTemplate
<>();
template
.
setConnectionFactory
(
redisConnectionFactory
);
template
.
setKeySerializer
(
new
StringRedisSerializer
());
template
.
setValueSerializer
(
new
GenericJackson2JsonRedisSerializer
());
return
template
;
}
@Bean
RedisMessageListenerContainer
container
(
RedisConnectionFactory
connectionFactory
)
{
RedisMessageListenerContainer
container
=
new
RedisMessageListenerContainer
();
container
.
setConnectionFactory
(
connectionFactory
);
return
container
;
}
}
src/main/java/com/diaoyun/zion/master/listener/RedisKeyExpirationListener.java
0 → 100644
浏览文件 @
a0551f6c
package
com
.
diaoyun
.
zion
.
master
.
listener
;
import
com.diaoyun.zion.chinafrica.constant.KeyConstant
;
import
com.diaoyun.zion.chinafrica.service.TbCfOrderService
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.redis.connection.Message
;
import
org.springframework.data.redis.listener.KeyExpirationEventMessageListener
;
import
org.springframework.data.redis.listener.RedisMessageListenerContainer
;
import
org.springframework.stereotype.Component
;
@Component
public
class
RedisKeyExpirationListener
extends
KeyExpirationEventMessageListener
{
@Autowired
private
TbCfOrderService
tbCfOrderService
;
public
RedisKeyExpirationListener
(
RedisMessageListenerContainer
listenerContainer
)
{
super
(
listenerContainer
);
}
/**
* 针对redis数据失效事件,进行数据处理
* 需要配置redis文件 notify-keyspace-events Ex
* @param message
* @param pattern
*/
@Override
public
void
onMessage
(
Message
message
,
byte
[]
pattern
)
{
// 用户做自己的业务处理即可,注意message.toString()可以获取失效的key
String
expiredKey
=
message
.
toString
();
if
(
expiredKey
.
startsWith
(
KeyConstant
.
ORDER_EXP
)){
String
substring
=
expiredKey
.
substring
(
KeyConstant
.
ORDER_EXP
.
length
());
//去掉orderNo
//: 隔开 第一个为orderId,第二个为userId,第三个为couponId 用优惠券才有
String
info
[]=
substring
.
split
(
":"
,-
1
);
//取消订单,那么要返回优惠券,以及更改订单状态为关闭交易
tbCfOrderService
.
cancelOrder
(
info
[
0
],
info
[
1
],
info
[
2
]);
}
}
}
src/main/java/com/diaoyun/zion/master/thread/TranslateCallable.java
浏览文件 @
a0551f6c
...
...
@@ -21,9 +21,9 @@ import java.util.concurrent.Callable;
public
class
TranslateCallable
extends
AbstractTencentCallable
<
TencentTranslateParam
>
{
//private static Logger logger = LoggerFactory.getLogger(TranslateCallable.class);
private
static
DomainProperties
domainProperties
=(
DomainProperties
)
SpringContextUtil
.
getBean
(
"domainProperties"
);
public
TranslateCallable
(
TencentTranslateParam
param
)
{
DomainProperties
domainProperties
=
(
DomainProperties
)
SpringContextUtil
.
getBean
(
"domainProperties"
);
this
.
app_id
=
Integer
.
valueOf
(
domainProperties
.
getProperty
(
"tencent.translate.app_id"
));
this
.
app_url
=
domainProperties
.
getProperty
(
"tencent.translate.app_url"
);
this
.
param
=
param
;
...
...
src/main/java/com/diaoyun/zion/master/thread/WordposCallable.java
浏览文件 @
a0551f6c
...
...
@@ -13,10 +13,9 @@ import java.util.Map;
public
class
WordposCallable
extends
AbstractTencentCallable
<
TencentWordsegParam
>{
//private static Logger logger = LoggerFactory.getLogger(WordposCallable.class);
private
static
DomainProperties
domainProperties
=
(
DomainProperties
)
SpringContextUtil
.
getBean
(
"domainProperties"
);
public
WordposCallable
(
TencentWordsegParam
param
)
{
DomainProperties
domainProperties
=
(
DomainProperties
)
SpringContextUtil
.
getBean
(
"domainProperties"
);
this
.
app_id
=
Integer
.
valueOf
(
domainProperties
.
getProperty
(
"tencent.translate.app_id"
));
this
.
app_url
=
domainProperties
.
getProperty
(
"tencent.wordpos.app_url"
);
this
.
param
=
param
;
...
...
src/main/java/com/diaoyun/zion/master/util/AESUtils.java
0 → 100644
浏览文件 @
a0551f6c
package
com
.
diaoyun
.
zion
.
master
.
util
;
import
org.springframework.util.Base64Utils
;
import
javax.crypto.Cipher
;
import
javax.crypto.spec.IvParameterSpec
;
import
javax.crypto.spec.SecretKeySpec
;
/**
* 对称加密(AES)
*
* @author Joe
*/
public
class
AESUtils
{
public
static
final
String
INIT_VECTOR
=
"RandomInitVector"
;
/**
* 加密
* @param key 密钥
* @param value 加密数据
* @return
*/
public
static
String
encrypt
(
String
key
,
String
value
)
{
try
{
IvParameterSpec
iv
=
new
IvParameterSpec
(
INIT_VECTOR
.
getBytes
(
"UTF-8"
));
SecretKeySpec
skeySpec
=
new
SecretKeySpec
(
key
.
getBytes
(
"UTF-8"
),
"AES"
);
Cipher
cipher
=
Cipher
.
getInstance
(
"AES/CBC/PKCS5PADDING"
);
cipher
.
init
(
Cipher
.
ENCRYPT_MODE
,
skeySpec
,
iv
);
byte
[]
encrypted
=
cipher
.
doFinal
(
value
.
getBytes
());
return
Base64Utils
.
encodeToString
(
encrypted
);
}
catch
(
Exception
ex
)
{
ex
.
printStackTrace
();
}
return
null
;
}
/**
* 解密
* @param key 密钥
* @param encrypted 解密数据
* @return
*/
public
static
String
decrypt
(
String
key
,
String
encrypted
)
{
try
{
IvParameterSpec
iv
=
new
IvParameterSpec
(
INIT_VECTOR
.
getBytes
(
"UTF-8"
));
SecretKeySpec
skeySpec
=
new
SecretKeySpec
(
key
.
getBytes
(
"UTF-8"
),
"AES"
);
Cipher
cipher
=
Cipher
.
getInstance
(
"AES/CBC/PKCS5PADDING"
);
cipher
.
init
(
Cipher
.
DECRYPT_MODE
,
skeySpec
,
iv
);
byte
[]
original
=
cipher
.
doFinal
(
Base64Utils
.
decodeFromString
(
encrypted
));
return
new
String
(
original
);
}
catch
(
Exception
ex
)
{
ex
.
printStackTrace
();
}
return
null
;
}
/*public static void main(String[] args) {
String key = "``11qqaazzxxccvv"; // 128 bit key
System.out.println(encrypt(key, "123"));
System.out.println(decrypt(key, encrypt(key, "123")));
}*/
}
src/main/java/com/diaoyun/zion/master/util/EmailHelper.java
浏览文件 @
a0551f6c
...
...
@@ -30,7 +30,7 @@ public class EmailHelper {
Template
t
=
configuration
.
getTemplate
(
templateName
);
Map
<
String
,
Object
>
model
=
new
HashMap
<>();
model
.
put
(
"identifyCode"
,
emailTemplateBo
.
getIdentifyCode
());
model
.
put
(
"nick"
,
emailTemplateBo
.
get
IdentifyCode
());
model
.
put
(
"nick"
,
emailTemplateBo
.
get
Nick
());
String
html
=
FreeMarkerTemplateUtils
.
processTemplateIntoString
(
t
,
model
);
HtmlEmail
email
=
new
HtmlEmail
();
//创建一个HtmlEmail实例对象
email
.
setHostName
(
"smtp.yeah.net"
);
//邮箱的SMTP服务器,一般123邮箱的是smtp.123.com,qq邮箱为smtp.qq.com
...
...
src/main/java/com/diaoyun/zion/master/util/PasswordProvider.java
浏览文件 @
a0551f6c
...
...
@@ -53,7 +53,7 @@ public class PasswordProvider {
return
password
;
}
public
static
void
main
(
String
[]
args
)
{
/*
public static void main(String[] args) {
System.err.println("加密 后:" + encrypt("123456"));
}
}
*/
}
src/main/resources/application.yml
浏览文件 @
a0551f6c
server
:
servlet
:
context-path
:
/zion
port
:
808
1
port
:
808
0
tomcat
:
uri-encoding
:
utf-8
spring
:
...
...
@@ -22,6 +22,13 @@ spring:
host
:
127.0.0.1
port
:
6379
password
:
#分页工具
pagehelper
:
helperDialect
:
mysql
reasonable
:
true
supportMethodsArguments
:
true
params
:
count=countSql
datasource
:
druid
:
# 数据库访问配置, 使用druid数据源
...
...
@@ -29,13 +36,13 @@ spring:
mysql
:
type
:
com.alibaba.druid.pool.DruidDataSource
driver-class-name
:
com.mysql.cj.jdbc.Driver
url
:
jdbc:mysql://localhost:3306/chinafrica?useUnicode=true&characterEncoding=UTF-8&rewriteBatchedStatements=true&autoReconnect=true&failOverReadOnly=false&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8
username
:
root
password
:
1234
#测试环境
# url: jdbc:mysql://47.106.242.175:3306/zion?useUnicode=true&characterEncoding=UTF-8&rewriteBatchedStatements=true&autoReconnect=true&failOverReadOnly=false&zeroDateTimeBehavior=convertToNull&useSSL=false
# url: jdbc:mysql://localhost:3306/chinafrica?useUnicode=true&characterEncoding=UTF-8&rewriteBatchedStatements=true&autoReconnect=true&failOverReadOnly=false&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8
# username: root
# password: diaoyun666
# password: 1234
#测试环境
url
:
jdbc:mysql://47.106.242.175:3306/chinafrica?useUnicode=true&characterEncoding=UTF-8&rewriteBatchedStatements=true&autoReconnect=true&failOverReadOnly=false&zeroDateTimeBehavior=convertToNull&useSSL=false
username
:
root
password
:
diaoyun666
# 连接池配置
initial-size
:
5
...
...
src/main/resources/logback-spring.xml
浏览文件 @
a0551f6c
...
...
@@ -23,7 +23,7 @@
<appender
name=
"CONSOLE"
class=
"ch.qos.logback.core.ConsoleAppender"
>
<!--此日志appender是为开发使用,只配置最底级别,控制台输出的日志级别是大于或等于此级别的日志信息-->
<filter
class=
"ch.qos.logback.classic.filter.ThresholdFilter"
>
<level>
trace
</level>
<level>
info
</level>
</filter>
<encoder>
<Pattern>
${CONSOLE_LOG_PATTERN}
</Pattern>
...
...
@@ -198,7 +198,7 @@
<!-- 4. 最终的策略 -->
<!-- 4.1 开发环境:打印控制台-->
<springProfile
name=
"dev"
>
<logger
name=
"com.diaoyun.
floatpartymember
"
level=
"info"
/>
<logger
name=
"com.diaoyun.
zion
"
level=
"info"
/>
</springProfile>
<root
level=
"info"
>
...
...
@@ -208,10 +208,10 @@
<appender-ref
ref=
"WARN_FILE"
/>
<appender-ref
ref=
"ERROR_FILE"
/>
</root>
<logger
name=
"com.diaoyun.floatpartymember.dao"
level=
"
debug
"
additivity=
"false"
>
<!--
<logger name="com.diaoyun.floatpartymember.dao" level="
info
" additivity="false">
<appender-ref ref="SQL_FILE" />
</logger>
</logger>
-->
<!-- 4.2 生产环境:输出到文档
<springProfile name="pro">
<root level="info">
...
...
src/main/resources/mapper/TbCfCouponDao.xml
浏览文件 @
a0551f6c
...
...
@@ -184,9 +184,13 @@
<!--查询用户所有有效的优惠券-->
<select
id=
"queryUserAvailableCoupon"
resultType=
"com.diaoyun.zion.chinafrica.entity.TbCfCouponEntity"
>
select t2.* from tb_cf_take_coupon t1,tb_cf_coupon t2 where t1.user_id=#{userId} and t1.coupon_id=t2.coupon_id
and
<![CDATA[ t2.valid_start_time<#{nowTime}]]>
and
<![CDATA[t2.valid_end_time>#{nowTime}]]>
and status=1
and
<![CDATA[ t2.valid_start_time<#{nowTime}]]>
and
<![CDATA[t2.valid_end_time>#{nowTime}]]>
and t2.status=1
and t1.enable_flag=1
</select>
<!--更改优惠券统计-->
<update
id=
"updateUsedCount"
>
update tb_cf_coupon set used_count=used_count+1 where coupon_id=#{couponId}
</update>
</mapper>
\ No newline at end of file
src/main/resources/mapper/TbCfFeedbackDao.xml
0 → 100644
浏览文件 @
a0551f6c
<?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.TbCfFeedbackDao"
>
<resultMap
type=
"com.diaoyun.zion.chinafrica.entity.TbCfFeedbackEntity"
id=
"tbCfFeedbackMap"
>
<result
property=
"feedbackId"
column=
"feedback_id"
/>
<result
property=
"question"
column=
"question"
/>
<result
property=
"answer"
column=
"answer"
/>
<result
property=
"enableFlag"
column=
"enable_flag"
/>
<result
property=
"createTime"
column=
"create_time"
/>
</resultMap>
<select
id=
"queryObject"
resultType=
"com.diaoyun.zion.chinafrica.entity.TbCfFeedbackEntity"
>
select
`feedback_id`,
`question`,
`answer`,
`enable_flag`,
`create_time`
from tb_cf_feedback
where feedback_id = #{id}
</select>
<select
id=
"queryList"
resultType=
"com.diaoyun.zion.chinafrica.entity.TbCfFeedbackEntity"
>
select
`feedback_id`,
`question`,
`answer`,
`enable_flag`,
`create_time`
from tb_cf_feedback
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 feedback_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_feedback
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.TbCfFeedbackEntity"
>
insert into tb_cf_feedback(
`feedback_id`,
`question`,
`answer`,
`enable_flag`,
`create_time`)
values(
#{feedbackId},
#{question},
#{answer},
#{enableFlag},
#{createTime})
</insert>
<update
id=
"update"
parameterType=
"com.diaoyun.zion.chinafrica.entity.TbCfFeedbackEntity"
>
update tb_cf_feedback
<set>
<if
test=
"question != null"
>
`question` = #{question},
</if>
<if
test=
"answer != null"
>
`answer` = #{answer},
</if>
<if
test=
"enableFlag != null"
>
`enable_flag` = #{enableFlag},
</if>
<if
test=
"createTime != null"
>
`create_time` = #{createTime}
</if>
</set>
where feedback_id = #{feedbackId}
</update>
<delete
id=
"delete"
>
delete from tb_cf_feedback where feedback_id = #{value}
</delete>
<delete
id=
"deleteBatch"
>
delete from tb_cf_feedback where feedback_id in
<foreach
item=
"feedbackId"
collection=
"array"
open=
"("
separator=
","
close=
")"
>
#{feedbackId}
</foreach>
</delete>
</mapper>
\ No newline at end of file
src/main/resources/mapper/TbCfItemDetailDao.xml
浏览文件 @
a0551f6c
...
...
@@ -154,5 +154,10 @@
and t1.enable_flag=1
</select>
<!--改变购物车的商品勾选状态-->
<select
id=
"changeItemState"
>
update tb_cf_cart_record_r set check_flag=#{checkFlag} where cart_record_id=#{cartRecordId}
</select>
</mapper>
\ No newline at end of file
src/main/resources/mapper/TbCfItemOrderRDao.xml
浏览文件 @
a0551f6c
...
...
@@ -86,4 +86,23 @@
</foreach>
</delete>
<!--批量保存-->
<insert
id=
"saveBatch"
parameterType=
"com.diaoyun.zion.chinafrica.entity.TbCfItemOrderREntity"
>
insert into tb_cf_item_order_r(
`order_item_id`,
`item_id`,
`order_id`,
`enable_flag`)
values
<foreach
collection=
"list"
item=
"item"
index=
"index"
separator=
","
>
(
#{item.orderItemId},
#{item.itemId},
#{item.orderId},
#{item.enableFlag}
)
</foreach>
</insert>
</mapper>
\ No newline at end of file
src/main/resources/mapper/TbCfOrderDao.xml
浏览文件 @
a0551f6c
...
...
@@ -224,4 +224,15 @@
</foreach>
</delete>
<!--获取用户订单数据-->
<select
id=
"getUserOrderList"
resultType=
"com.diaoyun.zion.chinafrica.entity.TbCfOrderEntity"
>
select * from tb_cf_order where user_id=#{userId} order by order_time desc
</select>
<!--根据订单id,获取订单内商品详情-->
<select
id=
"getOrderItemList"
resultType=
"com.diaoyun.zion.chinafrica.entity.TbCfItemDetailEntity"
>
select t2.* from tb_cf_item_order_r t1,tb_cf_item_detail t2 where t1.order_id=#{orderId}
and t1.enable_flag=1 and t2.item_id=t1.item_id
</select>
</mapper>
\ No newline at end of file
src/main/resources/mapper/TbCfPlatformDao.xml
0 → 100644
浏览文件 @
a0551f6c
<?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.TbCfPlatformDao"
>
<resultMap
type=
"com.diaoyun.zion.chinafrica.entity.TbCfPlatformEntity"
id=
"tbCfPlatformMap"
>
<result
property=
"platformId"
column=
"platform_id"
/>
<result
property=
"platformCode"
column=
"platform_code"
/>
<result
property=
"platformName"
column=
"platform_name"
/>
<result
property=
"platformBrief"
column=
"platform_brief"
/>
<result
property=
"platformUrl"
column=
"platform_url"
/>
<result
property=
"platformImg"
column=
"platform_img"
/>
<result
property=
"enableFlag"
column=
"enable_flag"
/>
<result
property=
"createTime"
column=
"create_time"
/>
</resultMap>
<select
id=
"queryObject"
resultType=
"com.diaoyun.zion.chinafrica.entity.TbCfPlatformEntity"
>
select
`platform_id`,
`platform_code`,
`platform_name`,
`platform_brief`,
`platform_url`,
`platform_img`,
`enable_flag`,
`create_time`
from tb_cf_platform
where platform_id = #{id}
</select>
<select
id=
"queryList"
resultType=
"com.diaoyun.zion.chinafrica.entity.TbCfPlatformEntity"
>
select
`platform_id`,
`platform_code`,
`platform_name`,
`platform_brief`,
`platform_url`,
`platform_img`,
`enable_flag`,
`create_time`
from tb_cf_platform
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 platform_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_platform
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.TbCfPlatformEntity"
>
insert into tb_cf_platform(
`platform_id`,
`platform_code`,
`platform_name`,
`platform_brief`,
`platform_url`,
`platform_img`,
`enable_flag`,
`create_time`)
values(
#{platformId},
#{platformCode},
#{platformName},
#{platformBrief},
#{platformUrl},
#{platformImg},
#{enableFlag},
#{createTime})
</insert>
<update
id=
"update"
parameterType=
"com.diaoyun.zion.chinafrica.entity.TbCfPlatformEntity"
>
update tb_cf_platform
<set>
<if
test=
"platformCode != null"
>
`platform_code` = #{platformCode},
</if>
<if
test=
"platformName != null"
>
`platform_name` = #{platformName},
</if>
<if
test=
"platformBrief != null"
>
`platform_brief` = #{platformBrief},
</if>
<if
test=
"platformUrl != null"
>
`platform_url` = #{platformUrl},
</if>
<if
test=
"platformImg != null"
>
`platform_img` = #{platformImg},
</if>
<if
test=
"enableFlag != null"
>
`enable_flag` = #{enableFlag},
</if>
<if
test=
"createTime != null"
>
`create_time` = #{createTime}
</if>
</set>
where platform_id = #{platformId}
</update>
<delete
id=
"delete"
>
delete from tb_cf_platform where platform_id = #{value}
</delete>
<delete
id=
"deleteBatch"
>
delete from tb_cf_platform where platform_id in
<foreach
item=
"platformId"
collection=
"array"
open=
"("
separator=
","
close=
")"
>
#{platformId}
</foreach>
</delete>
</mapper>
\ No newline at end of file
src/main/resources/mapper/TbCfProblemDao.xml
0 → 100644
浏览文件 @
a0551f6c
<?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.TbCfProblemDao"
>
<resultMap
type=
"com.diaoyun.zion.chinafrica.entity.TbCfProblemEntity"
id=
"tbCfProblemMap"
>
<result
property=
"problemId"
column=
"problem_id"
/>
<result
property=
"question"
column=
"question"
/>
<result
property=
"answer"
column=
"answer"
/>
<result
property=
"enableFlag"
column=
"enable_flag"
/>
<result
property=
"createTime"
column=
"create_time"
/>
</resultMap>
<select
id=
"queryObject"
resultType=
"com.diaoyun.zion.chinafrica.entity.TbCfProblemEntity"
>
select
`problem_id`,
`question`,
`answer`,
`enable_flag`,
`create_time`
from tb_cf_problem
where problem_id = #{id}
</select>
<select
id=
"queryList"
resultType=
"com.diaoyun.zion.chinafrica.entity.TbCfProblemEntity"
>
select
`problem_id`,
`question`,
`answer`,
`enable_flag`,
`create_time`
from tb_cf_problem
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 problem_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_problem
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.TbCfProblemEntity"
>
insert into tb_cf_problem(
`problem_id`,
`question`,
`answer`,
`enable_flag`,
`create_time`)
values(
#{problemId},
#{question},
#{answer},
#{enableFlag},
#{createTime})
</insert>
<update
id=
"update"
parameterType=
"com.diaoyun.zion.chinafrica.entity.TbCfProblemEntity"
>
update tb_cf_problem
<set>
<if
test=
"question != null"
>
`question` = #{question},
</if>
<if
test=
"answer != null"
>
`answer` = #{answer},
</if>
<if
test=
"enableFlag != null"
>
`enable_flag` = #{enableFlag},
</if>
<if
test=
"createTime != null"
>
`create_time` = #{createTime}
</if>
</set>
where problem_id = #{problemId}
</update>
<delete
id=
"delete"
>
delete from tb_cf_problem where problem_id = #{value}
</delete>
<delete
id=
"deleteBatch"
>
delete from tb_cf_problem where problem_id in
<foreach
item=
"problemId"
collection=
"array"
open=
"("
separator=
","
close=
")"
>
#{problemId}
</foreach>
</delete>
</mapper>
\ No newline at end of file
src/main/resources/mapper/TbCfStationItemDao.xml
0 → 100644
浏览文件 @
a0551f6c
<?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.TbCfStationItemDao"
>
<resultMap
type=
"com.diaoyun.zion.chinafrica.entity.TbCfStationItemEntity"
id=
"tbCfStationItemMap"
>
<result
property=
"itemId"
column=
"item_id"
/>
<result
property=
"itemCode"
column=
"item_code"
/>
<result
property=
"itemName"
column=
"item_name"
/>
<result
property=
"itemBrief"
column=
"item_brief"
/>
<result
property=
"itemCategory"
column=
"item_category"
/>
<result
property=
"itemUrl"
column=
"item_url"
/>
<result
property=
"itemImg"
column=
"item_img"
/>
<result
property=
"platformCode"
column=
"platform_code"
/>
<result
property=
"platformName"
column=
"platform_name"
/>
<result
property=
"enableFlag"
column=
"enable_flag"
/>
<result
property=
"createTime"
column=
"create_time"
/>
</resultMap>
<select
id=
"queryObject"
resultType=
"com.diaoyun.zion.chinafrica.entity.TbCfStationItemEntity"
>
select
`item_id`,
`item_code`,
`item_name`,
`item_brief`,
`item_category`,
`item_url`,
`item_img`,
`platform_code`,
`platform_name`,
`enable_flag`,
`create_time`
from tb_cf_station_item
where item_id = #{id}
</select>
<select
id=
"queryList"
resultType=
"com.diaoyun.zion.chinafrica.entity.TbCfStationItemEntity"
>
select
`item_id`,
`item_code`,
`item_name`,
`item_brief`,
`item_category`,
`item_url`,
`item_img`,
`platform_code`,
`platform_name`,
`enable_flag`,
`create_time`
from tb_cf_station_item
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 item_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_station_item
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.TbCfStationItemEntity"
>
insert into tb_cf_station_item(
`item_id`,
`item_code`,
`item_name`,
`item_brief`,
`item_category`,
`item_url`,
`item_img`,
`platform_code`,
`platform_name`,
`enable_flag`,
`create_time`)
values(
#{itemId},
#{itemCode},
#{itemName},
#{itemBrief},
#{itemCategory},
#{itemUrl},
#{itemImg},
#{platformCode},
#{platformName},
#{enableFlag},
#{createTime})
</insert>
<update
id=
"update"
parameterType=
"com.diaoyun.zion.chinafrica.entity.TbCfStationItemEntity"
>
update tb_cf_station_item
<set>
<if
test=
"itemCode != null"
>
`item_code` = #{itemCode},
</if>
<if
test=
"itemName != null"
>
`item_name` = #{itemName},
</if>
<if
test=
"itemBrief != null"
>
`item_brief` = #{itemBrief},
</if>
<if
test=
"itemCategory != null"
>
`item_category` = #{itemCategory},
</if>
<if
test=
"itemUrl != null"
>
`item_url` = #{itemUrl},
</if>
<if
test=
"itemImg != null"
>
`item_img` = #{itemImg},
</if>
<if
test=
"platformCode != null"
>
`platform_code` = #{platformCode},
</if>
<if
test=
"platformName != null"
>
`platform_name` = #{platformName},
</if>
<if
test=
"enableFlag != null"
>
`enable_flag` = #{enableFlag},
</if>
<if
test=
"createTime != null"
>
`create_time` = #{createTime}
</if>
</set>
where item_id = #{itemId}
</update>
<delete
id=
"delete"
>
delete from tb_cf_station_item where item_id = #{value}
</delete>
<delete
id=
"deleteBatch"
>
delete from tb_cf_station_item where item_id in
<foreach
item=
"itemId"
collection=
"array"
open=
"("
separator=
","
close=
")"
>
#{itemId}
</foreach>
</delete>
</mapper>
\ No newline at end of file
src/main/resources/mapper/TbCfStoreDao.xml
0 → 100644
浏览文件 @
a0551f6c
<?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.TbCfStoreDao"
>
<resultMap
type=
"com.diaoyun.zion.chinafrica.entity.TbCfStoreEntity"
id=
"tbCfStoreMap"
>
<result
property=
"storeId"
column=
"store_id"
/>
<result
property=
"storeCode"
column=
"store_code"
/>
<result
property=
"storeName"
column=
"store_name"
/>
<result
property=
"storeBrief"
column=
"store_brief"
/>
<result
property=
"storeUrl"
column=
"store_url"
/>
<result
property=
"storeImg"
column=
"store_img"
/>
<result
property=
"platformCode"
column=
"platform_code"
/>
<result
property=
"platformName"
column=
"platform_name"
/>
<result
property=
"enableFlag"
column=
"enable_flag"
/>
<result
property=
"createTime"
column=
"create_time"
/>
</resultMap>
<select
id=
"queryObject"
resultType=
"com.diaoyun.zion.chinafrica.entity.TbCfStoreEntity"
>
select
`store_id`,
`store_code`,
`store_name`,
`store_brief`,
`store_url`,
`store_img`,
`platform_code`,
`platform_name`,
`enable_flag`,
`create_time`
from tb_cf_store
where store_id = #{id}
</select>
<select
id=
"queryList"
resultType=
"com.diaoyun.zion.chinafrica.entity.TbCfStoreEntity"
>
select
`store_id`,
`store_code`,
`store_name`,
`store_brief`,
`store_url`,
`store_img`,
`platform_code`,
`platform_name`,
`enable_flag`,
`create_time`
from tb_cf_store
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 store_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_store
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.TbCfStoreEntity"
>
insert into tb_cf_store(
`store_id`,
`store_code`,
`store_name`,
`store_brief`,
`store_url`,
`store_img`,
`platform_code`,
`platform_name`,
`enable_flag`,
`create_time`)
values(
#{storeId},
#{storeCode},
#{storeName},
#{storeBrief},
#{storeUrl},
#{storeImg},
#{platformCode},
#{platformName},
#{enableFlag},
#{createTime})
</insert>
<update
id=
"update"
parameterType=
"com.diaoyun.zion.chinafrica.entity.TbCfStoreEntity"
>
update tb_cf_store
<set>
<if
test=
"storeCode != null"
>
`store_code` = #{storeCode},
</if>
<if
test=
"storeName != null"
>
`store_name` = #{storeName},
</if>
<if
test=
"storeBrief != null"
>
`store_brief` = #{storeBrief},
</if>
<if
test=
"storeUrl != null"
>
`store_url` = #{storeUrl},
</if>
<if
test=
"storeImg != null"
>
`store_img` = #{storeImg},
</if>
<if
test=
"platformCode != null"
>
`platform_code` = #{platformCode},
</if>
<if
test=
"platformName != null"
>
`platform_name` = #{platformName},
</if>
<if
test=
"enableFlag != null"
>
`enable_flag` = #{enableFlag},
</if>
<if
test=
"createTime != null"
>
`create_time` = #{createTime}
</if>
</set>
where store_id = #{storeId}
</update>
<delete
id=
"delete"
>
delete from tb_cf_store where store_id = #{value}
</delete>
<delete
id=
"deleteBatch"
>
delete from tb_cf_store where store_id in
<foreach
item=
"storeId"
collection=
"array"
open=
"("
separator=
","
close=
")"
>
#{storeId}
</foreach>
</delete>
</mapper>
\ No newline at end of file
src/main/resources/mapper/TbCfTakeCouponDao.xml
浏览文件 @
a0551f6c
...
...
@@ -8,6 +8,7 @@
<result
property=
"userId"
column=
"user_id"
/>
<result
property=
"couponId"
column=
"coupon_id"
/>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"enableFlag"
column=
"enable_flag"
/>
</resultMap>
<select
id=
"queryObject"
resultType=
"com.diaoyun.zion.chinafrica.entity.TbCfTakeCouponEntity"
>
...
...
@@ -15,7 +16,8 @@
`take_id`,
`user_id`,
`coupon_id`,
`create_time`
`create_time`,
`enable_flag`
from tb_cf_take_coupon
where take_id = #{id}
</select>
...
...
@@ -25,7 +27,8 @@
`take_id`,
`user_id`,
`coupon_id`,
`create_time`
`create_time`,
`enable_flag`
from tb_cf_take_coupon
WHERE 1=1
<if
test=
"name != null and name.trim() != ''"
>
...
...
@@ -43,7 +46,7 @@
limit #{offset}, #{limit}
</if>
</select>
<select
id=
"queryTotal"
resultType=
"int"
>
select count(*) from tb_cf_take_coupon
WHERE 1=1
...
...
@@ -51,36 +54,40 @@
AND name LIKE concat('%',#{name},'%')
</if>
</select>
<insert
id=
"save"
parameterType=
"com.diaoyun.zion.chinafrica.entity.TbCfTakeCouponEntity"
>
insert into tb_cf_take_coupon(
`take_id`,
`user_id`,
`coupon_id`,
`create_time`)
`create_time`,
`enable_flag`)
values(
#{takeId},
#{userId},
#{couponId},
#{createTime})
#{createTime},
#{enableFlag}
)
</insert>
<update
id=
"update"
parameterType=
"com.diaoyun.zion.chinafrica.entity.TbCfTakeCouponEntity"
>
update tb_cf_take_coupon
update tb_cf_take_coupon
<set>
<if
test=
"userId != null"
>
`user_id` = #{userId},
</if>
<if
test=
"couponId != null"
>
`coupon_id` = #{couponId},
</if>
<if
test=
"createTime != null"
>
`create_time` = #{createTime}
</if>
<if
test=
"enableFlag != null"
>
`enable_flag` = #{enableFlag}
</if>
</set>
where take_id = #{takeId}
</update>
<delete
id=
"delete"
>
delete from tb_cf_take_coupon where take_id = #{value}
</delete>
<delete
id=
"deleteBatch"
>
delete from tb_cf_take_coupon where take_id in
delete from tb_cf_take_coupon where take_id in
<foreach
item=
"takeId"
collection=
"array"
open=
"("
separator=
","
close=
")"
>
#{takeId}
</foreach>
...
...
@@ -91,4 +98,14 @@
select take_id from tb_cf_take_coupon where coupon_id=#{couponId} and user_id=#{userId}
</select>
<!--统计已领取优惠券数量-->
<select
id=
"queryTakeCount"
resultType=
"java.lang.Integer"
>
select count(*) from tb_cf_take_coupon where coupon_id=#{couponId}
</select>
<!--更新是否已经使用-->
<update
id=
"updateEnableFlag"
>
update tb_cf_take_coupon set enable_flag=#{enableFlag} where user_id=#{userId} and coupon_id=#{couponId}
</update>
</mapper>
\ No newline at end of file
src/main/resources/mapper/TbCfUseCouponDao.xml
浏览文件 @
a0551f6c
<?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.TbCf
UseCoupon
Dao"
>
<mapper
namespace=
"com.diaoyun.zion.chinafrica.dao.TbCf
CouponUse
Dao"
>
<resultMap
type=
"com.diaoyun.zion.chinafrica.entity.TbCf
UseCouponEntity"
id=
"tbCfUseCoupon
Map"
>
<resultMap
type=
"com.diaoyun.zion.chinafrica.entity.TbCf
CouponUseEntity"
id=
"tbCfCouponUse
Map"
>
<result
property=
"useId"
column=
"use_id"
/>
<result
property=
"userId"
column=
"user_id"
/>
<result
property=
"couponId"
column=
"coupon_id"
/>
<result
property=
"useTime"
column=
"use_time"
/>
</resultMap>
<select
id=
"queryObject"
resultType=
"com.diaoyun.zion.chinafrica.entity.TbCf
UseCoupon
Entity"
>
<select
id=
"queryObject"
resultType=
"com.diaoyun.zion.chinafrica.entity.TbCf
CouponUse
Entity"
>
select
`use_id`,
`user_id`,
`coupon_id`,
`use_time`
from tb_cf_
use_coupon
from tb_cf_
coupon_use
where use_id = #{id}
</select>
<select
id=
"queryList"
resultType=
"com.diaoyun.zion.chinafrica.entity.TbCf
UseCoupon
Entity"
>
<select
id=
"queryList"
resultType=
"com.diaoyun.zion.chinafrica.entity.TbCf
CouponUse
Entity"
>
select
`use_id`,
`user_id`,
`coupon_id`,
`use_time`
from tb_cf_
use_coupon
from tb_cf_
coupon_use
WHERE 1=1
<if
test=
"name != null and name.trim() != ''"
>
AND name LIKE concat('%',#{name},'%')
...
...
@@ -45,15 +45,15 @@
</select>
<select
id=
"queryTotal"
resultType=
"int"
>
select count(*) from tb_cf_
use_coupon
select count(*) from tb_cf_
coupon_use
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.TbCf
UseCoupon
Entity"
>
insert into tb_cf_
use_coupon
(
<insert
id=
"save"
parameterType=
"com.diaoyun.zion.chinafrica.entity.TbCf
CouponUse
Entity"
>
insert into tb_cf_
coupon_use
(
`use_id`,
`user_id`,
`coupon_id`,
...
...
@@ -65,8 +65,8 @@
#{useTime})
</insert>
<update
id=
"update"
parameterType=
"com.diaoyun.zion.chinafrica.entity.TbCf
UseCoupon
Entity"
>
update tb_cf_
use_coupon
<update
id=
"update"
parameterType=
"com.diaoyun.zion.chinafrica.entity.TbCf
CouponUse
Entity"
>
update tb_cf_
coupon_use
<set>
<if
test=
"userId != null"
>
`user_id` = #{userId},
</if>
<if
test=
"couponId != null"
>
`coupon_id` = #{couponId},
</if>
...
...
@@ -76,11 +76,11 @@
</update>
<delete
id=
"delete"
>
delete from tb_cf_
use_coupon
where use_id = #{value}
delete from tb_cf_
coupon_use
where use_id = #{value}
</delete>
<delete
id=
"deleteBatch"
>
delete from tb_cf_
use_coupon where use_id in
delete from tb_cf_
coupon_use where use_id in
<foreach
item=
"useId"
collection=
"array"
open=
"("
separator=
","
close=
")"
>
#{useId}
</foreach>
...
...
src/main/resources/properties/domain.properties
浏览文件 @
a0551f6c
...
...
@@ -4,9 +4,11 @@
user.avatar
=
https://dev.diaosaas.com/upload/chinafrica/user/avatar.png
################################################################################
################token有效时间 默认30分###################
#一个星期
token.expiredTime
=
604800
################redis有效时间###################
#登录token second 默认30分 一个星期
redis.token.expiredTime
=
604800
#订单 30分 second
redis.order.expiredTime
=
1800
################腾讯翻译配置###################
tencent.translate.app_id
=
2120761040
...
...
@@ -14,5 +16,9 @@ tencent.translate.app_url=https://api.ai.qq.com/fcgi-bin/nlp/nlp_texttranslate
//
tencent.wordseg.app_url
=
https://api.ai.qq.com/fcgi-bin/nlp/nlp_wordseg
tencent.wordpos.app_url
=
https://api.ai.qq.com/fcgi-bin/nlp/nlp_wordpos
################腾讯翻译配置 END###################
##################stripe公钥(不加密)和私钥(已加密)################################
stripe.pk
=
pk_test_uljWJWUuD8fzZXPlGtDZ1fxx00o1ZKr7QL
stripe.sk
=
BbLXgo+ohgrAP7p3tB52YTqNwhAiTYzYWAX0W+/1PES6kOupxwc/7xpAR8QsG6gP
##################stripe公钥和私钥 END###############################
src/main/resources/templates/test.js
deleted
100644 → 0
浏览文件 @
3ccaa6bf
{
"data"
:
{
"viewer"
:
{
"admin"
:
false
,
"bs"
:
""
,
"buyDomain"
:
"buy.taobao.com"
,
"buyerId"
:
""
,
"cartDomain"
:
"cart.taobao.com"
,
"cc"
:
false
,
"ctUser"
:
false
,
"lgin"
:
false
,
"serviceTab"
:
"ITEM"
,
"tkn"
:
"e3a479be66f4"
},
"deliveryFee"
:
{
"data"
:
{
"areaId"
:
440100
,
"areaName"
:
"广东广州"
,
"sendCity"
:
"广东广州"
,
"serviceInfo"
:
{
"list"
:
[{
"id"
:
"100_-4"
,
"info"
:
"快递 <span class="
wl
-
yen
">¥</span>8.00"
,
"isDefault"
:
true
,
"markInfo"
:
"24小时内发货"
},
{
"id"
:
"100_-7"
,
"info"
:
"EMS <span class="
wl
-
yen
">¥</span>25.00"
,
"markInfo"
:
"24小时内发货"
}]
}
},
"dataUrl"
:
"//detailskip.taobao.com/json/deliveryFee.htm"
,
"message"
:
"ok"
,
"success"
:
true
},
"activity"
:
{},
"originalPrice"
:
{
"def"
:
{
"price"
:
"185.00"
}
},
"price"
:
"185.00"
,
"dynStock"
:
{
"holdQuantity"
:
0
,
"sellableQuantity"
:
580
,
"stock"
:
580
,
"stockType"
:
"normal"
},
"qrcodeImgUrl"
:
"//gcodex.alicdn.com/qrcode.do?biz_code=xcode&short_name=a.ZRs8&cmd=createSub¶m=id:39346585451;scm:20140619.pc_detail.itemId.0"
,
"fqg"
:
{
"enable"
:
false
,
"installmentLink"
:
"//service.taobao.com/support/knowledge-6651933.htm"
,
"installmentLoginLink"
:
"//service.taobao.com/support/knowledge-6651923.htm"
,
"newMultiterms"
:
true
,
"skuItemPurchase"
:
{
"def"
:
[{
"poundage"
:
"含手续费"
,
"price"
:
"37.5"
,
"ratio"
:
"0.023"
,
"step"
:
"3期"
,
"stepNum"
:
3
},
{
"poundage"
:
"含手续费"
,
"price"
:
"19.15"
,
"ratio"
:
"0.045"
,
"step"
:
"6期"
,
"stepNum"
:
6
},
{
"poundage"
:
"含手续费"
,
"price"
:
"9.84"
,
"ratio"
:
"0.075"
,
"step"
:
"12期"
,
"stepNum"
:
12
}]
}
},
"promotion"
:
{
"promoData"
:
{
"def"
:
[{
"cart"
:
true
,
"loginPromotion"
:
false
,
"price"
:
"110.00"
,
"start"
:
false
,
"type"
:
"优惠促销"
}]
},
"saleDetailMap"
:
{}
}
}
}
\ No newline at end of file
src/main/resources/templates/一种规格TM.html
deleted
100644 → 0
浏览文件 @
3ccaa6bf
<!DOCTYPE html>
<html
lang=
"en"
>
<head>
<meta
charset=
"UTF-8"
>
<title>
Title
</title>
</head>
<body>
<div
class=
"sku-wrap"
><div
class=
"header"
><div
class=
"img-wrap"
><img
src=
"//gw.alicdn.com/bao/uploaded/i1/3369275226/O1CN01oNcu8Y1oTYLAqN3Ba_!!3369275226.jpg_200x200Q50s50.jpg"
class=
"j-summary-img"
aria-label=
"选中的商品图"
></div><div
class=
"main"
><div
class=
"price-wrap"
><span
class=
"price"
>
¥139
</span>
</div>
<div
class=
"stock"
>
库存 4147件
</div>
<div
class=
"sku-info"
>
已选择:
<span>
6分(30米)送接头
</span>
</div></div><a
class=
"sku-close"
aria-label=
"关闭"
></a></div><div
class=
"body"
><div
class=
"body-item"
><div
class=
"pre-mods-wrap"
></div><div
class=
"address-wrap"
></div><div
class=
"buy-type-wrap"
></div><div
class=
"sku-type-pre-wrap"
></div><ul
class=
"sku-list-wrap"
>
<li>
<h2
id=
"prop_title_0"
>
颜色分类
</h2>
<div
class=
"items"
role=
"radiogroup"
aria-labelledby=
"prop_title_0"
>
<a
role=
"radio"
href=
"javascript:void(0)"
data-value=
"1627207:3232483"
data-image=
"//gw.alicdn.com/bao/uploaded/i3/3369275226/O1CN01w13vrC1oTYLC8jaOo_!!3369275226.jpg"
class=
""
aria-checked=
"false"
><img
class=
"prop-img"
src=
"//gw.alicdn.com/bao/uploaded/i3/3369275226/O1CN01w13vrC1oTYLC8jaOo_!!3369275226.jpg_80x80.jpg"
><span>
4分(5米)送接头
</span></a>
<a
role=
"radio"
href=
"javascript:void(0)"
data-value=
"1627207:3232484"
data-image=
"//gw.alicdn.com/bao/uploaded/i3/3369275226/O1CN01KntdVp1oTYLA4SXwZ_!!3369275226.jpg"
class=
""
aria-checked=
"false"
><img
class=
"prop-img"
src=
"//gw.alicdn.com/bao/uploaded/i3/3369275226/O1CN01KntdVp1oTYLA4SXwZ_!!3369275226.jpg_80x80.jpg"
><span>
4分(10米)送接头
</span></a>
<a
role=
"radio"
href=
"javascript:void(0)"
data-value=
"1627207:3232481"
data-image=
"//gw.alicdn.com/bao/uploaded/i2/3369275226/O1CN01KsRwY71oTYLBL3NPw_!!3369275226.jpg"
class=
""
aria-checked=
"false"
><img
class=
"prop-img"
src=
"//gw.alicdn.com/bao/uploaded/i2/3369275226/O1CN01KsRwY71oTYLBL3NPw_!!3369275226.jpg_80x80.jpg"
><span>
4分(15米)送接头
</span></a>
<a
role=
"radio"
href=
"javascript:void(0)"
data-value=
"1627207:90554"
data-image=
"//gw.alicdn.com/bao/uploaded/i2/3369275226/O1CN01sf5re51oTYLC8kaqv_!!3369275226.jpg"
class=
""
aria-checked=
"false"
><img
class=
"prop-img"
src=
"//gw.alicdn.com/bao/uploaded/i2/3369275226/O1CN01sf5re51oTYLC8kaqv_!!3369275226.jpg_80x80.jpg"
><span>
4分(20米)送接头
</span></a>
<a
role=
"radio"
href=
"javascript:void(0)"
data-value=
"1627207:28332"
data-image=
"//gw.alicdn.com/bao/uploaded/i1/3369275226/O1CN01GcP1Ub1oTYLA4Uctn_!!3369275226.jpg"
class=
""
aria-checked=
"false"
><img
class=
"prop-img"
src=
"//gw.alicdn.com/bao/uploaded/i1/3369275226/O1CN01GcP1Ub1oTYLA4Uctn_!!3369275226.jpg_80x80.jpg"
><span>
4分(30米)送接头
</span></a>
<a
role=
"radio"
href=
"javascript:void(0)"
data-value=
"1627207:30156"
data-image=
"//gw.alicdn.com/bao/uploaded/i2/3369275226/O1CN01kbfzTP1oTYLAqLVMZ_!!3369275226.jpg"
class=
""
aria-checked=
"false"
><img
class=
"prop-img"
src=
"//gw.alicdn.com/bao/uploaded/i2/3369275226/O1CN01kbfzTP1oTYLAqLVMZ_!!3369275226.jpg_80x80.jpg"
><span>
4分(40米)送接头
</span></a>
<a
role=
"radio"
href=
"javascript:void(0)"
data-value=
"1627207:60092"
data-image=
"//gw.alicdn.com/bao/uploaded/i2/3369275226/O1CN01tf5D9x1oTYL9gatzK_!!3369275226.jpg"
class=
""
aria-checked=
"false"
><img
class=
"prop-img"
src=
"//gw.alicdn.com/bao/uploaded/i2/3369275226/O1CN01tf5D9x1oTYL9gatzK_!!3369275226.jpg_80x80.jpg"
><span>
4分(50米)送接头
</span></a>
<a
role=
"radio"
href=
"javascript:void(0)"
data-value=
"1627207:3232482"
data-image=
"//gw.alicdn.com/bao/uploaded/i2/3369275226/O1CN011aQOFf1oTYLC8nwqu_!!3369275226.jpg"
class=
""
aria-checked=
"false"
><img
class=
"prop-img"
src=
"//gw.alicdn.com/bao/uploaded/i2/3369275226/O1CN011aQOFf1oTYLC8nwqu_!!3369275226.jpg_80x80.jpg"
><span>
4分(100米)送接头
</span></a>
<a
role=
"radio"
href=
"javascript:void(0)"
data-value=
"1627207:3232478"
data-image=
"//gw.alicdn.com/bao/uploaded/i3/3369275226/O1CN016cOz6Q1oTYLAqNeUk_!!3369275226.jpg"
class=
""
aria-checked=
"false"
><img
class=
"prop-img"
src=
"//gw.alicdn.com/bao/uploaded/i3/3369275226/O1CN016cOz6Q1oTYLAqNeUk_!!3369275226.jpg_80x80.jpg"
><span>
6分(5米)送接头
</span></a>
<a
role=
"radio"
href=
"javascript:void(0)"
data-value=
"1627207:3232479"
data-image=
"//gw.alicdn.com/bao/uploaded/i2/3369275226/O1CN01cXRRVW1oTYLDnr0l7_!!3369275226.jpg"
class=
""
aria-checked=
"false"
><img
class=
"prop-img"
src=
"//gw.alicdn.com/bao/uploaded/i2/3369275226/O1CN01cXRRVW1oTYLDnr0l7_!!3369275226.jpg_80x80.jpg"
><span>
6分(10米)送接头
</span></a>
<a
role=
"radio"
href=
"javascript:void(0)"
data-value=
"1627207:28340"
data-image=
"//gw.alicdn.com/bao/uploaded/i1/3369275226/O1CN01oMIVNv1oTYL4XuyjP_!!3369275226.jpg"
class=
""
aria-checked=
"false"
><img
class=
"prop-img"
src=
"//gw.alicdn.com/bao/uploaded/i1/3369275226/O1CN01oMIVNv1oTYL4XuyjP_!!3369275226.jpg_80x80.jpg"
><span>
6分(15米)送接头
</span></a>
<a
role=
"radio"
href=
"javascript:void(0)"
data-value=
"1627207:28320"
data-image=
"//gw.alicdn.com/bao/uploaded/i2/3369275226/O1CN01WSfJDx1oTYL8wwZs3_!!3369275226.jpg"
class=
""
aria-checked=
"false"
><img
class=
"prop-img"
src=
"//gw.alicdn.com/bao/uploaded/i2/3369275226/O1CN01WSfJDx1oTYL8wwZs3_!!3369275226.jpg_80x80.jpg"
><span>
6分(20米)送接头
</span></a>
<a
role=
"radio"
href=
"javascript:void(0)"
data-value=
"1627207:3232480"
data-image=
"//gw.alicdn.com/bao/uploaded/i1/3369275226/O1CN01oNcu8Y1oTYLAqN3Ba_!!3369275226.jpg"
class=
"checked"
aria-checked=
"true"
data-spm-anchor-id=
"a222m.7628550.0.0"
><img
class=
"prop-img"
src=
"//gw.alicdn.com/bao/uploaded/i1/3369275226/O1CN01oNcu8Y1oTYLAqN3Ba_!!3369275226.jpg_80x80.jpg"
><span>
6分(30米)送接头
</span></a>
<a
role=
"radio"
href=
"javascript:void(0)"
data-value=
"1627207:80882"
data-image=
"//gw.alicdn.com/bao/uploaded/i4/3369275226/O1CN01mmjhrq1oTYL9gevcM_!!3369275226.jpg"
class=
""
aria-checked=
"false"
><img
class=
"prop-img"
src=
"//gw.alicdn.com/bao/uploaded/i4/3369275226/O1CN01mmjhrq1oTYL9gevcM_!!3369275226.jpg_80x80.jpg"
><span>
6分(40米)送接头
</span></a>
<a
role=
"radio"
href=
"javascript:void(0)"
data-value=
"1627207:28329"
data-image=
"//gw.alicdn.com/bao/uploaded/i4/3369275226/O1CN01domgur1oTYLDFR4KM_!!3369275226.jpg"
class=
""
aria-checked=
"false"
><img
class=
"prop-img"
src=
"//gw.alicdn.com/bao/uploaded/i4/3369275226/O1CN01domgur1oTYLDFR4KM_!!3369275226.jpg_80x80.jpg"
><span>
6分(50米)送接头
</span></a>
<a
role=
"radio"
href=
"javascript:void(0)"
data-value=
"1627207:28326"
data-image=
"//gw.alicdn.com/bao/uploaded/i4/3369275226/O1CN01KPtSuR1oTYLDntpYq_!!3369275226.jpg"
class=
""
aria-checked=
"false"
><img
class=
"prop-img"
src=
"//gw.alicdn.com/bao/uploaded/i4/3369275226/O1CN01KPtSuR1oTYLDntpYq_!!3369275226.jpg_80x80.jpg"
><span>
6分(100米)送接头
</span></a>
<a
role=
"radio"
href=
"javascript:void(0)"
data-value=
"1627207:28335"
data-image=
"//gw.alicdn.com/bao/uploaded/i3/3369275226/O1CN01VBojzo1oTYJW6ksev_!!3369275226.jpg"
class=
""
aria-checked=
"false"
><img
class=
"prop-img"
src=
"//gw.alicdn.com/bao/uploaded/i3/3369275226/O1CN01VBojzo1oTYJW6ksev_!!3369275226.jpg_80x80.jpg"
><span>
水管车+10米4分管套装(送2米管)
</span></a>
<a
role=
"radio"
href=
"javascript:void(0)"
data-value=
"1627207:130164"
data-image=
"//gw.alicdn.com/bao/uploaded/i2/3369275226/O1CN01CyS92x1oTYJWipWuL_!!3369275226.jpg"
class=
""
aria-checked=
"false"
><img
class=
"prop-img"
src=
"//gw.alicdn.com/bao/uploaded/i2/3369275226/O1CN01CyS92x1oTYJWipWuL_!!3369275226.jpg_80x80.jpg"
><span>
水管车+15米4分管套装(送2米管)
</span></a>
<a
role=
"radio"
href=
"javascript:void(0)"
data-value=
"1627207:28338"
data-image=
"//gw.alicdn.com/bao/uploaded/i2/3369275226/O1CN01RLzr9v1oTYJVpesyw_!!3369275226.jpg"
class=
""
aria-checked=
"false"
><img
class=
"prop-img"
src=
"//gw.alicdn.com/bao/uploaded/i2/3369275226/O1CN01RLzr9v1oTYJVpesyw_!!3369275226.jpg_80x80.jpg"
><span>
水管车+20米4分管套装(送2米管)
</span></a>
<a
role=
"radio"
href=
"javascript:void(0)"
data-value=
"1627207:107121"
data-image=
"//gw.alicdn.com/bao/uploaded/i4/3369275226/O1CN01InLN4B1oTYJVpe9Gz_!!3369275226.jpg"
class=
""
aria-checked=
"false"
><img
class=
"prop-img"
src=
"//gw.alicdn.com/bao/uploaded/i4/3369275226/O1CN01InLN4B1oTYJVpe9Gz_!!3369275226.jpg_80x80.jpg"
><span>
水管车+30米4分管套装(送2米管)
</span></a>
<a
role=
"radio"
href=
"javascript:void(0)"
data-value=
"1627207:28327"
data-image=
"//gw.alicdn.com/bao/uploaded/i2/3369275226/O1CN011oTYJPfEHKkpSH7_!!3369275226.jpg"
class=
""
aria-checked=
"false"
><img
class=
"prop-img"
src=
"//gw.alicdn.com/bao/uploaded/i2/3369275226/O1CN011oTYJPfEHKkpSH7_!!3369275226.jpg_80x80.jpg"
><span>
水管车+40米4分管套装(送2米管)
</span></a>
<a
role=
"radio"
href=
"javascript:void(0)"
data-value=
"1627207:28324"
class=
""
aria-checked=
"false"
><span>
(4分内径12mm) (6分内径18mm)
</span></a>
</div>
</li>
</ul><div
class=
"sku-type-wrap"
></div><ul
class=
"bundle-sku-wrap"
></ul><div
class=
"mods-wrap"
></div><div
class=
"pickup-wrap"
><section
id=
"s-pickup"
>
</section></div><div
class=
"bundle-wrap"
></div><div
class=
"services-wrap"
></div><div
class=
"number-wrap"
><div
class=
"number-line"
><label
for=
"number"
>
购买数量
</label><span
class=
"J_limitTxt limit-txt"
></span><div
class=
"number"
><button
class=
"decrease disabled"
>
-
</button>
<input
id=
"number"
type=
"number"
value=
"1"
>
<button
class=
"increase"
>
+
</button></div></div></div><div
class=
"installment-wrap"
></div></div></div><div
class=
"footer trade"
>
<a
class=
"cart "
role=
"button"
><p>
加入购物车
</p></a>
<a
class=
"info"
role=
"button"
></a>
<a
class=
"buy "
role=
"button"
><p>
立即购买
</p></a>
</div></div>
</body>
</html>
\ No newline at end of file
src/main/resources/templates/只有一种规格的tb.html
deleted
100644 → 0
浏览文件 @
3ccaa6bf
size = 2
\ No newline at end of file
src/main/resources/templates/多种规格的tb.html
deleted
100644 → 0
浏览文件 @
3ccaa6bf
差异被折叠。
点击展开。
src/main/resources/templates/多规格TM.html
deleted
100644 → 0
浏览文件 @
3ccaa6bf
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html>
<head><title>
400 Bad Request
</title></head>
<body
bgcolor=
"white"
>
<h1>
400 Bad Request
</h1>
<p>
Your browser sent a request that this server could not understand.
<hr/>
Powered by Tengine
</body>
</html>
src/main/resources/templates/没有规格.html
deleted
100644 → 0
浏览文件 @
3ccaa6bf
src/main/resources/templates/没有规格的tb.html
deleted
100644 → 0
浏览文件 @
3ccaa6bf
差异被折叠。
点击展开。
src/test/java/com/diaoyun/zion/ZionApplicationTests.java
浏览文件 @
a0551f6c
差异被折叠。
点击展开。
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论