Browse Source

Merge branch 'alert' into uat

njs 2 years ago
parent
commit
8e5a0b50c8

+ 2 - 2
suishenbang-admin/src/main/resources/templates/system/alertConfiguration/add.html

@@ -78,8 +78,8 @@
 <th:block th:include="include :: bootstrap-select-js" />
 <th:block th:include="include :: bootstrap-select-js" />
 <script type="text/javascript">
 <script type="text/javascript">
     var prefix = ctx + "system/configuration"
     var prefix = ctx + "system/configuration"
-    var getCompanyListPrefix = "http://localhost:10001/wxportal-api/sysuser/searchOrg";
-    // var getCompanyListPrefix = "http://suishenbangtest.nipponpaint.com.cn/wxportal-api/sysuser/searchOrg";
+    //var getCompanyListPrefix = "http://localhost:10001/wxportal-api/sysuser/searchOrg";
+    var getCompanyListPrefix = "http://suishenbangtest.nipponpaint.com.cn/wxportal-api/sysuser/searchOrg";
 
 
     $(document).ready(function () {
     $(document).ready(function () {
         var obj = {
         var obj = {

+ 8 - 6
suishenbang-admin/src/main/resources/templates/system/alertConfiguration/configuration.html

@@ -155,23 +155,25 @@
         /* 启动状态显示 */
         /* 启动状态显示 */
         function statusTools(row) {
         function statusTools(row) {
             if (row.alertStatus == 0) {
             if (row.alertStatus == 0) {
-                return '<i class=\"fa fa-toggle-off text-info fa-2x\" onclick="enable(\'' + row.alertId + '\')"></i> ';
+                return '<i class=\"fa fa-toggle-off text-info fa-2x\" onclick="enable(\'' + row.alertId + ',' + row.userType + ',' + row.salesLevel + ',' + row.orgCode + '\')"></i> ';
             } else {
             } else {
-                return '<i class=\"fa fa-toggle-on text-info fa-2x\" onclick="disable(\'' + row.alertId + '\')"></i> ';
+                return '<i class=\"fa fa-toggle-on text-info fa-2x\" onclick="disable(\'' + row.alertId + ',' + row.userType + ',' + row.salesLevel + ',' + row.orgCode + '\')"></i> ';
             }
             }
         }
         }
 
 
         /* 停用 */
         /* 停用 */
-        function disable(roleId) {
+        function disable(row) {
+            var arrayTingyong = row.split(',');
             $.modal.confirm("确认关闭该通知吗?", function() {
             $.modal.confirm("确认关闭该通知吗?", function() {
-                $.operate.post(prefix + "/release", { "alertId": roleId, "alertStatus": 0 });
+                $.operate.post(prefix + "/release", { "alertId": arrayTingyong[0], "alertStatus": 0, "userType": arrayTingyong[1], "salesLevel": arrayTingyong[2], "orgCode": arrayTingyong[3] });
             })
             })
         }
         }
 
 
         /* 启用 */
         /* 启用 */
-        function enable(roleId) {
+        function enable(row) {
+            var arrayQiyong = row.split(',');
             $.modal.confirm("确认启用该通知吗?", function() {
             $.modal.confirm("确认启用该通知吗?", function() {
-                $.operate.post(prefix + "/release", { "alertId": roleId, "alertStatus": 1 });
+                $.operate.post(prefix + "/release", { "alertId": arrayQiyong[0], "alertStatus": 1, "userType": arrayQiyong[1], "salesLevel": arrayQiyong[2], "orgCode": arrayQiyong[3] });
             })
             })
         }
         }
     </script>
     </script>

+ 2 - 2
suishenbang-admin/src/main/resources/templates/system/alertConfiguration/edit.html

@@ -87,8 +87,8 @@
     <th:block th:include="include :: bootstrap-select-js" />
     <th:block th:include="include :: bootstrap-select-js" />
     <script type="text/javascript">
     <script type="text/javascript">
         var prefix = ctx + "system/configuration";
         var prefix = ctx + "system/configuration";
-        var getCompanyListPrefix = "http://localhost:10001/wxportal-api/sysuser/searchOrg";
-        // var getCompanyListPrefix = "http://suishenbangtest.nipponpaint.com.cn/wxportal-api/sysuser/searchOrg";
+        //var getCompanyListPrefix = "http://localhost:10001/wxportal-api/sysuser/searchOrg";
+        var getCompanyListPrefix = "http://suishenbangtest.nipponpaint.com.cn/wxportal-api/sysuser/searchOrg";
 
 
         $(document).ready(function () {
         $(document).ready(function () {
             var formArray = $('#form-configuration-edit').serializeArray();
             var formArray = $('#form-configuration-edit').serializeArray();

+ 2 - 2
suishenbang-system/src/main/resources/mapper/system/AlertConfigurationMapper.xml

@@ -42,8 +42,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <select id="selectAlertConfigurationListFilter" parameterType="Long" resultMap="AlertConfigurationResult">
     <select id="selectAlertConfigurationListFilter" parameterType="Long" resultMap="AlertConfigurationResult">
         <include refid="selectAlertConfigurationVo"/>
         <include refid="selectAlertConfigurationVo"/>
         WHERE alert_status = 1
         WHERE alert_status = 1
-        <if test="userType !=null and userType !=''">
-            and user_type = #{userType}
+        <if test="userType !=null and userType !='' and userType !='0,1' ">
+            and user_type =#{userType}
         </if>
         </if>
     </select>
     </select>