lsw 1 rok temu
rodzic
commit
83c87db73c

+ 19 - 19
admin-ui/src/components/sms.vue

@@ -11,6 +11,9 @@ export default {
   props: {
   props: {
     value: {
     value: {
       type: String
       type: String
+    },
+    url: {
+      type: String
     }
     }
   },
   },
   data() {
   data() {
@@ -20,28 +23,25 @@ export default {
       flag: true
       flag: true
     };
     };
   },
   },
-  mounted() {
-    this.ajax({ url: '/work/company/index' }).then((response) => {
-      this.form = response.data;
-    });
-  },
   methods: {
   methods: {
     getCode() {
     getCode() {
       if (this.flag) {
       if (this.flag) {
-        this.$modal.msgSuccess('你的验证码是123456');
-        //一分钟倒计时
-        var countdown = setInterval(() => {
-          this.time--;
-          if (this.time == 0) {
-            this.flag = true;
-            this.msg = '获取短信';
-            this.time = 60;
-            clearInterval(countdown);
-          } else {
-            this.flag = false;
-            this.msg = '重新获取(' + this.time + ')';
-          }
-        }, 1000);
+        this.ajax({url: this.url}).then((response) => {
+          this.$modal.msgSuccess('验证码发送成功');
+          //一分钟倒计时
+          var countdown = setInterval(() => {
+            this.time--;
+            if (this.time == 0) {
+              this.flag = true;
+              this.msg = '获取短信';
+              this.time = 60;
+              clearInterval(countdown);
+            } else {
+              this.flag = false;
+              this.msg = '重新获取(' + this.time + ')';
+            }
+          }, 1000);
+        });
       }
       }
     }
     }
   }
   }

+ 3 - 3
admin-ui/src/views/system/role/index.vue

@@ -28,13 +28,13 @@
       <el-table-column type="selection" width="55" align="center" />
       <el-table-column type="selection" width="55" align="center" />
       <el-table-column label="角色名称" prop="roleName" align="center" :show-overflow-tooltip="true" />
       <el-table-column label="角色名称" prop="roleName" align="center" :show-overflow-tooltip="true" />
       <el-table-column label="权限字符" prop="roleKey" align="center" :show-overflow-tooltip="true" width="150" v-if="!user.companyId" />
       <el-table-column label="权限字符" prop="roleKey" align="center" :show-overflow-tooltip="true" width="150" v-if="!user.companyId" />
-      <el-table-column label="状态" align="center">
+      <el-table-column label="状态" align="center" width="130">
         <template slot-scope="scope">
         <template slot-scope="scope">
           <el-switch v-model="scope.row.status" active-value="0" inactive-value="1" @change="handleStatusChange(scope.row)"></el-switch>
           <el-switch v-model="scope.row.status" active-value="0" inactive-value="1" @change="handleStatusChange(scope.row)"></el-switch>
         </template>
         </template>
       </el-table-column>
       </el-table-column>
-      <el-table-column label="创建人" prop="createBy" align="center"/>
-      <el-table-column label="创建时间" align="center" prop="createTime">
+      <el-table-column label="创建人" prop="createBy" align="center" width="130"/>
+      <el-table-column label="创建时间" align="center" prop="createTime" width="160">
         <template slot-scope="scope">
         <template slot-scope="scope">
           <span>{{ parseTime(scope.row.createTime) }}</span>
           <span>{{ parseTime(scope.row.createTime) }}</span>
         </template>
         </template>

+ 7 - 6
admin-ui/src/views/system/user/index.vue

@@ -36,8 +36,9 @@
         </el-row>
         </el-row>
         <el-table border :data="userList" @selection-change="handleSelectionChange" height="calc(100vh - 273px)">
         <el-table border :data="userList" @selection-change="handleSelectionChange" height="calc(100vh - 273px)">
           <el-table-column type="selection" align="center" width="50" />
           <el-table-column type="selection" align="center" width="50" />
