修改果酱官网统一路径

This commit is contained in:
DB 2024-01-24 14:50:37 +08:00
parent 16e38b177b
commit 42198f9ddc
15 changed files with 47 additions and 17 deletions

View File

@ -1,5 +1,6 @@
package com.cpop.core.gateway.miniProgram;
import com.cpop.common.utils.StringUtils;
import com.cpop.core.base.enums.UserType;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.springframework.security.authentication.AbstractAuthenticationToken;
@ -42,14 +43,28 @@ public class MiniProgramAuthenticationFilter extends AbstractAuthenticationProce
throw new RuntimeException(e);
}
String principal = (String) authenticationBean.get("phone");
if (StringUtils.isBlank(principal)){
throw new AuthenticationServiceException("登录手机号为空");
}
String openId = (String) authenticationBean.get("openId");
if (StringUtils.isBlank(openId)){
throw new AuthenticationServiceException("登录openId为空");
}
String appId = (String) authenticationBean.get("appId");
if (StringUtils.isBlank(appId)){
throw new AuthenticationServiceException("登录appId为空");
}
String brandId = (String) authenticationBean.get("brandId");
if (StringUtils.isBlank(brandId)){
throw new AuthenticationServiceException("登录brandId为空");
}
String nickName = (String) authenticationBean.get("nickName");
String avatar = (String) authenticationBean.get("avatar");
String sourceType = (String) authenticationBean.get("sourceType");
UserType userType = UserType.valueOf(authenticationBean.get("userType").toString());
//传递信息
if (StringUtils.isBlank(sourceType)){
throw new AuthenticationServiceException("登录sourceType为空");
}
UserType userType = UserType.valueOf(authenticationBean.get("userType").toString());//传递信息
HashMap<String, Object> credentials = new HashMap<>(2);
credentials.put("appId", appId);
credentials.put("openId", openId);

View File

@ -2,6 +2,7 @@ package com.cpop.core.handler;
import com.alibaba.fastjson.JSONObject;
import com.cpop.common.constant.Constants;
import com.cpop.common.utils.StringUtils;
import com.cpop.common.utils.ip.IpUtils;
import com.cpop.core.base.R;
import com.cpop.core.base.entity.LoginForm;
@ -54,8 +55,10 @@ public class LoginFailureHandler implements AuthenticationFailureHandler {
result = R.fail(errorMessage);
}
if (loginUser.getUserType() == UserType.OAM_USER || loginUser.getUserType() == UserType.MINI_USER) {
//添加登录失败日志
coreService.insertOperationLog(Constants.FAIL, OperationLogEnum.SYSTEM_LOGIN, loginUser, errorMessage);
if (StringUtils.isNotBlank(loginFormBo.getUsername())){
//添加登录失败日志
coreService.insertOperationLog(Constants.FAIL, OperationLogEnum.SYSTEM_LOGIN, loginUser, errorMessage);
}
}
outputStream.write(JSONObject.toJSONString(result).getBytes(StandardCharsets.UTF_8));
outputStream.flush();

View File

@ -68,4 +68,10 @@ public class LearnNowPayLaterUserSignPlansBo {
*/
@ApiModelProperty(value = "旧模板id")
private String oldTemplateId;
/**
* 顾问名
*/
@ApiModelProperty(value = "顾问名")
private String counselor;
}

View File

@ -28,7 +28,7 @@ import java.util.List;
@RestController
@Api(tags = "果酱模块化官网 业务数据表接口")
@RequestMapping("/backstage/businessData")
public class WebBusinessDataController {
public class BackstageBusinessDataController {
@Autowired
private BusinessDataService businessDataService;

View File

@ -28,7 +28,7 @@ import java.util.List;
@RestController
@Api(tags = "果酱模块化官网 业务介绍表接口")
@RequestMapping("/backstage/businessIntro")
public class WebBusinessIntroController {
public class BackstageBusinessIntroController {
@Autowired
private BusinessIntroService businessIntroService;

View File

@ -28,7 +28,7 @@ import java.util.List;
@RestController
@Api(tags = "果酱模块化官网 公司简介表接口")
@RequestMapping("/backstage/companyIntro")
public class WebCompanyIntroController {
public class BackstageCompanyIntroController {
@Autowired
private CompanyIntroService companyIntroService;

View File

@ -28,7 +28,7 @@ import java.util.List;
@RestController
@Api(tags = "果酱模块化官网 合作平台表接口")
@RequestMapping("/backstage/cooperation")
public class WebCooperationController {
public class BackstageCooperationController {
@Autowired
private CooperationService cooperationService;

View File

@ -29,7 +29,7 @@ import java.util.List;
@RestController
@Api(tags = "果酱模块化官网 合作类别表接口")
@RequestMapping("/backstage/cooperationType")
public class WebCooperationTypeController {
public class BackstageCooperationTypeController {
@Autowired
private CooperationTypeService cooperationTypeService;

View File

@ -23,7 +23,7 @@ import java.util.List;
@RestController
@Api(tags = "果酱模块化官网 发展历程表接口")
@RequestMapping("/backstage/development")
public class WebDevelopmentController {
public class BackstageDevelopmentController {
@Autowired
private DevelopmentService developmentService;

View File

@ -30,7 +30,7 @@ import java.util.List;
@RestController
@Api(tags = "果酱模块化官网 导航栏表接口")
@RequestMapping("/backstage/navigation")
public class WebNavigationController {
public class BackstageNavigationController {
@Autowired
private NavigationService navigationService;

View File

@ -27,8 +27,8 @@ import java.util.List;
*/
@RestController
@Api(tags = "果酱模块化官网 核心产品表接口")
@RequestMapping("/backstage/product")
public class WebProductController {
@RequestMapping("/backstage/webProduct")
public class BackstageWebProductController {
@Autowired
private WebProductService productService;

View File

@ -109,6 +109,11 @@ public class EasyLearnOrder extends BaseEntity implements Serializable {
*/
private String templateId;
/**
* 顾问
*/
private String counselor;
/**
* 逻辑删除0否1是
*/

View File

@ -744,7 +744,8 @@ public class EasyLearnOrderServiceImpl extends ServiceImpl<EasyLearnOrderMapper,
.setTotalPayAmount(BigDecimal.ZERO)
.setOrderType(0)
.setRate(OrderSource.LEARN_NOW_PAY_LATER.getRate())
.setTemplateId(bo.getTemplateId() == null ? bo.getOldTemplateId() : bo.getTemplateId());
.setTemplateId(bo.getTemplateId() == null ? bo.getOldTemplateId() : bo.getTemplateId())
.setCounselor(bo.getCounselor());
this.save(easyLearnOrder);
return easyLearnOrder.getId();
}

View File

@ -34,9 +34,9 @@ spring:
#
min-idle: 0
#
max-idle: 8
max-idle: 16
#
max-active: 8
max-active: 16
#
max-wait: -1ms
client-type: jedis

View File

@ -135,7 +135,7 @@ public class CpopWxPayTests {
public void getOrderInfo() throws WxPayException {
WxPayConfig config = wxPayService.getConfig();
config.setSubMchId("1661323640");
WxPayOrderQueryResult wxPayOrderQueryResult = wxPayService.queryOrder("4200002119202401230387612728", null);
WxPayOrderQueryResult wxPayOrderQueryResult = wxPayService.queryOrder("4200002124202401230220836382", null);
System.out.println(wxPayOrderQueryResult);
}