Kaynağa Gözat

短信和邮件测试

wukai 7 ay önce
ebeveyn
işleme
88c87bc1d0

+ 85 - 85
jjt-admin/pom.xml

@@ -76,78 +76,13 @@
 
     <build>
         <plugins>
-<!--            <plugin>-->
-<!--                <groupId>org.springframework.boot</groupId>-->
-<!--                <artifactId>spring-boot-maven-plugin</artifactId>-->
-<!--                <version>2.5.15</version>-->
-<!--                <configuration>-->
-<!--                    <fork>true</fork> &lt;!&ndash; 如果没有该配置,devtools不会生效 &ndash;&gt;-->
-<!--                </configuration>-->
-<!--                <executions>-->
-<!--                    <execution>-->
-<!--                        <goals>-->
-<!--                            <goal>repackage</goal>-->
-<!--                        </goals>-->
-<!--                    </execution>-->
-<!--                </executions>-->
-<!--            </plugin>-->
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-war-plugin</artifactId>
-                <version>3.1.0</version>
-                <configuration>
-                    <failOnMissingWebXml>false</failOnMissingWebXml>
-                    <warName>${project.artifactId}</warName>
-                </configuration>
-            </plugin>
-
-            <!--下面这段是分离打包-->
-
             <plugin>
                 <groupId>org.springframework.boot</groupId>
                 <artifactId>spring-boot-maven-plugin</artifactId>
                 <version>2.5.15</version>
                 <configuration>
                     <fork>true</fork> <!-- 如果没有该配置,devtools不会生效 -->
-                    <executable>true</executable>
-                    <layout>ZIP</layout>
-                    <!--这里是填写需要包含进去的jar,
-                         必须项目中的某些模块,会经常变动,那么就应该将其坐标写进来
-                         如果没有则nothing ,表示不打包依赖 -->
-                    <includes>
-                        <!-- 定时任务-->
-                        <include>
-                            <groupId>com.jjt</groupId>
-                            <artifactId>jjt-quartz</artifactId>
-                        </include>
-                        <!-- 代码生成-->
-                        <include>
-                            <groupId>com.jjt</groupId>
-                            <artifactId>jjt-generator</artifactId>
-                        </include>
-                        <!-- 核心模块-->
-                        <include>
-                            <groupId>com.jjt</groupId>
-                            <artifactId>jjt-framework</artifactId>
-                        </include>
-                        <!-- 系统模块-->
-                        <include>
-                            <groupId>com.jjt</groupId>
-                            <artifactId>jjt-system</artifactId>
-                        </include>
-                        <!-- 通用工具-->
-                        <include>
-                            <groupId>com.jjt</groupId>
-                            <artifactId>jjt-common</artifactId>
-                        </include>
-                        <!-- 业务模块-->
-                        <include>
-                            <groupId>com.jjt</groupId>
-                            <artifactId>jjt-biz</artifactId>
-                        </include>
-                    </includes>
                 </configuration>
-
                 <executions>
                     <execution>
                         <goals>
@@ -155,30 +90,95 @@
                         </goals>
                     </execution>
                 </executions>
-
             </plugin>
-
-            <!--拷贝依赖到jar外面的lib目录-->
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-dependency-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <id>copy</id>
-                        <phase>package</phase>
-                        <goals>
-                            <goal>copy-dependencies</goal>
-                        </goals>
-                        <configuration>
-                            <!--指定的依赖路径-->
-                            <outputDirectory>${project.build.directory}/lib</outputDirectory>
-                            <!--排除的ArtifactId-->
-                            <excludeArtifactIds>jjt-framework,jjt-system,jjt-quartz,jjt-generator,jjt-common,jjt-biz
-                            </excludeArtifactIds>
-                        </configuration>
-                    </execution>
-                </executions>
+                <artifactId>maven-war-plugin</artifactId>
+                <version>3.1.0</version>
+                <configuration>
+                    <failOnMissingWebXml>false</failOnMissingWebXml>
+                    <warName>${project.artifactId}</warName>
+                </configuration>
             </plugin>