-          <el-table-column label="账号" align="center" key="userName" prop="userName" :show-overflow-tooltip="true" width="130" />
-          <el-table-column label="姓名" align="center" key="nickName" prop="nickName" :show-overflow-tooltip="true" width="130" />
+          <el-table-column label="账号" align="center" key="userName" prop="userName" :show-overflow-tooltip="true" width="140" />
+          <el-table-column label="姓名" align="center" key="nickName" prop="nickName" :show-overflow-tooltip="true" width="140" />
+          <el-table-column label="手机号" align="center" key="phonenumber" prop="phonenumber" :show-overflow-tooltip="true" width="150" />
           <el-table-column label="部门" align="center" key="deptName" prop="dept.deptName" :show-overflow-tooltip="true" width="170" v-if="!user.companyId" />
           <el-table-column label="部门" align="center" key="deptName" prop="dept.deptName" :show-overflow-tooltip="true" width="170" v-if="!user.companyId" />
           <el-table-column label="角色" align="center" width="170">
           <el-table-column label="角色" align="center" width="170">
             <template slot-scope="scope">
             <template slot-scope="scope">
@@ -56,14 +57,14 @@
               </div>
               </div>
             </template>
             </template>
           </el-table-column>
           </el-table-column>
-          <el-table-column label="创建时间" align="center" prop="createTime" width="175">
+          <el-table-column label="创建人" align="center" width="150" v-if="user.companyId">
             <template slot-scope="scope">
             <template slot-scope="scope">
-              <span>{{ parseTime(scope.row.createTime) }}</span>
+              <span>{{ scope.row.createBy || '平台' }}</span>
             </template>
             </template>
           </el-table-column>
           </el-table-column>
-          <el-table-column label="创建人" align="center" width="150" v-if="user.companyId">
+          <el-table-column label="创建时间" align="center" prop="createTime" width="175">
             <template slot-scope="scope">
             <template slot-scope="scope">
-              <span>{{ scope.row.createBy || '平台' }}</span>
+              <span>{{ parseTime(scope.row.createTime) }}</span>
             </template>
             </template>
           </el-table-column>
           </el-table-column>
           <el-table-column label="操作" align="center">
           <el-table-column label="操作" align="center">

+ 2 - 2
admin-ui/src/views/work/money/out/edit.vue

@@ -19,10 +19,10 @@
           <el-input type="number" v-model="form.money" placeholder="提现金额不能大于账户余额" clearable />
           <el-input type="number" v-model="form.money" placeholder="提现金额不能大于账户余额" clearable />
         </el-form-item>
         </el-form-item>
         <el-form-item label="手机号码">
         <el-form-item label="手机号码">
-          <sms v-model="user.phone"></sms>
+          <sms v-model="user.phone" url="/work/out/sms"></sms>
         </el-form-item>
         </el-form-item>
         <el-form-item label="短信验证码" prop="code">
         <el-form-item label="短信验证码" prop="code">
-          <el-input type="number" v-model="form.code" />
+          <el-input type="number" v-model="form.code" placeholder="输入6位验证码" />
         </el-form-item>
         </el-form-item>
       </el-form>
       </el-form>
     </div>
     </div>

+ 25 - 7
admin-ui/src/views/work/platform/index.vue

@@ -5,11 +5,26 @@
         <div class="bos">
         <div class="bos">
           <div class="lab">
           <div class="lab">
             <div class="bsg"></div>
             <div class="bsg"></div>
-            <div class="tit">企业充值信息</div>
+            <div class="tit">平台基本信息</div>
           </div>
           </div>
-          <el-form-item label="服务公司" prop="serviceCompany">
-            <el-input v-model="form.serviceCompany" placeholder="请输入服务公司" clearable />
+          <el-form-item label="平台名称" prop="serviceCompany">
+            <el-input v-model="form.serviceCompany" placeholder="请输入平台名称" clearable />
           </el-form-item>
           </el-form-item>
+          <el-form-item label="平台负责人" prop="director">
+            <el-input v-model="form.director" placeholder="请输入平台负责人" clearable />
+          </el-form-item>
+          <el-form-item label="负责人手机号" prop="phone">
+            <el-input v-model="form.phone" placeholder="请输入手机号" clearable />
+          </el-form-item>
+          <el-form-item label="平台邮箱" prop="email">
+            <el-input v-model="form.email" placeholder="请输入邮箱" clearable />
+          </el-form-item>
+        </div>
+        <div class="bos">
+          <div class="lab">
+            <div class="bsg"></div>
+            <div class="tit">平台对公账户</div>
+          </div>
           <el-form-item label="开户行" prop="bankName">
           <el-form-item label="开户行" prop="bankName">
             <el-input v-model="form.bankName" placeholder="请输入开户行" clearable />
             <el-input v-model="form.bankName" placeholder="请输入开户行" clearable />
           </el-form-item>
           </el-form-item>
