소스 검색

支付修改,用户注册取消初始密码

weifanli 3 년 전
부모
커밋
afdc35d187

+ 2 - 2
cooleshow-auth/auth-server/src/main/java/com/yonge/cooleshow/auth/service/impl/SysUserServiceImpl.java

@@ -143,8 +143,8 @@ public class SysUserServiceImpl extends BaseServiceImpl<Long, SysUser> implement
     public SysUserInfo registerUser(String phone, String clientId) {
         SysUser sysUser = new SysUser();
         sysUser.setPhone(phone);
-        String password = sysUser.getPhone().substring(sysUser.getPhone().length() - 6);
-        sysUser.setPassword(new BCryptPasswordEncoder().encode(password));
+        //String password = sysUser.getPhone().substring(sysUser.getPhone().length() - 6);
+        //sysUser.setPassword(new BCryptPasswordEncoder().encode(password));
         String defaultHeard = sysConfigService.findConfigValue(SysConfigConstant.DEFAULT_HEARD);
         sysUser.setAvatar(defaultHeard);
         if (StringUtils.equalsIgnoreCase(clientId, "TEACHER")) {

+ 9 - 9
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/UserOrderServiceImpl.java

@@ -220,7 +220,7 @@ public class UserOrderServiceImpl extends ServiceImpl<UserOrderDao, UserOrder> i
 
     @Override
     public Integer updateStatusByOrderNo(String orderNo, String orderStatus) {
-        return baseMapper.updateStatusByOrderNo(orderNo,orderStatus);
+        return baseMapper.updateStatusByOrderNo(orderNo, orderStatus);
     }
 
     @Override
@@ -652,17 +652,17 @@ public class UserOrderServiceImpl extends ServiceImpl<UserOrderDao, UserOrder> i
         updateById(detail);
 
         try {
-            //更新付款单
-            UserOrderPayment orderPayment = orderPaymentService.detailByTransNo(hfRes.getString("id"));
-            if (null != orderPayment) {
-                orderPayment.setStatus(TradeStatusEnum.succeeded);
-                orderPayment.setArrivalTime(now);
-                orderPayment.setUpdateTime(now);
-                if (null != hfRes) {
+            if (null != hfRes) {
+                //更新付款单
+                UserOrderPayment orderPayment = orderPaymentService.detailByTransNo(hfRes.getString("id"));
+                if (null != orderPayment) {
+                    orderPayment.setStatus(TradeStatusEnum.succeeded);
+                    orderPayment.setArrivalTime(now);
+                    orderPayment.setUpdateTime(now);
                     orderPayment.setBackPayAmt(new BigDecimal(hfRes.getString("pay_amt")));
                     orderPayment.setFeeAmt(new BigDecimal(hfRes.getString("fee_amt")));
+                    orderPaymentService.updateById(orderPayment);
                 }
-                orderPaymentService.updateById(orderPayment);
             }
         } catch (Exception e) {
             e.printStackTrace();

+ 3 - 3
cooleshow-user/user-student/src/main/java/com/yonge/cooleshow/student/controller/PaymentController.java

@@ -1,6 +1,5 @@
 package com.yonge.cooleshow.student.controller;
 
-import com.alibaba.fastjson.JSONObject;
 import com.alipay.api.response.AlipaySystemOauthTokenResponse;
 import com.huifu.adapay.core.AdapayCore;
 import com.huifu.adapay.core.util.StringUtil;
@@ -19,6 +18,7 @@ import org.springframework.http.HttpStatus;
 import org.springframework.web.bind.annotation.*;
 
 import javax.servlet.http.HttpServletRequest;
+import java.util.HashMap;
 import java.util.Map;
 
 /**
@@ -51,13 +51,13 @@ public class PaymentController extends BaseController {
             return failed(HttpStatus.FORBIDDEN, "请登录");
         }
         HttpResponseResult<Map<String, String>> responseResult = paymentSdk.getOpenId(js_code);
-        if (responseResult.getStatus()) {
+        /*if (responseResult.getStatus()) {
             Map<String, String> data = responseResult.getData();
             //绑定到用户表
             user.setWxOpenid(data.get("openid"));
             log.info("绑定用户openid,param is {}", JSONObject.toJSONString(user));
             sysUserFeignService.bindOpenId(user);
-        }
+        }*/
         return responseResult;
     }