+
+            <!--下面这段是分离打包-->
+
+<!--            <plugin>-->
+<!--                <groupId>org.springframework.boot</groupId>-->
+<!--                <artifactId>spring-boot-maven-plugin</artifactId>-->
+<!--                <version>2.5.15</version>-->
+<!--                <configuration>-->
+<!--                    <fork>true</fork> &lt;!&ndash; 如果没有该配置,devtools不会生效 &ndash;&gt;-->
+<!--                    <executable>true</executable>-->
+<!--                    <layout>ZIP</layout>-->
+<!--                    &lt;!&ndash;这里是填写需要包含进去的jar,-->
+<!--                         必须项目中的某些模块,会经常变动,那么就应该将其坐标写进来-->
+<!--                         如果没有则nothing ,表示不打包依赖 &ndash;&gt;-->
+<!--                    <includes>-->
+<!--                        &lt;!&ndash; 定时任务&ndash;&gt;-->
+<!--                        <include>-->
+<!--                            <groupId>com.jjt</groupId>-->
+<!--                            <artifactId>jjt-quartz</artifactId>-->
+<!--                        </include>-->
+<!--                        &lt;!&ndash; 代码生成&ndash;&gt;-->
+<!--                        <include>-->
+<!--                            <groupId>com.jjt</groupId>-->
+<!--                            <artifactId>jjt-generator</artifactId>-->
+<!--                        </include>-->
+<!--                        &lt;!&ndash; 核心模块&ndash;&gt;-->
+<!--                        <include>-->
+<!--                            <groupId>com.jjt</groupId>-->
+<!--                            <artifactId>jjt-framework</artifactId>-->
+<!--                        </include>-->
+<!--                        &lt;!&ndash; 系统模块&ndash;&gt;-->
+<!--                        <include>-->
+<!--                            <groupId>com.jjt</groupId>-->
+<!--                            <artifactId>jjt-system</artifactId>-->
+<!--                        </include>-->
+<!--                        &lt;!&ndash; 通用工具&ndash;&gt;-->
+<!--                        <include>-->
+<!--                            <groupId>com.jjt</groupId>-->
+<!--                            <artifactId>jjt-common</artifactId>-->
+<!--                        </include>-->
+<!--                        &lt;!&ndash; 业务模块&ndash;&gt;-->
+<!--                        <include>-->
+<!--                            <groupId>com.jjt</groupId>-->
+<!--                            <artifactId>jjt-biz</artifactId>-->
+<!--                        </include>-->
+<!--                    </includes>-->
+<!--                </configuration>-->
+
+<!--                <executions>-->
+<!--                    <execution>-->
+<!--                        <goals>-->
+<!--                            <goal>repackage</goal>-->
+<!--                        </goals>-->
+<!--                    </execution>-->
+<!--                </executions>-->
+
+<!--            </plugin>-->
+
+<!--            &lt;!&ndash;拷贝依赖到jar外面的lib目录&ndash;&gt;-->
+<!--            <plugin>-->
+<!--                <groupId>org.apache.maven.plugins</groupId>-->
+<!--                <artifactId>maven-dependency-plugin</artifactId>-->
+<!--                <executions>-->
+<!--                    <execution>-->
+<!--                        <id>copy</id>-->
+<!--                        <phase>package</phase>-->
+<!--                        <goals>-->
+<!--                            <goal>copy-dependencies</goal>-->
+<!--                        </goals>-->
+<!--                        <configuration>-->
+<!--                            &lt;!&ndash;指定的依赖路径&ndash;&gt;-->
+<!--                            <outputDirectory>${project.build.directory}/lib</outputDirectory>-->
+<!--                            &lt;!&ndash;排除的ArtifactId&ndash;&gt;-->
+<!--                            <excludeArtifactIds>jjt-framework,jjt-system,jjt-quartz,jjt-generator,jjt-common,jjt-biz-->
+<!--                            </excludeArtifactIds>-->
+<!--                        </configuration>-->
+<!--                    </execution>-->
+<!--                </executions>-->
+<!--            </plugin>-->
         </plugins>
         <finalName>jy2024</finalName>
     </build>

+ 6 - 0
jjt-admin/src/test/java/com/test/RuleEngine.java

@@ -1,6 +1,7 @@
 package com.test;
 
 
+import cn.hutool.json.JSONObject;
 import com.googlecode.aviator.AviatorEvaluator;
 
 import java.util.HashMap;