@@ -41,10 +56,13 @@ export default {
     return {
     return {
       form: {},
       form: {},
       rules: {
       rules: {
-        serviceCompany: [{ required: true, message: '服务公司不能为空', trigger: 'blur' }],
-        bankName: [{ required: true, message: '开户行不能为空', trigger: 'blur' }],
-        bankAccount: [{ required: true, message: '银行卡号不能为空', trigger: 'blur' }],
-        rate: [{ required: true, message: '综合服务费率不能为空', trigger: 'blur' }],
+        serviceCompany: [{ required: true, message: '不能为空', trigger: 'blur' }],
+        director: [{ required: true, message: '不能为空', trigger: 'blur' }],
+        phone: [{ required: true, message: '不能为空', trigger: 'blur' }],
+        email: [{ required: true, message: '不能为空', trigger: 'blur' }],
+        bankName: [{ required: true, message: '不能为空', trigger: 'blur' }],
+        bankAccount: [{ required: true, message: '不能为空', trigger: 'blur' }],
+        rate: [{ required: true, message: '不能为空', trigger: 'blur' }]
       }
       }
     };
     };
   },
   },

+ 2 - 2
admin-ui/src/views/work/project/index.vue

@@ -56,7 +56,7 @@
           </div>
           </div>
         </template>
         </template>
       </el-table-column>
       </el-table-column>
-      <el-table-column label="操作" align="center" width="250" fixed="right">
+      <el-table-column label="操作" align="center" width="270" fixed="right">
         <template slot-scope="scope">
         <template slot-scope="scope">
           <el-button size="mini" type="text" icon="el-icon-s-goods" @click="op('packages', scope.row)" v-hasPermi="['work:project:list']">接包明细</el-button>
           <el-button size="mini" type="text" icon="el-icon-s-goods" @click="op('packages', scope.row)" v-hasPermi="['work:project:list']">接包明细</el-button>
           <el-button size="mini" type="text" icon="el-icon-view" @click="op('detail', scope.row)" v-hasPermi="['work:project:list']">详情</el-button>
           <el-button size="mini" type="text" icon="el-icon-view" @click="op('detail', scope.row)" v-hasPermi="['work:project:list']">详情</el-button>
