package com.jiumi.webapi.controller;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.NumberUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.jiumi.baseconfig.domain.BaseSearchHistory;
import com.jiumi.baseconfig.domain.BaseUserAddress;
import com.jiumi.baseconfig.domain.BaseUserMsg;
import com.jiumi.baseconfig.service.IBaseSearchHistoryService;
import com.jiumi.baseconfig.service.IBaseUserAddressService;
import com.jiumi.baseconfig.service.IBaseUserMsgService;
import com.jiumi.business.domain.*;
import com.jiumi.business.service.*;
import com.jiumi.common.annotation.Log;
import com.jiumi.common.config.JiumiConfig;
import com.jiumi.common.constant.UserConstants;
import com.jiumi.common.core.controller.BaseController;
import com.jiumi.common.core.domain.AjaxResult;
import com.jiumi.common.core.domain.entity.SysDictData;
import com.jiumi.common.core.domain.entity.SysUser;
import com.jiumi.common.core.domain.model.LoginUser;
import com.jiumi.common.core.page.TableDataInfo;
import com.jiumi.common.core.redis.RedisCache;
import com.jiumi.common.enums.BusinessType;
import com.jiumi.common.utils.DateUtils;
import com.jiumi.common.utils.SecurityUtils;
import com.jiumi.common.utils.StringUtils;
import com.jiumi.finance.domain.*;
import com.jiumi.finance.service.*;
import com.jiumi.goods.domain.BaseNumberCard;
import com.jiumi.goods.domain.OmsGoodsInfo;
import com.jiumi.goods.domain.OmsGoodsSku;
import com.jiumi.goods.service.IBaseNumberCardService;
import com.jiumi.goods.service.IOmsGoodsInfoService;
import com.jiumi.goods.service.IOmsGoodsSkuService;
import com.jiumi.pay.domain.util.AjaxPayResult;
import com.jiumi.pay.domain.util.IpUtil;
import com.jiumi.pay.wxpay.WxPayApi;
import com.jiumi.pay.wxpay.WxPayApiConfigKit;
import com.jiumi.pay.wxpay.WxPayUtil;
import com.jiumi.pay.wxpay.config.WxPayApiConfig;
import com.jiumi.pay.wxpay.enums.TradeType;
import com.jiumi.pay.wxpay.model.UnifiedOrderModel;
import com.jiumi.shop.domain.BaseShopItem;
import com.jiumi.shop.domain.BaseShopItemConsultant;
import com.jiumi.shop.service.IBaseShopItemConsultantService;
import com.jiumi.shop.service.IBaseShopItemService;
import com.jiumi.system.service.ISysConfigService;
import com.jiumi.system.service.ISysDictDataService;
import com.jiumi.system.service.ISysDictTypeService;
import com.jiumi.system.service.ISysUserService;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang3.RandomStringUtils;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.HttpClientBuilder;
import org.apache.http.util.EntityUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.stereotype.Controller;
import org.springframework.util.ResourceUtils;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.websocket.server.PathParam;
import java.io.*;
import java.math.BigDecimal;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.*;
import static com.jiumi.pay.domain.util.SignType.HMACSHA256;
/**
* 需要授权接口
*
* @author jiumi
* @date 2021-08-18
*/
@RestController
@RequestMapping("/api/authcheck")
public class AuthCheckController extends BaseController
{
private static Logger log = LoggerFactory.getLogger(AuthCheckController.class);
@Autowired
private ISysUserService sysUserService;
@Autowired
private RedisCache redisCache;
@Autowired
private IOmsOrderInfoService omsOrderInfoService;
@Autowired
WxPayApiConfig wxPayApiConfig;
@Autowired
private IBaseSearchHistoryService baseSearchHistoryService;
@Autowired
private IBaseUserAddressService baseUserAddressService;
@Autowired
private IBaseUserMsgService baseUserMsgService;
@Autowired
private ISysDictTypeService dictTypeService;
@Autowired
private IOmsOrderItemService omsOrderItemService;
@Autowired
private ISysConfigService configService;
@Autowired
private ISysDictDataService sysDictDataService;
@Autowired
private IOmsItemApplyService omsItemApplyService;
@Autowired
private IBaseShopItemService baseShopItemService;
@Autowired
private IOmsGoodsSkuService omsGoodsSkuService;
@Autowired
private IOmsGoodsInfoService omsGoodsInfoService;
@Autowired
private IOmsGoodsCartService omsGoodsCartService;
@Autowired
private IUserIncomeDetailService userIncomeDetailService;
@Autowired
private IUserWithdrawDetailService userWithdrawDetailService;
@Autowired
private IUserInviteDetailService userInviteDetailService;
@Autowired
private IOmsVipInfoService omsVipInfoService;
@Autowired
private IBaseShopItemConsultantService baseShopItemConsultantService;
@Autowired
private IBaseNumberCardService baseNumberCardService;
@Autowired
private IUserRechargeDetailService userRechargeDetailService;
@Autowired
private IUserNumberCardDetailService userNumberCardDetailService;
@Autowired
private IOmsOrderItemInfoService omsOrderItemInfoService;
@Autowired
private IOmsOrderItemDetailService omsOrderItemDetailService;
private static final int amountPercent=1000; //支付比例
private static int freightFree=500; //满500包邮
/**
* 个人信息
*/
@GetMapping("/getUserInfo")
@ApiOperation("获取用户详细信息")
public AjaxResult getUserInfo()
{
LoginUser loginUser = SecurityUtils.getLoginUser();
SysUser user =sysUserService.selectUserById(loginUser.getUser().getUserId());
String consultantFlag= sysUserService.checkConsultantFlag(user);
user.setConsultantFlag(consultantFlag);
OmsVipInfo vipInfo=omsVipInfoService.selectOmsVipInfoByVipLevel(Long.valueOf(user.getVipLevel()));
Map result=new HashMap();
result.put("userInfo",user);
result.put("vipInfo",vipInfo);
return AjaxResult.success(result);
}
@ApiOperation("立即预约项目")
@PostMapping(value = "/applyShopItem")
public AjaxResult applyShopItem(@Validated @RequestBody OmsItemApply omsItemApply)
{
omsItemApply.setStatus("01");
omsItemApply.setApplyUserId(SecurityUtils.getUserId());
omsItemApply.setCreateBy(SecurityUtils.getUsername());
omsItemApply.setCreateTime(DateUtils.getNowDate());
BaseShopItem item=baseShopItemService.selectBaseShopItemById(omsItemApply.getItemId()+"");
omsItemApply.setShopItem(item);
int result=omsItemApplyService.insertOmsItemApply(omsItemApply);
return AjaxResult.success(result);
}
@ApiOperation("修改用户信息")
@PutMapping("/editUserInfo")
public AjaxResult editUserInfo(@Validated @RequestBody SysUser user)
{
sysUserService.checkUserAllowed(user);
if (StringUtils.isNotEmpty(user.getPhonenumber())
&& UserConstants.NOT_UNIQUE.equals(sysUserService.checkPhoneUnique(user)))
{
return AjaxResult.error("修改用户'" + user.getUserName() + "'失败,手机号码已存在");
}
else if (StringUtils.isNotEmpty(user.getEmail())
&& UserConstants.NOT_UNIQUE.equals(sysUserService.checkEmailUnique(user)))
{
return AjaxResult.error("修改用户'" + user.getUserName() + "'失败,邮箱账号已存在");
}
user.setUpdateBy(getUsername());
return toAjax(sysUserService.updateUser(user));
}
@ApiOperation("获取用户消息列表")
@PostMapping("/getU
没有合适的资源?快使用搜索试试~ 我知道了~
小象智慧美容小程序:连锁美容机构管理与在线预约平台
共1547个文件
class:527个
java:480个
xml:123个
需积分: 0 0 下载量 128 浏览量
2024-11-15
13:27:06
上传
评论
收藏 5.94MB ZIP 举报
温馨提示
小象智慧美容小程序支持全国连锁美容机构线上客户管理、门店管理、商品管理、项目管理,支持在线预约,在线下单,特色项目展示等功能, 项目由成熟上线产品改造而成,非常适合美容连锁门店使用,非常适合企业或个人二次开发; 官网 官网地址:https://www.xiaoxiangai.com 软件架构 1、SpringBoot2+Jpa+MybatisPlus+SpringSecurity+jwt+redis+Vue 美容连锁小程序功能 客户管理。 门店管理:门店配置、项目管理、顾问、顾问等级设置。 商品管理:商品类型、商品管理。 订单管理: 商品订单管理、门店项目预约、次卡管理、项目订单管理、次卡订单管理。 轮播图管理:轮播图。 内容管理:协议管理、品牌股市、精品案例。 财务管理:佣金管理、财务清单、跨店结算、用户邀请、线上支付明细、用户体现记录、线下消费明细等。 配置模块:各种配置。 安装教程 环境准备 用户权益 允许免费用于学习、毕设等。 代码文件需保留相关license信息。 禁止直接将本项目挂淘宝等商业平台出售。 禁止基于本项目直接进行商业项目和获利的相关行为。 非界面代码50%以上
资源推荐
资源详情
资源评论
收起资源包目录
小象智慧美容小程序:连锁美容机构管理与在线预约平台 (1547个子文件)
admin.bat 2KB
AuthCheckController.class 54KB
AliPayApi.class 39KB
WxPayController.class 31KB
ExcelUtil.class 30KB
OmsOrderItemInfoServiceImpl.class 28KB
AliPayController.class 27KB
SysUserController.class 21KB
WxPayApi.class 20KB
CertUtil.class 20KB
SDKUtil.class 19KB
AuthFreeController.class 17KB
SDKConfig.class 17KB
SysUserServiceImpl.class 17KB
GenTableServiceImpl.class 15KB
AcpService.class 15KB
Convert.class 13KB
SysMenuServiceImpl.class 13KB
HTMLFilter.class 13KB
SysLoginController.class 13KB
SysUser.class 12KB
executeTask.class 11KB
BaseShopInfoController.class 11KB
ReflectUtils.class 10KB
OmsOrderItemInfo.class 10KB
RsaUtil.class 10KB
VelocityUtils.class 10KB
PayUtil.class 10KB
BaseShopItemController.class 10KB
WxPayUtil.class 9KB
SysDeptServiceImpl.class 9KB
WxApiType.class 9KB
SecureUtil.class 9KB
SysRoleController.class 9KB
SysRoleServiceImpl.class 9KB
LogAspect.class 8KB
OmsOrderInfo.class 8KB
HttpUtils.class 8KB
OmsGoodsSkuController.class 8KB
Server.class 8KB
StringUtils.class 8KB
SDKConstants.class 8KB
GenController.class 8KB
RedisCache.class 8KB
SecurityConfig.class 8KB
GenTable.class 8KB
GenTableColumn.class 7KB
UnionPayApiConfig$Builder.class 7KB
SysLoginService.class 7KB
BaseShopItem.class 7KB
TokenService.class 7KB
OmsGoodsInfo.class 7KB
FileUploadUtils.class 7KB
XmlHelper.class 6KB
AliPayApiController.class 6KB
SysDeptController.class 6KB
SwaggerConfig.class 6KB
MyBatisConfig.class 6KB
UUID.class 6KB
VerifyCodeUtils.class 6KB
AliPayResultDO.class 6KB
SysProfileController.class 6KB
AbstractHttpDelegate.class 6KB
UserNumberCardDetailServiceImpl.class 6KB
SysJobController.class 6KB
AliPayApiConfig.class 6KB
UnifiedOrderModel$UnifiedOrderModelBuilder.class 6KB
QrCodeUtil.class 6KB
SysConfigServiceImpl.class 6KB
GenUtils.class 6KB
PayServiceImpl.class 6KB
OmsOrderItemDetail.class 6KB
DataScopeAspect.class 6KB
SysMenu.class 6KB
SysMenuController.class 5KB
SysJobServiceImpl.class 5KB
MicroPayModel$MicroPayModelBuilder.class 5KB
OmsOrderInfoServiceImpl.class 5KB
SysRole.class 5KB
UserWithdrawDetail.class 5KB
SysDictTypeController.class 5KB
UnifiedOrderModel.class 5KB
OmsGoodsInfoController.class 5KB
SysConfigController.class 5KB
UserWithdrawDetailController.class 5KB
SysDictTypeServiceImpl.class 5KB
AliPayResponseModel.class 5KB
JobInvokeUtil.class 5KB
SysPostController.class 5KB
CommonDataUtils.class 5KB
GlobalExceptionHandler.class 5KB
PayNotifyDO.class 5KB
SysOperLog.class 5KB
OmsItemApply.class 5KB
OmsOrderItemPayment.class 5KB
SysDictDataController.class 5KB
ScheduleUtils.class 5KB
OmsOrderItemPaymentController.class 5KB
MicroPayModel.class 5KB
UserWithdrawDetailServiceImpl.class 5KB
共 1547 条
- 1
- 2
- 3
- 4
- 5
- 6
- 16
资源评论
2401_84931056
- 粉丝: 0
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功