Parcourir la source

Merge remote-tracking branch 'origin/master'

kk il y a 1 mois
Parent
commit
0fb11e864b

+ 1 - 1
game-admin/src/main/java/com/game/web/core/config/SwaggerConfig.java

@@ -113,7 +113,7 @@ public class SwaggerConfig
         // 用ApiInfoBuilder进行定制
         return new ApiInfoBuilder()
                 // 设置标题
-                .title("标题:若依管理系统_接口文档")
+                .title("标题:客服管理系统_接口文档")
                 // 描述
                 .description("描述:用于管理集团旗下公司的人员信息,具体包括XXX,XXX模块...")
                 // 作者信息

+ 26 - 0
game-business/src/main/java/com/game/business/controller/AppUserController.java

@@ -167,6 +167,32 @@ public class AppUserController extends BaseController
         return R.ok("重置成功");
     }
 
+    /**
+     * 重置密码
+     */
+    @PreAuthorize("@ss.hasPermi('business:user:restPwd')")
+    @Log(title = "app用户", businessType = BusinessType.UPDATE)
+    @PostMapping("/restPayPwd")
+    @ApiOperation(value = "重置密码", notes = "重置密码")
+    public R<String> restPayPwd(HttpServletResponse response,@RequestBody @Validated RestPwdDto restPwdDto)
+    {
+        AppUser appUser = appUserService.selectAppUserByUserid(restPwdDto.getUserId());
+        if(null == appUser){
+            return R.fail("重置失败,用户不存在");
+        }
+        AppUser updateUser = new AppUser();
+        updateUser.setUserid(appUser.getUserid());
+        updateUser.setSalt(appUser.getSalt());
+        if(StringUtils.isBlank(updateUser.getSalt())){
+            updateUser.setSalt(RandomUtil.randomString(6));
+        }
+        updateUser.setFundPassword(Md5Utils.md5(Md5Utils.md5(restPwdDto.getPassword()) + updateUser.getSalt()));
+        appUserService.updateAppUser(updateUser);
+        //清除用户缓存
+        redisCache.deleteObject("U:UserInfo:".concat(String.valueOf(appUser.getUserid())));
+        return R.ok("重置成功");
+    }
+
     /**
      * 充值
      */

+ 3 - 3
game-business/src/main/java/com/game/business/service/impl/FinTranRecordServiceImpl.java

@@ -212,7 +212,7 @@ public class FinTranRecordServiceImpl extends ServiceImpl<FinTranRecordMapper, F
         tran.setAfterDiamondCoin(appUser.getDiamondCoin() + transfer.getMoney());
         tran.setCurrencyType(TranCurrencyType.Balance.getType());
         tran.setRemarks("团队转账");
-        finTranRecordService.insertFinTranRecord(tran);
+//        finTranRecordService.insertFinTranRecord(tran);
         appUserService.updateUserAmount(tran);
 
         //受益用户增加余额
@@ -230,8 +230,8 @@ public class FinTranRecordServiceImpl extends ServiceImpl<FinTranRecordMapper, F
         toTran.setAfterDiamondCoin(appUser.getDiamondCoin() + transfer.getMoney());
         toTran.setCurrencyType(TranCurrencyType.Balance.getType());
         toTran.setFromUid(appUser.getUserid());
-        tran.setRemarks("团队转账");
-        finTranRecordService.insertFinTranRecord(toTran);
+        toTran.setRemarks("团队转账");
+//        finTranRecordService.insertFinTranRecord(toTran);
         appUserService.updateUserAmount(toTran);
         //清除用户缓存
         redisCache.deleteObject("U:UserInfo:".concat(String.valueOf(appUser.getUserid())));

+ 2 - 2
game-ui/.env.development

@@ -1,10 +1,10 @@
 # 页面标题
-VUE_APP_TITLE = 若依管理系统
+VUE_APP_TITLE = 客服管理系统
 
 # 开发环境配置
 ENV = 'development'
 
-# 若依管理系统/开发环境
+# 客服管理系统/开发环境
 VUE_APP_BASE_API = '/dev-api'
 
 # 路由懒加载

+ 1 - 1
game-ui/.env.production

@@ -4,5 +4,5 @@ VUE_APP_TITLE = 客服系统
 # 生产环境配置
 ENV = 'production'
 
-# 若依管理系统/生产环境
+# 客服管理系统/生产环境
 VUE_APP_BASE_API = '/prod-api'

+ 1 - 1
game-ui/.env.staging

@@ -6,5 +6,5 @@ NODE_ENV = production
 # 测试环境配置
 ENV = 'staging'
 
-# 若依管理系统/测试环境
+# 客服管理系统/测试环境
 VUE_APP_BASE_API = '/stage-api'

+ 9 - 0
game-ui/src/api/business/user.js

@@ -110,6 +110,15 @@ export function resetUser(data) {
   })
 }
 