@@ -126,7 +126,7 @@ export default {
       }
       }
       const id = row.id || this.ids[0];
       const id = row.id || this.ids[0];
       if (tag == 'packages') {
       if (tag == 'packages') {
-        this.iframe({ obj: packages, param: { projectId: row.id }, title: '接包明细', width: '65%', height: '75%' });
+        this.iframe({ obj: packages, param: { projectId: row.id }, title: '接包明细', width: '60%', height: '75%' });
       }
       }
       if (tag == 'detail') {
       if (tag == 'detail') {
         this.iframe({ obj: edit, param: { id: id, detail: true }, title: '项目详情', width: '55%', height: '55%' });
         this.iframe({ obj: edit, param: { id: id, detail: true }, title: '项目详情', width: '55%', height: '55%' });

+ 14 - 4
admin-ui/src/views/work/project/packages/index.vue

@@ -1,14 +1,20 @@
 <template>
 <template>
   <div class="cmain">
   <div class="cmain">
-    <el-form :model="queryParams" ref="queryForm" :inline="true" @submit.native.prevent v-show="showSearch">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" @submit.native.prevent>
       <el-form-item label="姓名" prop="name">
       <el-form-item label="姓名" prop="name">
-        <el-input v-model="queryParams.name" placeholder="请输入姓名" @keyup.enter.native="handleQuery" clearable />
+        <el-input v-model="queryParams.name" placeholder="请输入姓名" @keyup.enter.native="handleQuery" class="inp" clearable />
+      </el-form-item>
+      <el-form-item label="手机号" prop="phone">
+        <el-input v-model="queryParams.phone" placeholder="请输入手机号" @keyup.enter.native="handleQuery" class="inp" clearable />
+      </el-form-item>
+      <el-form-item label="身份证号" prop="idCard">
+        <el-input v-model="queryParams.idCard" placeholder="请输入身份证号" @keyup.enter.native="handleQuery" clearable />
       </el-form-item>
       </el-form-item>
       <el-form-item>
       <el-form-item>
         <el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
         <el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
         <el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
         <el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
       </el-form-item>
       </el-form-item>
-      <el-button type="primary" icon="el-icon-download" @click="handleQuery" style="float: right">导出excel</el-button>
+      <el-button type="primary" icon="el-icon-download" @click="handleQuery" style="float: right">导出</el-button>
     </el-form>
     </el-form>
     <el-table :data="response.rows" border>
     <el-table :data="response.rows" border>
       <el-table-column type="index" label="序号" align="center" width="80" />
       <el-table-column type="index" label="序号" align="center" width="80" />
@@ -16,7 +22,9 @@
       <el-table-column label="身份证" align="center" prop="idCard" />
       <el-table-column label="身份证" align="center" prop="idCard" />
       <el-table-column label="手机号" align="center" prop="phone" />
       <el-table-column label="手机号" align="center" prop="phone" />
       <el-table-column label="支付宝账号" align="center" prop="alipay" />
       <el-table-column label="支付宝账号" align="center" prop="alipay" />
-      <el-table-column label="状态" align="center" prop="state" />
+      <el-table-column label="操作" align="center">
+        <el-button size="mini" type="text" icon="el-icon-view" @click="op('detail', scope.row)">详情</el-button>
+      </el-table-column>
       <template slot="empty">
       <template slot="empty">
         <el-empty></el-empty>
         <el-empty></el-empty>
       </template>
       </template>
@@ -36,6 +44,8 @@ export default {
         pageSize: 10,
         pageSize: 10,
         projectId: null,
         projectId: null,
         name: null,
         name: null,
+        phone: null,
+        idCard: null,
         orderByColumn: 'p.id',
         orderByColumn: 'p.id',
         isAsc: 'desc'
         isAsc: 'desc'
       }
       }

+ 17 - 5
ruoyi-admin/src/main/java/com/ruoyi/web/work/controller/MoneyOutController.java

@@ -9,6 +9,8 @@ import com.ruoyi.common.utils.PageUtils;
 import com.ruoyi.common.utils.poi.ExcelUtil;
 import com.ruoyi.common.utils.poi.ExcelUtil;
 import com.ruoyi.web.work.domain.MoneyOut;
 import com.ruoyi.web.work.domain.MoneyOut;
 import com.ruoyi.web.work.domain.dto.MoneyOutDto;
 import com.ruoyi.web.work.domain.dto.MoneyOutDto;
+import com.ruoyi.web.work.domain.dto.SmsDto;
+import com.ruoyi.web.work.service.ICommonService;
 import com.ruoyi.web.work.service.ICompanyService;
 import com.ruoyi.web.work.service.ICompanyService;
 import com.ruoyi.web.work.service.IMoneyOutService;
 import com.ruoyi.web.work.service.IMoneyOutService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -34,6 +36,9 @@ public class MoneyOutController extends BaseController {
     private IMoneyOutService moneyOutService;
     private IMoneyOutService moneyOutService;
 
 
     @Autowired
     @Autowired
+    private ICommonService commonService;
+
+    @Autowired
     private ICompanyService companyService;
     private ICompanyService companyService;
 
 
     @PreAuthorize("@ss.hasPermi('work:out:list')")
     @PreAuthorize("@ss.hasPermi('work:out:list')")
@@ -56,27 +61,34 @@ public class MoneyOutController extends BaseController {
     }
     }
 
 
     @PreAuthorize("@ss.hasPermi('work:out:add')")
     @PreAuthorize("@ss.hasPermi('work:out:add')")
-    @Log(title = "提现管理", businessType = BusinessType.INSERT)
+    @Log(title = "提现申请获取验证码", businessType = BusinessType.INSERT)
+    @GetMapping("/sms")
+    public AjaxResult sms() {
+        return commonService.sms(new SmsDto().setTemplateCode("SMS_465690916"));
+    }
+
+    @PreAuthorize("@ss.hasPermi('work:out:add')")
+    @Log(title = "企业提现申请", businessType = BusinessType.INSERT)
     @PostMapping("/add")
     @PostMapping("/add")
-    public AjaxResult add(@Validated @RequestBody MoneyOut moneyOut) {
+    public AjaxResult add(@Validated @RequestBody MoneyOut moneyOut) throws ServerException {
         return moneyOutService.add(moneyOut);
         return moneyOutService.add(moneyOut);
     }
     }
 
 
     @PreAuthorize("@ss.hasPermi('work:out:edit')")
     @PreAuthorize("@ss.hasPermi('work:out:edit')")
-    @Log(title = "提现管理", businessType = BusinessType.UPDATE)
+    @Log(title = "提现审核", businessType = BusinessType.UPDATE)
     @PostMapping("/edit")
     @PostMapping("/edit")
     public AjaxResult edit(@Validated @RequestBody MoneyOutDto dto) throws ServerException {
     public AjaxResult edit(@Validated @RequestBody MoneyOutDto dto) throws ServerException {
         return moneyOutService.edit(dto);
         return moneyOutService.edit(dto);
     }
     }
 
 
     @PreAuthorize("@ss.hasPermi('work:out:remove')")
     @PreAuthorize("@ss.hasPermi('work:out:remove')")
-    @Log(title = "提现管理", businessType = BusinessType.DELETE)
+    @Log(title = "提现记录删除", businessType = BusinessType.DELETE)
     @GetMapping("/remove/{ids}")
     @GetMapping("/remove/{ids}")
     public AjaxResult remove(@PathVariable Long[] ids) {
     public AjaxResult remove(@PathVariable Long[] ids) {
         return toAjax(moneyOutService.removeByIds(Arrays.asList(ids)));
         return toAjax(moneyOutService.removeByIds(Arrays.asList(ids)));
     }
     }
 
 
-    @Log(title = "提现管理", businessType = BusinessType.EXPORT)
+    @Log(title = "提现记录导出", businessType = BusinessType.EXPORT)
     @PreAuthorize("@ss.hasPermi('work:out:export')")
     @PreAuthorize("@ss.hasPermi('work:out:export')")
     @PostMapping("/export")
     @PostMapping("/export")
     public void export(HttpServletResponse response, MoneyOut moneyOut) {
     public void export(HttpServletResponse response, MoneyOut moneyOut) {

+ 5 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/work/domain/MoneyOut.java

@@ -13,6 +13,7 @@ import lombok.Data;
 import lombok.experimental.Accessors;
 import lombok.experimental.Accessors;
 
 
 import javax.validation.constraints.DecimalMin;
 import javax.validation.constraints.DecimalMin;
+import javax.validation.constraints.NotBlank;
 import javax.validation.constraints.NotNull;
 import javax.validation.constraints.NotNull;
 import java.math.BigDecimal;
 import java.math.BigDecimal;
 import java.util.Date;
 import java.util.Date;
@@ -80,4 +81,8 @@ public class MoneyOut extends BaseData {
 
 
     @TableField(exist = false)
     @TableField(exist = false)
     private Company company;
     private Company company;
+
+    @NotBlank(message = "验证码不能为空")
+    @TableField(exist = false)
+    private String code;
 }
 }

+ 9 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/work/domain/Platform.java

@@ -31,6 +31,15 @@ public class Platform{
     @ApiModelProperty(value = "银行卡账号")
     @ApiModelProperty(value = "银行卡账号")
     private String bankAccount;
     private String bankAccount;
 
 
+    @ApiModelProperty(value = "平台方负责人")
+    private String director;
+
+    @ApiModelProperty(value = "平台方负责人手机号")
+    private String phone;
+
+    @ApiModelProperty(value = "平台邮箱")
+    private String email;
+
     @ApiModelProperty(value = "综合服务费率")
     @ApiModelProperty(value = "综合服务费率")
     private BigDecimal rate;
     private BigDecimal rate;
 
 

+ 13 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/work/domain/dto/SmsDto.java

@@ -0,0 +1,13 @@
+package com.ruoyi.web.work.domain.dto;
+
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+@Data
+@Accessors(chain = true)
+public class SmsDto {
+
+    private String phone;
+
+    private String TemplateCode;
+}

+ 19 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/work/service/ICommonService.java

@@ -0,0 +1,19 @@
+package com.ruoyi.web.work.service;
+
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.web.work.domain.dto.SmsDto;
+
+import java.rmi.ServerException;
+
+/**
+ * @author lsw
+ * @date 2024-04-16
+ */
+public interface ICommonService {
+
+
+    AjaxResult sms(SmsDto dto);
+
+    public void verifyCode(String phone,String code) throws ServerException;
+
+}

+ 2 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/work/service/ICompanyService.java

@@ -24,4 +24,6 @@ public interface ICompanyService extends IService<Company>{
 
 
     boolean remove(Long[] ids);
     boolean remove(Long[] ids);
 
 
+
+
 }
 }

+ 1 - 1
ruoyi-admin/src/main/java/com/ruoyi/web/work/service/IMoneyOutService.java

@@ -15,7 +15,7 @@ import java.util.List;
 public interface IMoneyOutService extends IService<MoneyOut>{
 public interface IMoneyOutService extends IService<MoneyOut>{
     List<MoneyOut> selectList(MoneyOut moneyOut);
     List<MoneyOut> selectList(MoneyOut moneyOut);
 
 
-    AjaxResult add(MoneyOut moneyOut);
+    AjaxResult add(MoneyOut moneyOut) throws ServerException;
 
 
     AjaxResult edit(MoneyOutDto dto) throws ServerException;
     AjaxResult edit(MoneyOutDto dto) throws ServerException;
 }
 }

+ 50 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/work/service/impl/CommonServiceImpl.java

@@ -0,0 +1,50 @@
+package com.ruoyi.web.work.service.impl;
+
+import com.alibaba.druid.support.json.JSONUtils;
+import com.ruoyi.common.constant.CacheConstants;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.core.redis.RedisCache;
+import com.ruoyi.common.utils.SecurityUtils;
+import com.ruoyi.common.utils.SendMessage;
+import com.ruoyi.common.utils.StringUtils;
+import com.ruoyi.web.work.domain.dto.SmsDto;
+import com.ruoyi.web.work.service.ICommonService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.rmi.ServerException;
+import java.util.concurrent.TimeUnit;
+
+/**
+ * @author lsw
+ * @date 2024-04-16
+ */
+@Service
+public class CommonServiceImpl implements ICommonService {
+    @Autowired
+    private RedisCache redisCache;
+
+    @Override
+    public AjaxResult sms(SmsDto dto) {
+        dto.setPhone(SecurityUtils.getLoginUser().getUser().getPhonenumber());
+        String code = StringUtils.getRandomString(6);
+        AjaxResult param = new AjaxResult();
+        param.put("code", code);
+        boolean result = SendMessage.sendSms(dto.getPhone(), "广西承揽时代数据服务", dto.getTemplateCode(), JSONUtils.toJSONString(param));
+        if (result) {
+            redisCache.setCacheObject(CacheConstants.APP_CODE_KEY + dto.getPhone(), code, 5, TimeUnit.MINUTES);
+            return AjaxResult.success("发送成功");
+        }
+        return AjaxResult.error("短信发送失败");
+    }
+
+    @Override
+    public void verifyCode(String phone, String code) throws ServerException {
+        if (redisCache.getCacheObject(CacheConstants.APP_CODE_KEY + phone) == null) {
+            throw new ServerException("验证码已过期");
+        }
+        if (!code.equals(redisCache.getCacheObject(CacheConstants.APP_CODE_KEY + phone))) {
+            throw new ServerException("验证码错误");
+        }
+    }
+}

+ 10 - 4
ruoyi-admin/src/main/java/com/ruoyi/web/work/service/impl/MoneyOutServiceImpl.java

@@ -8,6 +8,7 @@ import com.ruoyi.web.work.domain.Company;
 import com.ruoyi.web.work.domain.MoneyOut;
 import com.ruoyi.web.work.domain.MoneyOut;
 import com.ruoyi.web.work.domain.dto.MoneyOutDto;
 import com.ruoyi.web.work.domain.dto.MoneyOutDto;
 import com.ruoyi.web.work.mapper.MoneyOutMapper;
 import com.ruoyi.web.work.mapper.MoneyOutMapper;
+import com.ruoyi.web.work.service.ICommonService;
 import com.ruoyi.web.work.service.ICompanyService;
 import com.ruoyi.web.work.service.ICompanyService;
 import com.ruoyi.web.work.service.IMoneyOutService;
 import com.ruoyi.web.work.service.IMoneyOutService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -29,13 +30,17 @@ public class MoneyOutServiceImpl extends ServiceImpl<MoneyOutMapper, MoneyOut> i
     @Autowired
     @Autowired
     private ICompanyService companyService;
     private ICompanyService companyService;
 
 
+    @Autowired
+    private ICommonService commonService;
+
     @Override
     @Override
     public List<MoneyOut> selectList(MoneyOut moneyOut) {
     public List<MoneyOut> selectList(MoneyOut moneyOut) {
         return moneyOutMapper.selectList(moneyOut);
         return moneyOutMapper.selectList(moneyOut);
     }
     }
 
 
     @Override
     @Override
-    public AjaxResult add(MoneyOut moneyOut) {
+    public AjaxResult add(MoneyOut moneyOut) throws ServerException {
+        commonService.verifyCode(SecurityUtils.getLoginUser().getUser().getPhonenumber(), moneyOut.getCode());
         Company company = companyService.getById(SecurityUtils.getLoginUser().getUser().getCompanyId());
         Company company = companyService.getById(SecurityUtils.getLoginUser().getUser().getCompanyId());
         if (company == null) {
         if (company == null) {
             return AjaxResult.error("账户信息不存在");
             return AjaxResult.error("账户信息不存在");
@@ -43,15 +48,16 @@ public class MoneyOutServiceImpl extends ServiceImpl<MoneyOutMapper, MoneyOut> i
         if (moneyOut.getMoney().compareTo(company.getMoney()) > 0) {
         if (moneyOut.getMoney().compareTo(company.getMoney()) > 0) {
             return AjaxResult.error("提现金额不能大于账户余额");
             return AjaxResult.error("提现金额不能大于账户余额");
         }
         }
+        moneyOut.setUserId(SecurityUtils.getLoginUser().getUser().getUserId());
         moneyOut.setCompanyId(SecurityUtils.getLoginUser().getUser().getCompanyId());
         moneyOut.setCompanyId(SecurityUtils.getLoginUser().getUser().getCompanyId());
         moneyOut.setOpBy(SecurityUtils.getLoginUser().getUser().getNickName());
         moneyOut.setOpBy(SecurityUtils.getLoginUser().getUser().getNickName());
         moneyOut.setNums(StringUtils.generateNumber());
         moneyOut.setNums(StringUtils.generateNumber());
         moneyOut.setState(0);
         moneyOut.setState(0);
         moneyOut.setVersion(System.currentTimeMillis());
         moneyOut.setVersion(System.currentTimeMillis());
-        if (save(moneyOut)) {
-            return AjaxResult.success();
+        if (!save(moneyOut)) {
+            throw new ServerException("企业提现申请失败,请联系平台");
         }
         }
-        return AjaxResult.error("提交申请失败,请联系平台");
+        return AjaxResult.success();
     }
     }
 
 
     @Transactional(rollbackFor = Exception.class)
     @Transactional(rollbackFor = Exception.class)

+ 2 - 0
ruoyi-admin/src/main/resources/mapper/work/PackagesMapper.xml

@@ -20,6 +20,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <where>  
         <where>  
             <if test="userId != null "> and p.user_id = #{userId}</if>
             <if test="userId != null "> and p.user_id = #{userId}</if>
             <if test="name != null  and name != ''"> and u.name like concat('%', #{name}, '%')</if>
             <if test="name != null  and name != ''"> and u.name like concat('%', #{name}, '%')</if>
+            <if test="idCard != null  and idCard != ''"> and u.id_card like concat('%', #{idCard}, '%')</if>
+            <if test="phone != null  and phone != ''"> and u.phone like concat('%', #{phone}, '%')</if>
             <if test="projectId != null "> and p.project_id = #{projectId}</if>
             <if test="projectId != null "> and p.project_id = #{projectId}</if>
             <if test="state != null "> and p.state = #{state}</if>
             <if test="state != null "> and p.state = #{state}</if>
         </where>
         </where>

+ 11 - 0
ruoyi-common/pom.xml

@@ -164,6 +164,17 @@
             <version>2.6.10</version>
             <version>2.6.10</version>
         </dependency>
         </dependency>
 
 
+        <dependency>
+            <groupId>e-iceblue</groupId>
+            <artifactId>spire.doc.free</artifactId>
+            <version>5.2.0</version>
+        </dependency>
     </dependencies>
     </dependencies>
+    <repositories>
+        <repository>
+            <id>com.e-iceblue</id>
+            <url>https://repo.e-iceblue.cn/repository/maven-public/</url>
+        </repository>
+    </repositories>
 
 
 </project>
 </project>

+ 5 - 10
ruoyi-common/src/main/java/com/ruoyi/common/utils/SendMessage.java

@@ -2,17 +2,12 @@ package com.ruoyi.common.utils;
 
 
 import com.aliyuncs.DefaultAcsClient;
 import com.aliyuncs.DefaultAcsClient;
 import com.aliyuncs.IAcsClient;
 import com.aliyuncs.IAcsClient;
-import com.aliyuncs.dysmsapi.model.v20170525.QuerySendDetailsRequest;
-import com.aliyuncs.dysmsapi.model.v20170525.QuerySendDetailsResponse;
 import com.aliyuncs.dysmsapi.model.v20170525.SendSmsRequest;
 import com.aliyuncs.dysmsapi.model.v20170525.SendSmsRequest;
 import com.aliyuncs.dysmsapi.model.v20170525.SendSmsResponse;
 import com.aliyuncs.dysmsapi.model.v20170525.SendSmsResponse;
 import com.aliyuncs.exceptions.ClientException;
 import com.aliyuncs.exceptions.ClientException;
 import com.aliyuncs.profile.DefaultProfile;
 import com.aliyuncs.profile.DefaultProfile;
 import com.aliyuncs.profile.IClientProfile;
 import com.aliyuncs.profile.IClientProfile;
 
 
-import java.text.SimpleDateFormat;
-import java.util.Date;
-
 /**
 /**
  * Created on 17/6/7.
  * Created on 17/6/7.
  * 短信API产品的DEMO程序,工程中包含了一个SmsDemo类,直接通过
  * 短信API产品的DEMO程序,工程中包含了一个SmsDemo类,直接通过
@@ -32,8 +27,8 @@ public class SendMessage {
     static final String domain = "dysmsapi.aliyuncs.com";
     static final String domain = "dysmsapi.aliyuncs.com";
 
 
     // TODO 此处需要替换成开发者自己的AK(在阿里云访问控制台寻找)
     // TODO 此处需要替换成开发者自己的AK(在阿里云访问控制台寻找)
-    static final String accessKeyId = "LTAI5t6cteYYRcJm8TdTZU8d";
-    static final String accessKeySecret = "nSED2HsrZbyhQM3ifGZmH0ruNaadLu";
+    static final String accessKeyId = "LTAI5tA8ch3AmjbWhfiZPptM";
+    static final String accessKeySecret = "D28rp54tfhMv8GwzlHb9eGYCkuHsRw";
 
 
     /**
     /**
      * @param phone        手机号
      * @param phone        手机号
@@ -75,13 +70,13 @@ public class SendMessage {
             //hint 此处可能会抛出异常,注意catch
             //hint 此处可能会抛出异常,注意catch
             response = acsClient.getAcsResponse(request);
             response = acsClient.getAcsResponse(request);
             System.out.println("发送短信:"+response.getMessage());
             System.out.println("发送短信:"+response.getMessage());
+            if (response.getCode() != null && response.getCode().equals("OK")) {
+                return true;
+            }
         } catch (ClientException e) {
         } catch (ClientException e) {
             e.printStackTrace();
             e.printStackTrace();
             return false;
             return false;
         }
         }
-        if (response.getCode() != null && response.getCode().equals("OK")) {
-            return true;
-        }
         return false;
         return false;
     }
     }
 }
 }