Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
card-pay
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
qinhu
card-pay
Commits
5105aab0
Commit
5105aab0
authored
Jan 18, 2021
by
mengbali153
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
注册接口修改
parent
2e51eb7f
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
199 additions
and
157 deletions
+199
-157
JdbcConfig.java
...va/cn/wise/sc/pay/common/security2/config/JdbcConfig.java
+1
-1
WebSecurityConfig.java
...ise/sc/pay/common/security2/config/WebSecurityConfig.java
+1
-0
SysUserMapper.xml
...ise/sc/pay/laas/userbac/business/mapper/SysUserMapper.xml
+1
-0
UserControler.java
...se/sc/pay/pass/business/app/controller/UserControler.java
+53
-0
AppShopController.java
...ss/business/app/controller/cashier/AppShopController.java
+108
-107
OpenIdRegisterQuery.java
...ay/pass/business/app/model/query/OpenIdRegisterQuery.java
+2
-2
bootstrap.yml
...as/paas-app/app-business/src/main/resources/bootstrap.yml
+0
-17
MerchDiscountController.java
...cashiers/controller/merchant/MerchDiscountController.java
+18
-17
UserControler.java
...c/pay/pass/business/manager/controller/UserControler.java
+5
-0
GoodsController.java
...e/sc/pay/business/cashier/controller/GoodsController.java
+2
-10
bootstrap.yml
...aas-order/order-business/src/main/resources/bootstrap.yml
+2
-2
UserExtraServiceImpl.java
...ay/business/points/service/impl/UserExtraServiceImpl.java
+5
-0
bootstrap.yaml
...r-task/order-timer-task/src/main/resources/bootstrap.yaml
+1
-1
No files found.
card-common/common-security2/src/main/java/cn/wise/sc/pay/common/security2/config/JdbcConfig.java
View file @
5105aab0
...
@@ -33,7 +33,7 @@ public class JdbcConfig {
...
@@ -33,7 +33,7 @@ public class JdbcConfig {
public
DataSource
createDataSource
()
{
public
DataSource
createDataSource
()
{
DruidDataSource
dataSource
=
new
DruidDataSource
();
DruidDataSource
dataSource
=
new
DruidDataSource
();
dataSource
.
setDriverClassName
(
"com.mysql.cj.jdbc.Driver"
);
dataSource
.
setDriverClassName
(
"com.mysql.cj.jdbc.Driver"
);
dataSource
.
setUrl
(
"jdbc:mysql://127.0.0.1:3306/oxo_main_data?useUnicode=true&characterEncoding=UTF-8&useSSL=false"
);
dataSource
.
setUrl
(
"jdbc:mysql://127.0.0.1:3306/oxo_main_data?useUnicode=true&characterEncoding=UTF-8&useSSL=false
&serverTimezone=GMT%2B8
"
);
dataSource
.
setUsername
(
"root"
);
dataSource
.
setUsername
(
"root"
);
dataSource
.
setPassword
(
"admin!@#123"
);
dataSource
.
setPassword
(
"admin!@#123"
);
return
dataSource
;
return
dataSource
;
...
...
card-common/common-security2/src/main/java/cn/wise/sc/pay/common/security2/config/WebSecurityConfig.java
View file @
5105aab0
...
@@ -118,6 +118,7 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
...
@@ -118,6 +118,7 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
"/**/exhibition/commentPage"
,
"/**/exhibition/commentPage"
,
"/**/app/cashier/shop/**"
,
"/**/app/cashier/shop/**"
,
"/**/app/exhibition"
,
"/**/app/exhibition"
,
"/**/app/user/**"
,
"/**/app/eshop/goods/goodsPage/**"
,
"/**/app/eshop/goods/goodsPage/**"
,
"/**/app/merchant/transportation/**"
,
"/**/app/merchant/transportation/**"
,
"/**/app/exhibition/detail/**"
,
"/**/app/exhibition/detail/**"
,
...
...
card-laas/laas-userbac/userbac-business/src/main/java/cn/wise/sc/pay/laas/userbac/business/mapper/SysUserMapper.xml
View file @
5105aab0
...
@@ -186,6 +186,7 @@
...
@@ -186,6 +186,7 @@
<result
column=
"avatar"
property=
"avatar"
/>
<result
column=
"avatar"
property=
"avatar"
/>
<result
column=
"wx_openid"
property=
"wxOpenid"
/>
<result
column=
"wx_openid"
property=
"wxOpenid"
/>
<result
column=
"ali_openid"
property=
"aliOpenid"
/>
<result
column=
"ali_openid"
property=
"aliOpenid"
/>
<result
column=
"create_time"
property=
"createTime"
/>
<result
column=
"lock_flag"
property=
"lockFlag"
/>
<result
column=
"lock_flag"
property=
"lockFlag"
/>
<result
column=
"deptId"
property=
"deptId"
/>
<result
column=
"deptId"
property=
"deptId"
/>
<result
column=
"deptName"
property=
"deptName"
/>
<result
column=
"deptName"
property=
"deptName"
/>
...
...
card-paas/paas-app/app-business/src/main/java/cn/wise/sc/pay/pass/business/app/controller/UserControler.java
View file @
5105aab0
...
@@ -262,6 +262,15 @@ public class UserControler extends UserController {
...
@@ -262,6 +262,15 @@ public class UserControler extends UserController {
.
filed1
(
openIdRegisterQuery
.
getSex
())
.
filed1
(
openIdRegisterQuery
.
getSex
())
.
filed2
(
openIdRegisterQuery
.
getCity
())
.
filed2
(
openIdRegisterQuery
.
getCity
())
.
build
();
.
build
();
if
(
openIdRegisterQuery
.
getType
()
==
0
){
sysUserBuild
.
setDescrib
(
"微信端:"
+
openIdRegisterQuery
.
getOpenId
());
}
else
if
(
openIdRegisterQuery
.
getType
()
==
1
){
sysUserBuild
.
setDescrib
(
"阿里端:"
+
openIdRegisterQuery
.
getOpenId
());
}
else
{
sysUserBuild
.
setDescrib
(
"未知"
);
}
this
.
openIdByType
(
sysUserBuild
,
openIdRegisterQuery
.
getType
(),
openIdRegisterQuery
.
getOpenId
());
this
.
openIdByType
(
sysUserBuild
,
openIdRegisterQuery
.
getType
(),
openIdRegisterQuery
.
getOpenId
());
boolean
save
=
userService
.
save
(
sysUserBuild
);
boolean
save
=
userService
.
save
(
sysUserBuild
);
...
@@ -295,6 +304,50 @@ public class UserControler extends UserController {
...
@@ -295,6 +304,50 @@ public class UserControler extends UserController {
}
}
@PostMapping
(
"/updateRegister"
)
@ApiOperation
(
value
=
"小程序:openID注册会员添加修改会员信息"
)
@ApiImplicitParams
(
{
@ApiImplicitParam
(
name
=
"OpenIdRegisterQuery"
,
value
=
"微信或者阿里注册参数对象"
,
dataType
=
"OpenIdRegisterQuery"
,
paramType
=
"body"
)
}
)
public
BaseResponse
updateRegister
(
@RequestBody
OpenIdRegisterQuery
openIdRegisterQuery
)
{
QueryWrapper
queryWrapper
=
new
QueryWrapper
();
if
(
openIdRegisterQuery
.
getType
()
==
0
){
queryWrapper
.
eq
(
"wx_openid"
,
openIdRegisterQuery
.
getOpenId
());
SysUser
one
=
userService
.
getOne
(
queryWrapper
);
one
.
setUsername
(
openIdRegisterQuery
.
getUsername
());
one
.
setAvatar
(
openIdRegisterQuery
.
getMultiAvatar
());
one
.
setFiled1
(
openIdRegisterQuery
.
getSex
());
one
.
setFiled2
(
openIdRegisterQuery
.
getCity
());
boolean
update
=
userService
.
updateById
(
one
);
if
(!
update
){
return
BaseResponse
.
error
(
"修改失败"
,
SysUser
.
class
.
getName
());
}
}
if
(
openIdRegisterQuery
.
getType
()
==
1
){
queryWrapper
.
eq
(
"ali_openid"
,
openIdRegisterQuery
.
getOpenId
());
SysUser
one
=
userService
.
getOne
(
queryWrapper
);
one
.
setUsername
(
openIdRegisterQuery
.
getUsername
());
one
.
setAvatar
(
openIdRegisterQuery
.
getMultiAvatar
());
one
.
setFiled1
(
openIdRegisterQuery
.
getSex
());
one
.
setFiled2
(
openIdRegisterQuery
.
getCity
());
boolean
update
=
userService
.
updateById
(
one
);
if
(!
update
){
return
BaseResponse
.
error
(
"修改失败"
,
SysUser
.
class
.
getName
());
}
}
return
BaseResponse
.
ok
(
this
.
getClass
());
}
@PutMapping
(
"/binding/phone"
)
@PutMapping
(
"/binding/phone"
)
@ApiOperation
(
value
=
"根据openId绑定用户手机号"
)
@ApiOperation
(
value
=
"根据openId绑定用户手机号"
)
@ApiImplicitParams
(
@ApiImplicitParams
(
...
...
card-paas/paas-app/app-business/src/main/java/cn/wise/sc/pay/pass/business/app/controller/cashier/AppShopController.java
View file @
5105aab0
...
@@ -27,10 +27,7 @@ import org.springframework.web.bind.annotation.*;
...
@@ -27,10 +27,7 @@ import org.springframework.web.bind.annotation.*;
import
javax.validation.Valid
;
import
javax.validation.Valid
;
import
javax.validation.constraints.NotEmpty
;
import
javax.validation.constraints.NotEmpty
;
import
java.util.ArrayList
;
import
java.util.*
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
/**
* @description: 在线点单 商铺
* @description: 在线点单 商铺
...
@@ -77,115 +74,119 @@ public class AppShopController {
...
@@ -77,115 +74,119 @@ public class AppShopController {
}
}
@GetMapping
(
"/goods/{shopId}"
)
@GetMapping
(
{
"/goods/{shopId}"
}
)
@ApiOperation
(
"获取商铺下的商品列表"
)
@ApiOperation
(
"获取商铺下的商品列表"
)
public
BaseResponse
<
List
<
GoodsVO
>>
getGoodsByShopId
(
@PathVariable
(
"shopId"
)
Long
shopId
,
Long
tableId
,
String
type
)
{
public
BaseResponse
<
List
<
GoodsVO
>>
getGoodsByShopId
(
@PathVariable
(
"shopId"
)
Long
shopId
,
Long
tableId
,
String
type
)
{
BaseResponse
<
List
<
HashMap
>>
goodsBaseResponse
=
iGoodsService
.
list
(
shopId
.
intValue
(),
""
,
type
,
1
);
BaseResponse
<
List
<
HashMap
>>
goodsBaseResponse
=
this
.
iGoodsService
.
list
(
shopId
.
intValue
(),
""
,
type
,
1
);
List
<
HashMap
>
list
=
goodsBaseResponse
.
getData
();
List
<
HashMap
>
list
=
(
List
)
goodsBaseResponse
.
getData
();
List
<
GoodsVO
>
rts
=
new
ArrayList
<>();
List
<
GoodsVO
>
rts
=
new
ArrayList
();
for
(
HashMap
map
:
list
)
{
Iterator
var7
=
list
.
iterator
();
GoodsVO
goodsVO
=
BeanUtil
.
mapToBean
(
map
,
GoodsVO
.
class
,
true
);
goodsVO
.
setCover
(
fastDfsUtil
.
fullUrl
(
goodsVO
.
getCover
()));
while
(
var7
.
hasNext
())
{
HashMap
map
=
(
HashMap
)
var7
.
next
();
GoodsVO
goodsVO
=
(
GoodsVO
)
BeanUtil
.
mapToBean
(
map
,
GoodsVO
.
class
,
true
);
goodsVO
.
setCover
(
this
.
fastDfsUtil
.
fullUrl
(
goodsVO
.
getCover
()));
rts
.
add
(
goodsVO
);
rts
.
add
(
goodsVO
);
}
}
return
BaseResponse
.
ok
(
rts
);
}
@PostMapping
(
"/newOrder"
)
@ApiOperation
(
"新增一个订单"
)
@ApiImplicitParam
(
name
=
"orderDetailQuery"
,
value
=
"订单请求"
,
paramType
=
"body"
,
dataType
=
"OrderDetailQuery"
)
public
BaseResponse
newOrder
(
@RequestBody
OrderDetailQuery
orderDetailQuery
){
orderDetailQuery
.
setStatus
(
OrderStatus
.
WAIT_PAY
.
name
());
if
(
orderDetailQuery
.
getPayPrice
()
==
0
){
BaseResponse
response
=
iCashierOrdersService
.
newOrder
(
orderDetailQuery
);
if
(
response
.
getCode
()
==
200
){
Orders
order
=
(
Orders
)
response
.
getData
();
orderDetailQuery
.
setOrderNo
(
order
.
getOrderNo
());
orderDetailQuery
.
setPayStatus
(
PayStatus
.
PAY_YES
.
name
());
orderDetailQuery
.
setStatus
(
OrderStatus
.
COMPLETE
.
name
());
orderDetailQuery
.
setPayment
(
"赠送"
);
return
iCashierOrdersService
.
editEntryOrder
(
orderDetailQuery
);
}
else
{
return
BaseResponse
.
ok
(
"赠送超时!请重试"
,
""
);
}
}
else
{
orderDetailQuery
.
setPaas
(
"APP"
);
return
iCashierOrdersService
.
newOrder
(
orderDetailQuery
);
}
}
public
static
void
main
(
String
[]
args
)
{
OrderDetailQuery
orderDetailQuery
=
new
OrderDetailQuery
();
orderDetailQuery
.
setOrderNo
(
"123456789"
);
orderDetailQuery
.
setCreateTime
(
1576746683827L
);
orderDetailQuery
.
setPayment
(
"支付宝"
);
orderDetailQuery
.
setPayPrice
(
80.00
);
orderDetailQuery
.
setUserId
(
1234L
);
orderDetailQuery
.
setUserPhone
(
"13123456789"
);
orderDetailQuery
.
setRemark
(
"测试"
);
orderDetailQuery
.
setPaas
(
"app"
);
System
.
out
.
println
(
JSON
.
toJSONString
(
orderDetailQuery
));
}
@DeleteMapping
(
"{orderNo}"
)
return
BaseResponse
.
ok
(
rts
);
@ApiOperation
(
"取消订单"
)
@ApiImplicitParam
(
name
=
"orderNo"
,
value
=
"订单号儿"
,
paramType
=
"path"
,
dataType
=
"String"
)
public
BaseResponse
delOrder
(
@PathVariable
(
"orderNo"
)
String
orderNo
)
{
return
iCashierOrdersService
.
delOrder
(
orderNo
);
}
@GetMapping
(
"listApp/user/{userId}/{status}"
)
@ApiOperation
(
"查询用户订单"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"userId"
,
value
=
"用户id"
,
paramType
=
"path"
,
dataType
=
"Integer"
),
@ApiImplicitParam
(
name
=
"status"
,
value
=
"订单状态"
,
paramType
=
"path"
,
dataType
=
"Integer"
)
})
public
BaseResponse
listUsers
(
@PathVariable
(
"userId"
)
Integer
userId
,
@PathVariable
(
"status"
)
Integer
status
){
BaseResponse
responseEntity
;
responseEntity
=
iCashierOrdersService
.
listUsers
(
userId
,
status
);
return
responseEntity
;
}
@GetMapping
(
"pageApp/user/{userId}/{status}"
)
@ApiOperation
(
"查询用户订单/分页"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"userId"
,
value
=
"用户id"
,
paramType
=
"path"
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"status"
,
value
=
"订单状态"
,
paramType
=
"path"
,
dataType
=
"Integer"
)
})
public
BaseResponse
pageAppUser
(
@PathVariable
(
"userId"
)
String
userId
,
@PathVariable
(
"status"
)
Integer
status
,
PageQuery
pageQuery
){
BaseResponse
responseEntity
;
responseEntity
=
iCashierOrdersService
.
getOrdersPage
(
userId
,
status
,
pageQuery
);
return
responseEntity
;
}
}
@PutMapping
(
"/afterApp/success/{orderNo}"
)
@ApiOperation
(
"支付成功后的回调"
)
public
BaseResponse
afterSuccess
(
@PathVariable
(
"orderNo"
)
String
orderNo
){
BaseResponse
response
=
iCashierOrdersService
.
afterSuccess
(
orderNo
);
if
(
response
.
code
==
200
){
Map
map
=
new
HashMap
();
map
.
put
(
"order_no"
,
orderNo
);
OrderResponse
oneOrderResponse
=
ordersService
.
getOneOrder
(
JSON
.
toJSONString
(
map
));
Orders
orders
=
oneOrderResponse
.
getData
();
//佣金推送
// @PostMapping("/newOrder")
if
(
orders
!=
null
&&
oneOrderResponse
.
getCode
()
==
200
){
// @ApiOperation("新增一个订单")
if
(
OrderStatus
.
WAIT_COMMENT
.
name
().
equals
(
orders
.
getOrderStatus
())){
// @ApiImplicitParam(name = "orderDetailQuery",value = "订单请求",paramType = "body",dataType = "OrderDetailQuery")
merchantProfitService
.
addMoneyData
(
orders
.
getSellerId
(),
// public BaseResponse newOrder(@RequestBody OrderDetailQuery orderDetailQuery){
orders
.
getId
(),
orders
.
getPaymentMethodName
(),
orders
.
getPayPrice
(),
// orderDetailQuery.setStatus(OrderStatus.WAIT_PAY.name());
orders
.
getCreateTime
());
//
}
// if (orderDetailQuery.getPayPrice() == 0){
}
// BaseResponse response = iCashierOrdersService.newOrder(orderDetailQuery);
}
// if (response.getCode() == 200){
return
response
;
// Orders order = (Orders) response.getData();
}
// orderDetailQuery.setOrderNo(order.getOrderNo());
// orderDetailQuery.setPayStatus(PayStatus.PAY_YES.name());
@PutMapping
(
"/afterApp/fail/{orderNo}"
)
// orderDetailQuery.setStatus(OrderStatus.COMPLETE.name());
@ApiOperation
(
"支付失败后的回调"
)
// orderDetailQuery.setPayment("赠送");
public
BaseResponse
afterFail
(
@PathVariable
(
"orderNo"
)
String
orderNo
)
{
// return iCashierOrdersService.editEntryOrder(orderDetailQuery);
return
iCashierOrdersService
.
afterFail
(
orderNo
);
// }else {
}
// return BaseResponse.ok("赠送超时!请重试","");
// }
// }else {
// orderDetailQuery.setPaas("APP");
// return iCashierOrdersService.newOrder(orderDetailQuery);
// }
// }
//
// public static void main(String[] args) {
// OrderDetailQuery orderDetailQuery = new OrderDetailQuery();
// orderDetailQuery.setOrderNo("123456789");
// orderDetailQuery.setCreateTime(1576746683827L);
// orderDetailQuery.setPayment("支付宝");
// orderDetailQuery.setPayPrice(80.00);
// orderDetailQuery.setUserId(1234L);
// orderDetailQuery.setUserPhone("13123456789");
// orderDetailQuery.setRemark("测试");
// orderDetailQuery.setPaas("app");
// System.out.println(JSON.toJSONString(orderDetailQuery));
// }
//
//
// @DeleteMapping("{orderNo}")
// @ApiOperation("取消订单")
// @ApiImplicitParam(name = "orderNo", value = "订单号儿", paramType = "path", dataType = "String")
// public BaseResponse delOrder(@PathVariable("orderNo") String orderNo) {
// return iCashierOrdersService.delOrder(orderNo);
// }
//
// @GetMapping("listApp/user/{userId}/{status}")
// @ApiOperation("查询用户订单")
// @ApiImplicitParams({
// @ApiImplicitParam(name = "userId",value = "用户id",paramType = "path",dataType = "Integer"),
// @ApiImplicitParam(name = "status",value = "订单状态",paramType = "path",dataType = "Integer")
// })
// public BaseResponse listUsers(@PathVariable("userId") Integer userId , @PathVariable("status") Integer status){
// BaseResponse responseEntity;
// responseEntity = iCashierOrdersService.listUsers(userId,status);
// return responseEntity;
// }
//
// @GetMapping("pageApp/user/{userId}/{status}")
// @ApiOperation("查询用户订单/分页")
// @ApiImplicitParams({
// @ApiImplicitParam(name = "userId",value = "用户id",paramType = "path",dataType = "String"),
// @ApiImplicitParam(name = "status",value = "订单状态",paramType = "path",dataType = "Integer")
// })
// public BaseResponse pageAppUser(@PathVariable("userId") String userId,@PathVariable("status") Integer status,PageQuery pageQuery){
// BaseResponse responseEntity;
// responseEntity = iCashierOrdersService.getOrdersPage(userId,status,pageQuery);
// return responseEntity;
// }
//
// @PutMapping("/afterApp/success/{orderNo}")
// @ApiOperation("支付成功后的回调")
// public BaseResponse afterSuccess(@PathVariable("orderNo")String orderNo){
// BaseResponse response = iCashierOrdersService.afterSuccess(orderNo);
// if (response.code == 200){
// Map map = new HashMap();
// map.put("order_no",orderNo);
// OrderResponse oneOrderResponse = ordersService.getOneOrder(JSON.toJSONString(map));
// Orders orders = oneOrderResponse.getData();
//
// //佣金推送
// if (orders != null && oneOrderResponse.getCode() == 200){
// if (OrderStatus.WAIT_COMMENT.name().equals(orders.getOrderStatus())){
// merchantProfitService.addMoneyData(orders.getSellerId(),
// orders.getId(),orders.getPaymentMethodName(),orders.getPayPrice(),
// orders.getCreateTime());
// }
// }
// }
// return response;
// }
//
// @PutMapping("/afterApp/fail/{orderNo}")
// @ApiOperation("支付失败后的回调")
// public BaseResponse afterFail(@PathVariable("orderNo") String orderNo) {
// return iCashierOrdersService.afterFail(orderNo);
// }
}
}
card-paas/paas-app/app-business/src/main/java/cn/wise/sc/pay/pass/business/app/model/query/OpenIdRegisterQuery.java
View file @
5105aab0
...
@@ -49,14 +49,14 @@ public class OpenIdRegisterQuery implements Serializable {
...
@@ -49,14 +49,14 @@ public class OpenIdRegisterQuery implements Serializable {
/**
/**
* 性别
* 性别
*/
*/
@NotEmpty
(
message
=
"性别不能为空"
)
//
@NotEmpty(message = "性别不能为空")
@ApiModelProperty
(
value
=
"性别"
,
required
=
true
)
@ApiModelProperty
(
value
=
"性别"
,
required
=
true
)
private
String
sex
;
private
String
sex
;
/**
/**
* 城市
* 城市
*/
*/
@NotEmpty
(
message
=
"所在城市不能为空!"
)
//
@NotEmpty(message = "所在城市不能为空!")
@ApiModelProperty
(
value
=
"城市"
,
required
=
true
)
@ApiModelProperty
(
value
=
"城市"
,
required
=
true
)
private
String
city
;
private
String
city
;
}
}
card-paas/paas-app/app-business/src/main/resources/bootstrap.yml
View file @
5105aab0
...
@@ -30,7 +30,6 @@ spring:
...
@@ -30,7 +30,6 @@ spring:
driver-class-name
:
com.mysql.cj.jdbc.Driver
driver-class-name
:
com.mysql.cj.jdbc.Driver
druid
:
druid
:
url
:
jdbc:mysql://127.0.0.1:3306/oxo_main_data?useUnicode=true&characterEncoding=UTF-8&useSSL=false
url
:
jdbc:mysql://127.0.0.1:3306/oxo_main_data?useUnicode=true&characterEncoding=UTF-8&useSSL=false
# url: jdbc:mysql://81.68.92.175:3306/oxo_main_data?useUnicode=true&characterEncoding=UTF-8&useSSL=false
username
:
root
username
:
root
password
:
admin!@#123
password
:
admin!@#123
driver-class-name
:
com.mysql.cj.jdbc.Driver
driver-class-name
:
com.mysql.cj.jdbc.Driver
...
@@ -112,19 +111,3 @@ logging:
...
@@ -112,19 +111,3 @@ logging:
com.alibaba.nacos.client.naming
:
error
com.alibaba.nacos.client.naming
:
error
mybatis-plus
:
mybatis-plus
:
mapper-locations
:
classpath*:mapper/*.xml
mapper-locations
:
classpath*:mapper/*.xml
---
##nacos部署地址
spring
:
profiles
:
dev-line
cloud
:
nacos
:
discovery
:
namespace
:
e9d52f53-3cc4-4748-86bf-d28c16ad36fd
config
:
#命名空间
namespace
:
e9d52f53-3cc4-4748-86bf-d28c16ad36fd
nacos
:
ip
:
42.159.86.77
server
:
port
:
9002
card-paas/paas-cashier/cashiers-business/src/main/java/cn/wise/sc/pay/pass/business/cashiers/controller/merchant/MerchDiscountController.java
View file @
5105aab0
...
@@ -58,23 +58,24 @@ public class MerchDiscountController {
...
@@ -58,23 +58,24 @@ public class MerchDiscountController {
return
iMerchDiscountService
.
addNewMerchDiscount
(
merchDiscount
);
return
iMerchDiscountService
.
addNewMerchDiscount
(
merchDiscount
);
}
}
public
static
void
main
(
String
[]
args
)
{
// public static void main(String[] args) {
MerchDiscount
merchDiscount
=
new
MerchDiscount
();
// MerchDiscount merchDiscount = new MerchDiscount();
merchDiscount
.
setId
(
1L
);
// merchDiscount.setId(1L);
merchDiscount
.
setSellerId
(
1L
);
// merchDiscount.setSellerId(1L);
List
<
MerchDiscount
.
DiscountSetting
>
list
=
new
ArrayList
<>();
// List<MerchDiscount.DiscountSetting> list = new ArrayList<>();
MerchDiscount
.
DiscountSetting
a
=
new
MerchDiscount
.
DiscountSetting
();
// MerchDiscount.DiscountSetting a = new MerchDiscount.DiscountSetting();
a
.
setDiscount
(
200
D
);
// a.setDiscount(200D);
a
.
setId
(
"1"
);
// a.setId("1");
MerchDiscount
.
DiscountSetting
b
=
new
MerchDiscount
.
DiscountSetting
();
// MerchDiscount.DiscountSetting b = new MerchDiscount.DiscountSetting();
b
.
setDiscount
(
200
D
);
// b.setDiscount(200D);
b
.
setId
(
"1"
);
// b.setId("1");
list
.
add
(
a
);
// list.add(a);
list
.
add
(
b
);
// list.add(b);
String
str
=
JSON
.
toJSONString
(
list
);
// String str = JSON.toJSONString(list);
merchDiscount
.
setDiscountStr
(
str
);
// merchDiscount.setDiscountStr(str);
System
.
out
.
println
(
JSON
.
toJSONString
(
merchDiscount
));
// System.out.println(JSON.toJSONString(merchDiscount));
}
// }
@PostMapping
(
"/delete/{id}"
)
@PostMapping
(
"/delete/{id}"
)
@ApiOperation
(
"删除一个折扣信息"
)
@ApiOperation
(
"删除一个折扣信息"
)
BaseResponse
<
Boolean
>
deleteMerchDiscount
(
@PathVariable
(
"id"
)
Long
id
){
BaseResponse
<
Boolean
>
deleteMerchDiscount
(
@PathVariable
(
"id"
)
Long
id
){
...
...
card-paas/paas-manager/manager-business/src/main/java/cn/wise/sc/pay/pass/business/manager/controller/UserControler.java
View file @
5105aab0
...
@@ -192,9 +192,13 @@ public class UserControler extends UserController {
...
@@ -192,9 +192,13 @@ public class UserControler extends UserController {
List
<
LinkedHashMap
>
result
=
userPointsMShipExtraService
.
getAllUserExtra
(
userId
).
getList
();
List
<
LinkedHashMap
>
result
=
userPointsMShipExtraService
.
getAllUserExtra
(
userId
).
getList
();
List
<
UserExtra
>
userExtras
=
JSON
.
parseArray
(
JSON
.
toJSONString
(
result
),
UserExtra
.
class
);
List
<
UserExtra
>
userExtras
=
JSON
.
parseArray
(
JSON
.
toJSONString
(
result
),
UserExtra
.
class
);
List
<
SysUserInfoVO
>
res
=
new
ArrayList
<>();
List
<
SysUserInfoVO
>
res
=
new
ArrayList
<>();
users
.
stream
()
users
.
stream
()
.
forEach
(
.
forEach
(
arg
->
{
arg
->
{
System
.
out
.
println
(
"=======================arg================= \n"
+
arg
.
getUserId
());
UserExtra
user
=
UserExtra
user
=
userExtras
.
stream
()
userExtras
.
stream
()
.
filter
(
parm
->
Integer
.
toUnsignedLong
(
arg
.
getUserId
())
==
parm
.
getUserId
())
.
filter
(
parm
->
Integer
.
toUnsignedLong
(
arg
.
getUserId
())
==
parm
.
getUserId
())
...
@@ -203,6 +207,7 @@ public class UserControler extends UserController {
...
@@ -203,6 +207,7 @@ public class UserControler extends UserController {
SysUserInfoVO
sysUserInfoVO
=
new
SysUserInfoVO
();
SysUserInfoVO
sysUserInfoVO
=
new
SysUserInfoVO
();
BeanUtil
.
copyProperties
(
user
,
sysUserInfoVO
);
BeanUtil
.
copyProperties
(
user
,
sysUserInfoVO
);
BeanUtil
.
copyProperties
(
arg
,
sysUserInfoVO
);
BeanUtil
.
copyProperties
(
arg
,
sysUserInfoVO
);
sysUserInfoVO
.
setCreateTime
(
arg
.
getCreateTime
());
res
.
add
(
sysUserInfoVO
);
res
.
add
(
sysUserInfoVO
);
});
});
Page
pageResult
=
new
Page
(
page
.
getCurrent
(),
page
.
getSize
(),
page
.
getTotal
());
Page
pageResult
=
new
Page
(
page
.
getCurrent
(),
page
.
getSize
(),
page
.
getTotal
());
...
...
card-saas/saas-cashier/cashier-business/src/main/java/cn/wise/sc/pay/business/cashier/controller/GoodsController.java
View file @
5105aab0
...
@@ -30,15 +30,7 @@ import io.swagger.annotations.ApiImplicitParams;
...
@@ -30,15 +30,7 @@ import io.swagger.annotations.ApiImplicitParams;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.core.env.Environment
;
import
org.springframework.core.env.Environment
;
import
org.springframework.web.bind.annotation.CrossOrigin
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.DeleteMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PutMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.springframework.web.multipart.MultipartFile
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
...
@@ -447,7 +439,7 @@ public class GoodsController {
...
@@ -447,7 +439,7 @@ public class GoodsController {
@ApiImplicitParam
(
name
=
"id"
,
value
=
"类型id"
,
paramType
=
"path"
,
dataType
=
"Long"
),
@ApiImplicitParam
(
name
=
"id"
,
value
=
"类型id"
,
paramType
=
"path"
,
dataType
=
"Long"
),
@ApiImplicitParam
(
name
=
"field1"
,
value
=
"商品价格"
,
paramType
=
"path"
,
dataType
=
"String"
)
@ApiImplicitParam
(
name
=
"field1"
,
value
=
"商品价格"
,
paramType
=
"path"
,
dataType
=
"String"
)
})
})
public
BaseResponse
<
String
>
updateField1
(
Long
id
,
String
field1
){
public
BaseResponse
<
String
>
updateField1
(
@RequestParam
(
"id"
)
Long
id
,
@RequestParam
(
"field1"
)
String
field1
){
return
iGoodsService
.
updateField1
(
id
,
field1
);
return
iGoodsService
.
updateField1
(
id
,
field1
);
}
}
}
}
card-saas/saas-order/order-business/src/main/resources/bootstrap.yml
View file @
5105aab0
...
@@ -3,8 +3,8 @@ server:
...
@@ -3,8 +3,8 @@ server:
spring
:
spring
:
main
:
main
:
allow-bean-definition-overriding
:
true
allow-bean-definition-overriding
:
true
#
profiles:
profiles
:
#
active: @activatedProperties@
active
:
@
activatedProperties@
#项目工程名,同时用于服务发现
#项目工程名,同时用于服务发现
application
:
application
:
name
:
saas-v1-order
name
:
saas-v1-order
...
...
card-saas/saas-points/points-business/src/main/java/cn/wise/sc/pay/business/points/service/impl/UserExtraServiceImpl.java
View file @
5105aab0
...
@@ -15,6 +15,7 @@ import cn.wise.sc.pay.domain.point.cnst.PointTypeConsts;
...
@@ -15,6 +15,7 @@ import cn.wise.sc.pay.domain.point.cnst.PointTypeConsts;
import
cn.wise.sc.pay.domain.point.query.PointDetailQuery
;
import
cn.wise.sc.pay.domain.point.query.PointDetailQuery
;
import
cn.wise.sc.pay.domain.point.query.UserExreaQuery
;
import
cn.wise.sc.pay.domain.point.query.UserExreaQuery
;
import
cn.wise.sc.pay.domain.point.vo.UserExtraVOApp
;
import
cn.wise.sc.pay.domain.point.vo.UserExtraVOApp
;
import
com.alibaba.fastjson.JSON
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
...
@@ -124,6 +125,10 @@ public class UserExtraServiceImpl extends ServiceImpl<UserExtraMapper, UserExtra
...
@@ -124,6 +125,10 @@ public class UserExtraServiceImpl extends ServiceImpl<UserExtraMapper, UserExtra
try
{
try
{
List
<
UserExtra
>
list
=
userExtraMapper
.
getList
(
userIds
);
List
<
UserExtra
>
list
=
userExtraMapper
.
getList
(
userIds
);
System
.
out
.
println
(
"=======================list================================"
);
System
.
out
.
println
(
JSON
.
toJSONString
(
userIds
));
System
.
out
.
println
(
JSON
.
toJSONString
(
list
));
return
BaseResponse
.
ok
(
list
,
UserExtra
.
class
);
return
BaseResponse
.
ok
(
list
,
UserExtra
.
class
);
}
catch
(
Exception
ex
)
{
}
catch
(
Exception
ex
)
{
return
BaseResponse
.
error
(
"查询失败"
,
UserExtra
.
class
.
getName
());
return
BaseResponse
.
error
(
"查询失败"
,
UserExtra
.
class
.
getName
());
...
...
timer-task/order-timer-task/src/main/resources/bootstrap.yaml
View file @
5105aab0
...
@@ -24,7 +24,7 @@ spring:
...
@@ -24,7 +24,7 @@ spring:
allow-bean-definition-overriding
:
true
allow-bean-definition-overriding
:
true
datasource
:
datasource
:
druid
:
druid
:
url
:
jdbc:mysql://
81.68.92.175:3306/oxo_orders?useUnicode=true&characterEncoding=UTF-8&autoReconnect=tru
e
url
:
jdbc:mysql://
127.0.0.1:3306/oxo_main_data?useUnicode=true&characterEncoding=UTF-8&useSSL=fals
e
username
:
root
username
:
root
password
:
admin!@#123
password
:
admin!@#123
initial-size
:
8
initial-size
:
8
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment