入驻新增店铺
This commit is contained in:
parent
23f2e8a7e2
commit
75e04de658
@ -78,7 +78,6 @@ public class AdminBaseMenuServiceImpl extends BaseServiceImpl<AdminBaseMenuMappe
|
||||
@Override
|
||||
public List<Router> getRouterList() {
|
||||
UserDto user = getCurrentUser();
|
||||
// log.debug("##### 当前登录用户:{}###", JsonUtil.object2json(user));
|
||||
|
||||
if (ObjectUtil.isEmpty(user)) {
|
||||
throw new ApiException(ResultCode.UNAUTHORIZED);
|
||||
@ -888,6 +887,7 @@ public class AdminBaseMenuServiceImpl extends BaseServiceImpl<AdminBaseMenuMappe
|
||||
|
||||
/**
|
||||
* 校验是否为平台
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
private void checkouRole() {
|
||||
|
||||
@ -40,7 +40,7 @@ public class ContextUtil {
|
||||
public static UserDto getCurrentUser() {
|
||||
try {
|
||||
UserDto loginUser = staticUserInfoService.getUser();
|
||||
log.info("##### 当前登录用户:{}###", JsonUtil.object2json(loginUser));
|
||||
// log.info("##### 当前登录用户:{}###", JsonUtil.object2json(loginUser));
|
||||
return loginUser;
|
||||
} catch (Exception e) {
|
||||
System.out.println(e.getMessage());
|
||||
|
||||
@ -238,14 +238,13 @@ public class LakalaPayServiceImpl implements LakalaPayService {
|
||||
JSONObject reqData = new JSONObject();
|
||||
|
||||
// 基本交易信息
|
||||
reqData.put("merchant_no", agentMerchantNo); // 商户号
|
||||
reqData.put("merchant_no", merchantNo); // 商户号
|
||||
reqData.put("term_no", termNo); // 终端号
|
||||
reqData.put("out_trade_no", orderId); // 商户订单号
|
||||
reqData.put("account_type", "WECHAT"); // 账户类型:微信支付
|
||||
reqData.put("trans_type", "51"); // 交易类型:JSAPI
|
||||
reqData.put("total_amount", totalAmount); // 总金额(单位:分)
|
||||
reqData.put("subject", subject); // 订单标题
|
||||
reqData.put("settle_type", "1"); // 结算类型:分账类型
|
||||
reqData.put("notify_url", notifyURL); // 异步通知地址
|
||||
reqData.put("remark", remark); // 备注
|
||||
|
||||
@ -266,6 +265,8 @@ public class LakalaPayServiceImpl implements LakalaPayService {
|
||||
outSplitInfo.put("merchant_no", agentMerchantNo); // 分账商户号
|
||||
outSplitInfo.put("term_no", agentTermNo); // 分账终端号
|
||||
outSplitInfo.put("amount", agentAmount); // 分账金额
|
||||
outSplitInfo.put("settle_type", "0"); // "0"或者空,常规结算方式
|
||||
outSplitInfo.put("sub_remark", "收取订单运费"); // 子单备注信息
|
||||
reqData.put("out_split_info", outSplitInfo);
|
||||
|
||||
// 5. 构造请求体
|
||||
|
||||
@ -4824,7 +4824,8 @@ public class ShopOrderBaseServiceImpl extends BaseServiceImpl<ShopOrderBaseMappe
|
||||
List<Long> product_ids = orderItemList.stream().map(ShopOrderItem::getProduct_id).collect(Collectors.toList());
|
||||
List<ShopProductIndex> indexList = shopProductIndexService.gets(product_ids);
|
||||
|
||||
if (CheckUtil.checkDataRights(user_id, orderBaseList, ShopOrderBase::getBuyer_user_id) || CheckUtil.checkDataRights(store_id, orderBaseList, ShopOrderBase::getStore_id)) {
|
||||
if (CheckUtil.checkDataRights(user_id, orderBaseList, ShopOrderBase::getBuyer_user_id)
|
||||
|| CheckUtil.checkDataRights(store_id, orderBaseList, ShopOrderBase::getStore_id)) {
|
||||
// 判断是否为供应商代发订单
|
||||
QueryWrapper<ShopOrderInfo> infoQueryWrapper = new QueryWrapper<>();
|
||||
infoQueryWrapper.in("src_order_id", order_ids);
|
||||
|
||||
@ -3284,7 +3284,7 @@ public class ShopStoreBaseServiceImpl extends BaseServiceImpl<ShopStoreBaseMappe
|
||||
|
||||
|
||||
QueryWrapper<ShopStoreEmployee> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("store_id", storeId).eq("user_id", userId);
|
||||
queryWrapper.eq("store_id", storeId).eq("user_id", userId).eq("employee_is_admin", CommonConstant.Enable);
|
||||
if (shopStoreEmployeeService.count(queryWrapper) <= 0) {
|
||||
// shop_store_employee 店铺员工,添加管理员
|
||||
ShopStoreEmployee shopStoreEmployee = new ShopStoreEmployee();
|
||||
@ -3481,7 +3481,8 @@ public class ShopStoreBaseServiceImpl extends BaseServiceImpl<ShopStoreBaseMappe
|
||||
UpdateWrapper<ShopStoreEmployee> queryWrapper = new UpdateWrapper<>();
|
||||
queryWrapper.eq("user_id", userId).eq("store_id", storeId)
|
||||
.set("rights_group_id", CollUtil.join(rights_group_id, ","))
|
||||
.set("employee_is_admin", CommonConstant.USER_TYPE_ADMIN);
|
||||
.set("employee_is_admin", CommonConstant.Enable)
|
||||
.set("employee_is_kefu", CommonConstant.Enable);
|
||||
if (!shopStoreEmployeeService.update(queryWrapper)) {
|
||||
// throw new ApiException(I18nUtil._("设置店铺管理员权限失败"));
|
||||
log.error("设置店铺管理员权限失败!");
|
||||
|
||||
Loading…
Reference in New Issue
Block a user