+// 重置支付密码
+export function restPayPwd(data) {
+  return request({
+    url: '/business/user/restPayPwd',
+    method: 'post',
+    data: data
+  })
+}
+
 // 充值
 export function userCharge(data) {
   return request({

+ 72 - 1
game-ui/src/views/business/user/index.vue

@@ -203,6 +203,12 @@
             icon="el-icon-edit"
             @click="handleRestPwd(scope.row)"
           >重置密码</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleRestPayPwd(scope.row)"
+          >重置支付密码</el-button>
           <el-button
             size="mini"
             type="text"
@@ -412,6 +418,23 @@
       </div>
     </el-dialog>
 
+
+    <!-- 重置支付密码对话框 -->
+    <el-dialog :title="title" :visible.sync="resetPayPwdopen" width="500px" append-to-body>
+      <el-form ref="resetPayPwdForm" :model="resetPayPwdForm" :rules="resetPayPwdRules" label-width="80px">
+        <el-form-item label="用户id" prop="userId">
+          <el-input v-model="resetPayPwdForm.userId" disabled />
+        </el-form-item>
+        <el-form-item label="密码" prop="password">
+          <el-input v-model="resetPayPwdForm.password" placeholder="请输入密码" />
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitResetPayPwdForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+
     <!-- 充值对话框 -->
     <el-dialog :title="title" :visible.sync="chargeopen" width="700px" append-to-body>
       <el-form ref="chargeForm" :model="chargeForm" :rules="currentRules" :validate-on-rule-change=false label-width="150px">
@@ -857,7 +880,7 @@
 </template>
 
 <script>
-import { listUser, getUser, delUser, addUser, updateUser,resetUser,userCharge,channelList,withdraw,openLive,userDetail,liveCommission,getGift,updateUserAgent,updateGameCommissionAgent  } from "@/api/business/user";
+import { listUser, getUser, delUser, addUser, updateUser,resetUser,userCharge,channelList,withdraw,openLive,userDetail,liveCommission,getGift,updateUserAgent,updateGameCommissionAgent,restPayPwd  } from "@/api/business/user";
 import { listAccount} from "@/api/business/account";
 import { listOrder } from "@/api/business/order";
 import { listBetting} from "@/api/business/betting";
@@ -910,6 +933,7 @@ export default {
       open: false,
       // 是否显示弹出层
       resetPwdopen: false,
+      resetPayPwdopen: false,
       // 是否显示弹出层
       resetWithdrawopen: false,
       // 是否显示弹出层
@@ -1010,6 +1034,8 @@ export default {
       form: {},
       //重置密码
       resetPwdForm:{},
+      //重置支付密码
+      resetPayPwdForm:{},
       //补足流水
       resetWithdrawForm:{},
       //充值
@@ -1025,6 +1051,11 @@ export default {
           { required: true, message: "密码不能为空", trigger: "blur" }
         ],
       },
+      resetPayPwdRules: {
+        password: [
+          { required: true, message: "密码不能为空", trigger: "blur" }
+        ],
+      },
       chargeRules: {
         amount: [
           { required: true, message: "金额不能为空", trigger: "blur" }
@@ -1187,8 +1218,10 @@ export default {
       this.resetWithdrawopen = false;
       this.liveOpen = false;
       this.superOpen = false;
+      this.resetPayPwdopen = false;
       this.reset();
       this.resetPwd();
+      this.resetPayPwd();
       this.resetCharge();
       this.resetWithdraw();
     },
@@ -1363,6 +1396,13 @@ export default {
       };
       this.resetForm("restPwdForm");
     },// 表单重置
+    resetPayPwd() {
+      this.resetPayPwdForm = {
+        userId: null,
+        password: null
+      };
+      this.resetForm("restPayPwdForm");
+    },// 表单重置
     resetWithdraw() {
       this.resetWithdrawForm = {
         userId: null,
@@ -1430,6 +1470,17 @@ export default {
       this.resetPwdopen = true;
       this.title = "重置密码";
     },
+    /** 重置支付密码按钮操作 */
+    handleRestPayPwd(row) {
+      this.resetPayPwd();
+      const userid = row.userid;
+      this.resetPayPwdForm = {
+        userId:userid,
+        password:""
+      };
+      this.resetPayPwdopen = true;
+      this.title = "重置支付密码";
+    },
     /** 补足流水按钮操作 */
     handleWithdraw(row) {
       this.resetWithdraw();
@@ -1524,6 +1575,26 @@ export default {
         }
       });
     },
+    /** 重置密码提交按钮 */
+    submitResetPayPwdForm() {
+      this.$refs["resetPayPwdForm"].validate(valid => {
+        if (valid) {
+          const loading = this.$loading({
+            lock: true,
+            text: '加载中',
+            spinner: 'el-icon-loading',
+            background: 'rgba(0, 0, 0, 0.7)'
+          });
+          setTimeout(function (){loading.close();},1000);
+          restPayPwd(this.resetPayPwdForm).then(response => {
+            this.$modal.msgSuccess("修改成功");
+            this.resetPayPwdopen = false;
+            this.getList();
+            loading.close();
+          });
+        }
+      });
+    },
     /** 补足流水提交按钮 */
     submitWithdrawForm() {
       var that =this;

+ 1 - 1
pom.xml

@@ -10,7 +10,7 @@
 
     <name>game</name>
     <url>http://www.ruoyi.vip</url>
-    <description>若依管理系统</description>
+    <description>客服管理系统</description>
     
     <properties>
         <ruoyi.version>3.8.7</ruoyi.version>