Administrator 2 سال پیش
والد
کامیت
6cf7f43e3e

+ 2 - 2
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java

@@ -69,8 +69,8 @@ public class SysUserController extends BaseController {
     /**
      * 获取用户列表
      */
-    @GetMapping("/userList")
-    public TableDataInfo userList(SysUser user) {
+    @PostMapping("/userList")
+    public TableDataInfo userList( SysUser user) {
         List<SysUser> list = userService.selectUserList(user);
         return getDataTable(list);
     }

+ 7 - 1
ruoyi-framework/src/main/java/com/ruoyi/framework/manager/factory/AsyncFactory.java

@@ -132,7 +132,7 @@ public class AsyncFactory
                                 //手机号码
                                 .setPhoneNumbers(sendSmsConfig.getPhone())
                                 //短信签名名称。潜山市数据资源局
-                                .setSignName("中新云")
+                                .setSignName("潜山市招商中心")
                                 //短信模板CODE
                                 .setTemplateCode(templateCode);
                         // 复制代码运行请自行打印 API 的返回值
@@ -143,6 +143,12 @@ public class AsyncFactory
                         if (!"OK".equals(code)){
                             sendSms.setStatus("发送失败");
                         }
+                        sendSms.setPhone(sendSmsConfig.getPhone());
+                        String name = sendSmsConfig.getName();
+                        if (StringUtils.isNotEmpty(name)){
+                            sendSms.setName(name);
+                        }
+                        sendSms.setContent(templateCode);
                         SpringUtils.getBean(ISendSmsService.class).insertSendSms(sendSms);
                     } catch (Exception _error) {
                     }

+ 8 - 8
ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/projectV2/common/ZsyzCommonServiceImpL.java

@@ -464,19 +464,19 @@ public class ZsyzCommonServiceImpL implements IZsyzCommonService {
                 st = stList.size();
             }
             List<ZsyzSbbzb> cjList = collect.get(TWO);
-            if (stList != null) {
+            if (cjList != null) {
                 st = st + cjList.size();
             }
             List<ZsyzSbbzb> qyList = collect.get(THR);
-            if (stList != null) {
+            if (qyList != null) {
                 qy = qyList.size();
             }
             List<ZsyzSbbzb> kgList = collect.get(FOR);
-            if (stList != null) {
+            if (kgList != null) {
                 kg = kgList.size();
             }
             List<ZsyzSbbzb> tcList = collect.get(FIV);
-            if (stList != null) {
+            if (tcList != null) {
                 tc = tcList.size();
             }
             all = zsyzSbbzbs.size();
@@ -565,19 +565,19 @@ public class ZsyzCommonServiceImpL implements IZsyzCommonService {
                     stNub = stList.size();
                 }
                 List<ZsyzSbbzb> cjList = collect.get(TWO);
-                if (stList != null) {
+                if (cjList != null) {
                     stNub = stNub +  cjList.size();
                 }
                 List<ZsyzSbbzb> qyList = collect.get(THR);
-                if (stList != null) {
+                if (qyList != null) {
                     qyNub = qyList.size();
                 }
                 List<ZsyzSbbzb> kgList = collect.get(FOR);
-                if (stList != null) {
+                if (kgList != null) {
                     kgNub = kgList.size();
                 }
                 List<ZsyzSbbzb> tcList = collect.get(FIV);
-                if (stList != null) {
+                if (tcList != null) {
                     tcNub = tcList.size();
                 }
                 st.add(stNub);

+ 14 - 1
ruoyi-system/src/main/java/com/ruoyi/system/domain/projectV2/common/SendSmsConfig.java

@@ -21,6 +21,10 @@ public class SendSmsConfig extends BaseEntity
     /** 用户ID */
     @Excel(name = "用户ID")
     private Long userId;
+    /**
+     * 部门iD
+     */
+    private Long deptId;
 
     /** 发送人姓名  */
     @Excel(name = "发送人姓名 ")
@@ -42,7 +46,15 @@ public class SendSmsConfig extends BaseEntity
     @Excel(name = "是否删除")
     private String isDel;
 
-    public void setId(Long id) 
+    public Long getDeptId() {
+        return deptId;
+    }
+
+    public void setDeptId(Long deptId) {
+        this.deptId = deptId;
+    }
+
+    public void setId(Long id)
     {
         this.id = id;
     }
@@ -120,6 +132,7 @@ public class SendSmsConfig extends BaseEntity
             .append("updateBy", getUpdateBy())
             .append("updateTime", getUpdateTime())
             .append("isDel", getIsDel())
+            .append("deptId", getDeptId())
             .toString();
     }
 }

+ 9 - 4
ruoyi-system/src/main/resources/mapper/system/projectV2/common/SendSmsConfigMapper.xml

@@ -4,9 +4,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.ruoyi.system.mapper.projectV2.common.SendSmsConfigMapper">
     
-    <resultMap type="SendSmsConfig" id="SendSmsConfigResult">
+    <resultMap type="com.ruoyi.system.domain.projectV2.common.SendSmsConfig" id="SendSmsConfigResult">
         <result property="id"    column="id"    />
         <result property="userId"    column="user_id"    />
+        <result property="deptId"    column="dept_id"    />
         <result property="name"    column="name"    />
         <result property="phone"    column="phone"    />
         <result property="progress"    column="progress"    />
@@ -19,18 +20,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
 
     <sql id="selectSendSmsConfigVo">
-        select id, user_id, name, phone, progress, modify_date, create_by, create_time, update_by, update_time, is_del from send_sms_config
+        select id, user_id,dept_id, name, phone, progress, modify_date, create_by, create_time, update_by, update_time, is_del from send_sms_config
     </sql>
 
     <select id="selectSendSmsConfigList" parameterType="SendSmsConfig" resultMap="SendSmsConfigResult">
         <include refid="selectSendSmsConfigVo"/>
-        <where>  
+        <where>
+            is_del = 'N'
             <if test="userId != null "> and user_id = #{userId}</if>
+            <if test="deptId != null "> and dept_id = #{deptId}</if>
             <if test="name != null  and name != ''"> and name like concat('%', #{name}, '%')</if>
             <if test="phone != null  and phone != ''"> and phone = #{phone}</if>
             <if test="progress != null  and progress != ''"> and progress = #{progress}</if>
             <if test="modifyDate != null  and modifyDate != ''"> and modify_date = #{modifyDate}</if>
-            <if test="isDel != null  and isDel != ''"> and is_del = #{isDel}</if>
         </where>
     </select>
     
@@ -43,6 +45,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         insert into send_sms_config
         <trim prefix="(" suffix=")" suffixOverrides=",">
             <if test="userId != null">user_id,</if>
+            <if test="deptId != null">dept_id,</if>
             <if test="name != null and name != ''">name,</if>
             <if test="phone != null and phone != ''">phone,</if>
             <if test="progress != null and progress != ''">progress,</if>
@@ -55,6 +58,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="userId != null">#{userId},</if>
+            <if test="deptId != null">#{deptId},</if>
             <if test="name != null and name != ''">#{name},</if>
             <if test="phone != null and phone != ''">#{phone},</if>
             <if test="progress != null and progress != ''">#{progress},</if>
@@ -71,6 +75,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         update send_sms_config
         <trim prefix="SET" suffixOverrides=",">
             <if test="userId != null">user_id = #{userId},</if>
+            <if test="deptId != null">dept_id = #{deptId},</if>
             <if test="name != null and name != ''">name = #{name},</if>
             <if test="phone != null and phone != ''">phone = #{phone},</if>
             <if test="progress != null and progress != ''">progress = #{progress},</if>