Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
sibu-v-mall
/
sibu-v-mall-third-api
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
构建
提交
问题看板
文件
提交
网络
比较
分支
标签
a4a10d2e
由
刘嘉
编写于
2018-04-13 13:43:40 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
菠萝派接口-根据appid与token查找到店铺
1 个父辈
d941bcf5
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
15 行增加
和
2 行删除
com.sibu.orderHelper.integralMall/src/main/java/com/sibu/orderHelper/integralMall/controller/pineapple/PineappleController.java
com.sibu.orderHelper.integralMall/src/main/resources/mapper/IMSupplierAppDao.xml
com.sibu.orderHelper.service/src/main/java/com/sibu/orderHelper/integral/service/IMSupplierAppService.java
com.sibu.orderHelper.service/src/main/java/com/sibu/orderHelper/integral/service/impl/IMSupplierAppServiceImpl.java
com.sibu.orderHelper.integralMall/src/main/java/com/sibu/orderHelper/integralMall/controller/pineapple/PineappleController.java
查看文件 @
a4a10d2
...
...
@@ -180,7 +180,7 @@ public class PineappleController {
}
private
IMSupplierApp
findAndCheckSupplierApp
(
BaseRequest
request
)
{
IMSupplierApp
imSupplierApp
=
imSupplierAppService
.
findByAppIdAndAppType
(
request
.
getAppkey
(),
SupplierAppTypeEnum
.
PINE_APPLE
);
IMSupplierApp
imSupplierApp
=
imSupplierAppService
.
findByAppIdAndAppType
(
request
,
SupplierAppTypeEnum
.
PINE_APPLE
);
if
(
imSupplierApp
==
null
)
{
throw
new
BizException
(
MessageFormat
.
format
(
"appKey【{0}】的菠萝派应用数据为空,请联系客服"
,
request
.
getAppkey
()));
}
...
...
com.sibu.orderHelper.integralMall/src/main/resources/mapper/IMSupplierAppDao.xml
查看文件 @
a4a10d2
...
...
@@ -4,7 +4,7 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.sibu.orderHelper.integral.dao.IMSupplierAppDao"
>
<select
id=
"findByAppIdAndAppType"
resultMap=
"BaseResultMap"
>
select * from im_supplier_app where app_id=#{appId} and app_type = #{appType}
select * from im_supplier_app where app_id=#{appId} and app_type = #{appType}
and app_token = #{appToken}
</select>
<resultMap
id=
"BaseResultMap"
type=
"com.sibu.orderHelper.integral.model.IMSupplierApp"
>
<result
column=
"id"
property=
"id"
/>
...
...
com.sibu.orderHelper.service/src/main/java/com/sibu/orderHelper/integral/service/IMSupplierAppService.java
查看文件 @
a4a10d2
...
...
@@ -2,6 +2,7 @@ package com.sibu.orderHelper.integral.service;
import
com.sibu.orderHelper.enums.SupplierAppTypeEnum
;
import
com.sibu.orderHelper.integral.model.IMSupplierApp
;
import
com.sibu.orderHelper.integral.pineapple.request.BaseRequest
;
/**
* @author 陈志杭
...
...
@@ -11,4 +12,6 @@ import com.sibu.orderHelper.integral.model.IMSupplierApp;
*/
public
interface
IMSupplierAppService
{
IMSupplierApp
findByAppIdAndAppType
(
String
appId
,
SupplierAppTypeEnum
appType
);
IMSupplierApp
findByAppIdAndAppType
(
BaseRequest
requestParams
,
SupplierAppTypeEnum
appType
);
}
...
...
com.sibu.orderHelper.service/src/main/java/com/sibu/orderHelper/integral/service/impl/IMSupplierAppServiceImpl.java
查看文件 @
a4a10d2
...
...
@@ -4,6 +4,7 @@ import com.sibu.orderHelper.common.strategy.DbUtil;
import
com.sibu.orderHelper.enums.SupplierAppTypeEnum
;
import
com.sibu.orderHelper.integral.dao.IMSupplierAppDao
;
import
com.sibu.orderHelper.integral.model.IMSupplierApp
;
import
com.sibu.orderHelper.integral.pineapple.request.BaseRequest
;
import
com.sibu.orderHelper.integral.service.IMSupplierAppService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
@@ -29,4 +30,13 @@ public class IMSupplierAppServiceImpl implements IMSupplierAppService {
params
.
put
(
"appType"
,
appType
.
getCode
());
return
imSupplierAppDao
.
findByAppIdAndAppType
(
params
);
}
@Override
public
IMSupplierApp
findByAppIdAndAppType
(
BaseRequest
requestParams
,
SupplierAppTypeEnum
appType
)
{
Map
<
String
,
String
>
params
=
new
HashMap
<>();
params
.
put
(
"appId"
,
requestParams
.
getAppkey
());
params
.
put
(
"appToken"
,
requestParams
.
getToken
());
params
.
put
(
"appType"
,
appType
.
getCode
());
return
imSupplierAppDao
.
findByAppIdAndAppType
(
params
);
}
}
...
...
请
注册
或
登录
后发表评论