@@ -10,6 +11,11 @@ import java.util.regex.Pattern;
 
 public class RuleEngine {
     public static void main(String[] args) {
+        JSONObject json = new JSONObject();
+        json.putOnce("phone", 123);
+        json.putOnce("message", 321);
+        System.err.println(json.toJSONString(2));
+
 //        evaluator();
         match("${pp.1s}/${pp.tot}*100<99");
         match("${hh}/${hoho}*100<99");

+ 13 - 0
jjt-biz/src/main/java/com/jjt/push/controller/PushConfigController.java

@@ -9,6 +9,7 @@ import com.jjt.common.utils.poi.ExcelUtil;
 import com.jjt.push.domain.PushConfig;
 import com.jjt.push.service.IMailService;
 import com.jjt.push.service.IPushConfigService;
+import com.jjt.push.service.ISmsService;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiParam;
@@ -33,6 +34,8 @@ public class PushConfigController extends BaseController {
     private IPushConfigService pushConfigService;
     @Resource
     private IMailService mailService;
+    @Resource
+    private ISmsService smsService;
 
     /**
      * 查询推送配置列表
@@ -49,6 +52,11 @@ public class PushConfigController extends BaseController {
     @ApiOperation("短信发送")
     @GetMapping("/sms")
     public AjaxResult sms(@ApiParam(value = "手机号") String phone, @ApiParam(value = "短信内容") String content) {
+        try {
+            smsService.send(phone, content);
+        } catch (Exception e) {
+            return AjaxResult.error(e.getMessage());
+        }
         return AjaxResult.success();
     }
 
@@ -105,6 +113,11 @@ public class PushConfigController extends BaseController {
     @Log(title = "推送配置", businessType = BusinessType.UPDATE)
     @PutMapping
     public AjaxResult edit(@RequestBody PushConfig pushConfig) {
+        if (pushConfigService.selectPushConfigByPcId(1L) == null) {
+            PushConfig config = new PushConfig();
+            config.setPcId(1L);
+            pushConfigService.insertPushConfig(config);
+        }
         return toAjax(pushConfigService.updatePushConfig(pushConfig));
     }
 

+ 19 - 0
jjt-biz/src/main/java/com/jjt/push/service/ISmsService.java

@@ -0,0 +1,19 @@
+package com.jjt.push.service;
+
+/**
+ * 推送配置Service接口
+ *
+ * @author jjt
+ * @date 2024-10-08
+ */
+public interface ISmsService {
+    /**
+     * 发送邮件
+     *
+     * @param phone   手机号
+     * @param content 内容
+     * @return 结果
+     * @throws Exception 异常
+     */
+    boolean send(String phone, String content) throws Exception;
+}

+ 1 - 1
jjt-biz/src/main/java/com/jjt/push/service/impl/MailServiceImpl.java

@@ -80,7 +80,7 @@ public class MailServiceImpl implements IMailService {
             Transport.send(message);
             return true;
         } catch (MessagingException e) {
-            throw new RuntimeException("邮件发送错误", e);
+            throw new RuntimeException("邮件发送错误:{}" + e.getMessage());
         }
     }
 }

+ 70 - 0
jjt-biz/src/main/java/com/jjt/push/service/impl/SmsServiceImpl.java

@@ -0,0 +1,70 @@
+package com.jjt.push.service.impl;
+
+import cn.hutool.http.HttpRequest;
+import cn.hutool.http.HttpResponse;
+import cn.hutool.json.JSONObject;
+import cn.hutool.json.JSONUtil;
+import com.jjt.push.domain.PushConfig;
+import com.jjt.push.mapper.PushConfigMapper;
+import com.jjt.push.service.ISmsService;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * 推送配置Service业务层处理
+ *
+ * @author jjt
+ * @date 2024-10-08
+ */
+@Service
+public class SmsServiceImpl implements ISmsService {
+    @Resource
+    private PushConfigMapper pushConfigMapper;
+
+    /**
+     * 发送邮件
+     *
+     * @param phone   手机号
+     * @param content 内容
+     * @return 结果
+     * @throws Exception 异常
+     */
+    @Override
+    public boolean send(String phone, String content) throws Exception {
+        //获取短信接口发送地址
+        PushConfig pc = pushConfigMapper.selectPushConfigByPcId(1L);
+        Map<String, Object> map = JSONUtil.toBean(pc.getConfigSms(), Map.class);
+        String uri = (String) map.get("uri");
+        // 封装请求体
+        JSONObject json = new JSONObject();
+        json.putOnce("phone", phone);
+        json.putOnce("message", content);
+        // 添加请求头信息
+        Map<String, String> heads = new HashMap<>();
+        // 使用json发送请求,下面的是必须的
+        heads.put("Content-Type", "application/json;charset=UTF-8");
+
+        try {
+        /* headerMap是添加的请求头
+            body是传入的参数,这里选择json,后端使用@RequestBody接收
+         */
+            HttpResponse response = HttpRequest.post(uri)
+                    .headerMap(heads, false)
+                    .body(json.toJSONString(1))
+                    .timeout(5 * 1000)
+                    .execute();
+            JSONObject object = JSONUtil.parseObj(response.body(), true);
+            Integer result = object.getInt("result");
+            if (result == 0) {
+                return true;
+            } else {
+                throw new Exception(object.toJSONString(1));
+            }
+        } catch (Exception e) {
+            throw new Exception("短信发送错误:" + e.getMessage());
+        }
+    }
+}

+ 142 - 126
jjt-biz/src/main/resources/mapper/push/PushConfigMapper.xml

@@ -5,166 +5,182 @@
 <mapper namespace="com.jjt.push.mapper.PushConfigMapper">
 
     <resultMap type="PushConfig" id="PushConfigResult">
-            <result property="pcId" column="PC_ID"/>
-            <result property="flagSms" column="FLAG_SMS"/>
-            <result property="flagMail" column="FLAG_MAIL"/>
-            <result property="configSms" column="CONFIG_SMS"/>
-            <result property="configMail" column="CONFIG_MAIL"/>
-            <result property="lowSms" column="LOW_SMS"/>
-            <result property="lowMail" column="LOW_MAIL"/>
-            <result property="midSms" column="MID_SMS"/>
-            <result property="midMail" column="MID_MAIL"/>
-            <result property="highSms" column="HIGH_SMS"/>
-            <result property="highMail" column="HIGH_MAIL"/>
-            <result property="remark" column="REMARK"/>
+        <result property="pcId" column="PC_ID"/>
+        <result property="flagSms" column="FLAG_SMS"/>
+        <result property="flagMail" column="FLAG_MAIL"/>
+        <result property="configSms" column="CONFIG_SMS"/>
+        <result property="configMail" column="CONFIG_MAIL"/>
+        <result property="lowSms" column="LOW_SMS"/>
+        <result property="lowMail" column="LOW_MAIL"/>
+        <result property="midSms" column="MID_SMS"/>
+        <result property="midMail" column="MID_MAIL"/>
+        <result property="highSms" column="HIGH_SMS"/>
+        <result property="highMail" column="HIGH_MAIL"/>
+        <result property="remark" column="REMARK"/>
     </resultMap>
 
     <sql id="selectPushConfigVo">
-        select PC_ID, FLAG_SMS, FLAG_MAIL, CONFIG_SMS, CONFIG_MAIL, LOW_SMS, LOW_MAIL, MID_SMS, MID_MAIL, HIGH_SMS, HIGH_MAIL, REMARK
+        select PC_ID,
+               FLAG_SMS,
+               FLAG_MAIL,
+               CONFIG_SMS,
+               CONFIG_MAIL,
+               LOW_SMS,
+               LOW_MAIL,
+               MID_SMS,
+               MID_MAIL,
+               HIGH_SMS,
+               HIGH_MAIL,
+               REMARK
         from push_config
     </sql>
 
     <select id="selectPushConfigList" parameterType="PushConfig" resultMap="PushConfigResult">
         <include refid="selectPushConfigVo"/>
         <where>
-                        <if test="flagSms != null  and flagSms != ''">
-                            and FLAG_SMS = #{flagSms}
-                        </if>
-                        <if test="flagMail != null  and flagMail != ''">
-                            and FLAG_MAIL = #{flagMail}
-                        </if>
-                        <if test="configSms != null  and configSms != ''">
-                            and CONFIG_SMS = #{configSms}
-                        </if>
-                        <if test="configMail != null  and configMail != ''">
-                            and CONFIG_MAIL = #{configMail}
-                        </if>
-                        <if test="lowSms != null  and lowSms != ''">
-                            and LOW_SMS = #{lowSms}
-                        </if>
-                        <if test="lowMail != null  and lowMail != ''">
-                            and LOW_MAIL = #{lowMail}
-                        </if>
-                        <if test="midSms != null  and midSms != ''">
-                            and MID_SMS = #{midSms}
-                        </if>
-                        <if test="midMail != null  and midMail != ''">
-                            and MID_MAIL = #{midMail}
-                        </if>
-                        <if test="highSms != null  and highSms != ''">
-                            and HIGH_SMS = #{highSms}
-                        </if>
-                        <if test="highMail != null  and highMail != ''">
-                            and HIGH_MAIL = #{highMail}
-                        </if>
-                        <if test="remark != null  and remark != ''">
-                            and REMARK = #{remark}
-                        </if>
+            <if test="flagSms != null  and flagSms != ''">
+                and FLAG_SMS = #{flagSms}
+            </if>
+            <if test="flagMail != null  and flagMail != ''">
+                and FLAG_MAIL = #{flagMail}
+            </if>
+            <if test="configSms != null  and configSms != ''">
+                and CONFIG_SMS = #{configSms}
+            </if>
+            <if test="configMail != null  and configMail != ''">
+                and CONFIG_MAIL = #{configMail}
+            </if>
+            <if test="lowSms != null  and lowSms != ''">
+                and LOW_SMS = #{lowSms}
+            </if>
+            <if test="lowMail != null  and lowMail != ''">
+                and LOW_MAIL = #{lowMail}
+            </if>
+            <if test="midSms != null  and midSms != ''">
+                and MID_SMS = #{midSms}
+            </if>
+            <if test="midMail != null  and midMail != ''">
+                and MID_MAIL = #{midMail}
+            </if>
+            <if test="highSms != null  and highSms != ''">
+                and HIGH_SMS = #{highSms}
+            </if>
+            <if test="highMail != null  and highMail != ''">
+                and HIGH_MAIL = #{highMail}
+            </if>
+            <if test="remark != null  and remark != ''">
+                and REMARK = #{remark}
+            </if>
         </where>
     </select>
 
     <select id="selectPushConfigByPcId" parameterType="Long"
             resultMap="PushConfigResult">
-            <include refid="selectPushConfigVo"/>
-            where PC_ID = #{pcId}
+        <include refid="selectPushConfigVo"/>
+        where PC_ID = #{pcId}
     </select>
 
     <insert id="insertPushConfig" parameterType="PushConfig" useGeneratedKeys="true"
             keyProperty="pcId">
         insert into push_config
         <trim prefix="(" suffix=")" suffixOverrides=",">
-                    <if test="flagSms != null">FLAG_SMS,
-                    </if>
-                    <if test="flagMail != null">FLAG_MAIL,
-                    </if>
-                    <if test="configSms != null">CONFIG_SMS,
-                    </if>
-                    <if test="configMail != null">CONFIG_MAIL,
-                    </if>
-                    <if test="lowSms != null">LOW_SMS,
-                    </if>
-                    <if test="lowMail != null">LOW_MAIL,
-                    </if>
-                    <if test="midSms != null">MID_SMS,
-                    </if>
-                    <if test="midMail != null">MID_MAIL,
-                    </if>
-                    <if test="highSms != null">HIGH_SMS,
-                    </if>
-                    <if test="highMail != null">HIGH_MAIL,
-                    </if>
-                    <if test="remark != null">REMARK,
-                    </if>
+            <if test="pcId != null">PC_ID,
+            </if>
+            <if test="flagSms != null">FLAG_SMS,
+            </if>
+            <if test="flagMail != null">FLAG_MAIL,
+            </if>
+            <if test="configSms != null">CONFIG_SMS,
+            </if>
+            <if test="configMail != null">CONFIG_MAIL,
+            </if>
+            <if test="lowSms != null">LOW_SMS,
+            </if>
+            <if test="lowMail != null">LOW_MAIL,
+            </if>
+            <if test="midSms != null">MID_SMS,
+            </if>
+            <if test="midMail != null">MID_MAIL,
+            </if>
+            <if test="highSms != null">HIGH_SMS,
+            </if>
+            <if test="highMail != null">HIGH_MAIL,
+            </if>
+            <if test="remark != null">REMARK,
+            </if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
-                    <if test="flagSms != null">#{flagSms},
-                    </if>
-                    <if test="flagMail != null">#{flagMail},
-                    </if>
-                    <if test="configSms != null">#{configSms},
-                    </if>
-                    <if test="configMail != null">#{configMail},
-                    </if>
-                    <if test="lowSms != null">#{lowSms},
-                    </if>
-                    <if test="lowMail != null">#{lowMail},
-                    </if>
-                    <if test="midSms != null">#{midSms},
-                    </if>
-                    <if test="midMail != null">#{midMail},
-                    </if>
-                    <if test="highSms != null">#{highSms},
-                    </if>
-                    <if test="highMail != null">#{highMail},
-                    </if>
-                    <if test="remark != null">#{remark},
-                    </if>
+            <if test="pcId != null">#{pcId},
+            </if>
+            <if test="flagSms != null">#{flagSms},
+            </if>
+            <if test="flagMail != null">#{flagMail},
+            </if>
+            <if test="configSms != null">#{configSms},
+            </if>
+            <if test="configMail != null">#{configMail},
+            </if>
+            <if test="lowSms != null">#{lowSms},
+            </if>
+            <if test="lowMail != null">#{lowMail},
+            </if>
+            <if test="midSms != null">#{midSms},
+            </if>
+            <if test="midMail != null">#{midMail},
+            </if>
+            <if test="highSms != null">#{highSms},
+            </if>
+            <if test="highMail != null">#{highMail},
+            </if>
+            <if test="remark != null">#{remark},
+            </if>
         </trim>
     </insert>
 
     <update id="updatePushConfig" parameterType="PushConfig">
         update push_config
         <trim prefix="SET" suffixOverrides=",">
-                    <if test="flagSms != null">FLAG_SMS =
-                        #{flagSms},
-                    </if>
-                    <if test="flagMail != null">FLAG_MAIL =
-                        #{flagMail},
-                    </if>
-                    <if test="configSms != null">CONFIG_SMS =
-                        #{configSms},
-                    </if>
-                    <if test="configMail != null">CONFIG_MAIL =
-                        #{configMail},
-                    </if>
-                    <if test="lowSms != null">LOW_SMS =
-                        #{lowSms},
-                    </if>
-                    <if test="lowMail != null">LOW_MAIL =
-                        #{lowMail},
-                    </if>
-                    <if test="midSms != null">MID_SMS =
-                        #{midSms},
-                    </if>
-                    <if test="midMail != null">MID_MAIL =
-                        #{midMail},
-                    </if>
-                    <if test="highSms != null">HIGH_SMS =
-                        #{highSms},
-                    </if>
-                    <if test="highMail != null">HIGH_MAIL =
-                        #{highMail},
-                    </if>
-                    <if test="remark != null">REMARK =
-                        #{remark},
-                    </if>
+            <if test="flagSms != null">FLAG_SMS =
+                #{flagSms},
+            </if>
+            <if test="flagMail != null">FLAG_MAIL =
+                #{flagMail},
+            </if>
+            <if test="configSms != null">CONFIG_SMS =
+                #{configSms},
+            </if>
+            <if test="configMail != null">CONFIG_MAIL =
+                #{configMail},
+            </if>
+            <if test="lowSms != null">LOW_SMS =
+                #{lowSms},
+            </if>
+            <if test="lowMail != null">LOW_MAIL =
+                #{lowMail},
+            </if>
+            <if test="midSms != null">MID_SMS =
+                #{midSms},
+            </if>
+            <if test="midMail != null">MID_MAIL =
+                #{midMail},
+            </if>
+            <if test="highSms != null">HIGH_SMS =
+                #{highSms},
+            </if>
+            <if test="highMail != null">HIGH_MAIL =
+                #{highMail},
+            </if>
+            <if test="remark != null">REMARK =
+                #{remark},
+            </if>
         </trim>
         where PC_ID = #{pcId}
     </update>
 
     <delete id="deletePushConfigByPcId" parameterType="Long">
         delete
-        from push_config where PC_ID = #{pcId}
+        from push_config
+        where PC_ID = #{pcId}
     </delete>
 
     <delete id="deletePushConfigByPcIds" parameterType="String">