Browse Source

edit mail

liuchaojie 4 years ago
parent
commit
11281df73b

+ 2 - 2
src/main/java/com/xc/controller/SiteApiController.java

@@ -44,14 +44,14 @@ public class SiteApiController {
 //        return ServerResponse.createBySuccess(siteInfo);
     }
 
-    //查询充方式信息
+    //查询充方式信息
     @RequestMapping({"getPayInfo.do"})
     @ResponseBody
     public ServerResponse getPayInfo() {
         return this.iSitePayService.getPayInfo();
     }
 
-    //查询充订单信息
+    //查询充订单信息
     @RequestMapping({"getPayInfoById.do"})
     @ResponseBody
     public ServerResponse getPayInfoById(Integer payId) {

File diff suppressed because it is too large
+ 5 - 5
src/main/java/com/xc/controller/backend/AdminRechargeController.java


+ 1 - 1
src/main/java/com/xc/controller/backend/AdminWithDrawController.java

@@ -35,7 +35,7 @@ public class AdminWithDrawController {
         try {
             serverResponse = this.iUserWithdrawService.updateState(withId, state, authMsg);
         } catch (Exception e) {
-            log.error("admin修改充订单状态出错 ,异常 = {}", e);
+            log.error("admin修改充订单状态出错 ,异常 = {}", e);
         }
         return serverResponse;
     }

+ 3 - 3
src/main/java/com/xc/controller/protol/UserRechargeController.java

@@ -31,19 +31,19 @@ public class UserRechargeController {
     @Autowired
     private IUserService iUserService;
 
-    //分页查询所有充记录
+    //分页查询所有充记录
     @RequestMapping({"list.do"})
     @ResponseBody
     public ServerResponse<PageInfo> list(@RequestParam(value = "pageNum", defaultValue = "1") int pageNum, @RequestParam(value = "pageSize", defaultValue = "10") int pageSize, @RequestParam(value = "payChannel", required = false) String payChannel, @RequestParam(value = "orderStatus", required = false) String orderStatus, HttpServletRequest request) {
         return this.iUserRechargeService.findUserChargeList(payChannel, orderStatus, request, pageNum, pageSize);
     }
 
-    //账户线下充值转账 创建充值订单
+    //账户线下充币转账 创建充币订单
     @RequestMapping({"inMoney.do"})
     @ResponseBody
     public ServerResponse inMoney(String amtRMB, String amt, String payType,String orderDesc, HttpServletRequest request) {
         User user = this.iUserService.getCurrentRefreshUser(request);
-        messageService.sendTopicMessage(String.format("%s充了%s", user.getRealName(), amt));
+        messageService.sendTopicMessage(String.format("%s充了%s", user.getRealName(), amt));
         return this.iUserRechargeService.inMoney(amtRMB, amt, payType,orderDesc , request);
     }
 }

+ 3 - 5
src/main/java/com/xc/dao/SiteInfoMapper.java

@@ -8,13 +8,11 @@ public interface SiteInfoMapper {
 
   int insert(SiteInfo paramSiteInfo);
 
-  int insertSelective(SiteInfo paramSiteInfo);
-
   SiteInfo selectByPrimaryKey(Integer paramInteger);
 
-  int updateByPrimaryKeySelective(SiteInfo paramSiteInfo);
+  SiteInfo selectOne();
 
-  int updateByPrimaryKey(SiteInfo paramSiteInfo);
+  int updateByPrimaryKeySelective(SiteInfo paramSiteInfo);
 
   List findAll();
-}
+}

File diff suppressed because it is too large
+ 13 - 271
src/main/java/com/xc/pojo/SiteInfo.java


+ 4 - 4
src/main/java/com/xc/pojo/UserRecharge.java

@@ -8,7 +8,7 @@ import java.math.BigDecimal;
 import java.util.Date;
 
 /**
- * 充
+ * 充
  */
 @Data
 public class UserRecharge {
@@ -20,8 +20,8 @@ public class UserRecharge {
     private String orderSn;
     private String paySn;
     private String payChannel;
-    private BigDecimal payAmt; //充换算的美元
-    private BigDecimal payAmtRMB; //充的人民币
+    private BigDecimal payAmt; //充换算的美元
+    private BigDecimal payAmtRMB; //充的人民币
     private Integer orderStatus;
     private String orderDesc;
     private Date addTime;
@@ -60,4 +60,4 @@ public class UserRecharge {
         this.payAmtRMB = payAmtRMB;
     }
 
-}
+}

+ 7 - 1
src/main/java/com/xc/service/impl/EmailServiceImpl.java

@@ -1,7 +1,9 @@
 package com.xc.service.impl;
 
 import com.xc.common.ServerResponse;
+import com.xc.dao.SiteInfoMapper;
 import com.xc.dao.SiteSmsLogMapper;
+import com.xc.pojo.SiteInfo;
 import com.xc.pojo.SiteSmsLog;
 import com.xc.service.EmailService;
 import com.xc.utils.DateTimeUtil;
@@ -18,12 +20,16 @@ public class EmailServiceImpl  implements EmailService {
     @Autowired
     SiteSmsLogMapper siteSmsLogMapper;
 
+    @Autowired
+    SiteInfoMapper siteInfoMapper;
+
     @Override
     public String sendRegEmail(String emailAdd){
         String yzmCode = RandomStringUtils.randomNumeric(4);
         String str = "您的注册验证码为:" + yzmCode;
         try {
-            (new MailSender.Builder(str, emailAdd)).send();
+            SiteInfo siteInfo = siteInfoMapper.selectOne();
+            (new MailSender.Builder(siteInfo.getSiteEmailHost(),siteInfo.getSiteEmailProtocol() , siteInfo.getSiteEmailSubject() ,siteInfo.getSiteEmailFrom(), siteInfo.getSiteEmailPassword(), str , emailAdd)).send();
             String keys = "AliyunSmsCode:" + emailAdd;
             RedisShardedPoolUtils.setEx(keys, yzmCode, 5400);
             if (!StringUtils.isEmpty(yzmCode)) {

+ 2 - 2
src/main/java/com/xc/service/impl/PayServiceImpl.java

@@ -117,7 +117,7 @@ public class PayServiceImpl implements IPayService {
 
         String pay_amount = payAmt;
         String pay_attach = "";
-        String pay_productname = "100元话费充";
+        String pay_productname = "100元话费充";
         String pay_productnum = "";
         String pay_productdesc = "";
         String pay_producturl = "";
@@ -385,4 +385,4 @@ public class PayServiceImpl implements IPayService {
         }
         return null;
     }
-}
+}

+ 0 - 6
src/main/java/com/xc/service/impl/SiteInfoServiceImpl.java

@@ -72,7 +72,6 @@ public class SiteInfoServiceImpl implements ISiteInfoService {
     public ServerResponse<SiteInfo> getInfo() {
         try {
             List<SiteInfo> siteInfos = this.siteInfoMapper.findAll();
-
             if (siteInfos.size() > 0) {
                 SiteInfo siteInfo = (SiteInfo) siteInfos.get(0);
                 String isValidationSms = PropertiesUtil.getProperty("is.validation.sms");
@@ -81,11 +80,6 @@ public class SiteInfoServiceImpl implements ISiteInfoService {
                 } else {
                     siteInfo.setValidationSms(false);
                 }
-            /*if (!StringUtils.isEmpty(siteInfo.getTradeAgree())) {
-                CmcPayOuterRequestUtil cmcPayOuterRequestUtil = new CmcPayOuterRequestUtil();
-                String result = cmcPayOuterRequestUtil.sendGet(siteInfo.getTradeAgree());
-                siteInfo.setTradeAgreeText(result);
-            }*/
                 return ServerResponse.createBySuccess(siteInfo);
             }
         } catch (Exception e) {

+ 13 - 13
src/main/java/com/xc/service/impl/UserRechargeServiceImpl.java

@@ -84,7 +84,7 @@ public class UserRechargeServiceImpl implements IUserRechargeService {
             return ServerResponse.createByErrorMsg("设置set未初始化");
         }
         if ((new BigDecimal(siteSetting.getChargeMinAmt() + "")).compareTo(new BigDecimal(amtRMB)) == 1) {
-            return ServerResponse.createByErrorMsg("充金额不得低于" + siteSetting.getChargeMinAmt() + "元");
+            return ServerResponse.createByErrorMsg("充金额不得低于" + siteSetting.getChargeMinAmt());
         }
         SiteInfo siteInfo = null;
         ServerResponse serverResponseInfo = this.iSiteInfoService.getInfo();
@@ -99,7 +99,7 @@ public class UserRechargeServiceImpl implements IUserRechargeService {
         }
         User user = this.iUserService.getCurrentRefreshUser(request);
         if (user.getIsActive().intValue() != 2) {
-            return ServerResponse.createByErrorMsg("未实名认证不能发起充");
+            return ServerResponse.createByErrorMsg("未实名认证不能发起充");
         }
         ServerResponse serverResponse = checkInMoney(10, user.getId());
         if (!serverResponse.isSuccess()) {
@@ -119,7 +119,7 @@ public class UserRechargeServiceImpl implements IUserRechargeService {
         //商家名称
         userRecharge.setOrderDesc(orderDesc);
 //        BigDecimal payAmt = new BigDecimal(amt);
-        // 账户充
+        // 账户充
         //汇率
 //        CoinAdminListVO coinAdminListVO = this.iStockCoinService.getSelectCoin();
 //        if (0 == coinAdminListVO.getDynamicRate()){
@@ -131,11 +131,11 @@ public class UserRechargeServiceImpl implements IUserRechargeService {
         if (insertCount > 0) {
             String email_token = KeyUtils.getUniqueKey();
             String redisSetExResult = RedisShardedPoolUtils.setEx(email_token, email_token, 300);
-            log.info("用户充,保存redis token成功,redisSetExResult = {}", redisSetExResult);
+            log.info("用户充,保存redis token成功,redisSetExResult = {}", redisSetExResult);
 //            SendHTMLMail.send(user, userRecharge, email_token, siteInfo
 //                    .getSiteHost(), siteInfo.getSiteEmailTo());
-//            log.info("用户充,发送审核邮件成功");
-            messageService.sendTopicMessage(String.format("%s充了%s", user.getRealName(), amt));
+//            log.info("用户充,发送审核邮件成功");
+            messageService.sendTopicMessage(String.format("%s充了%s", user.getRealName(), amt));
             return ServerResponse.createBySuccessMsg("创建支付订单成功!");
         }
         return ServerResponse.createByErrorMsg("创建支付订单失败");
@@ -147,13 +147,13 @@ public class UserRechargeServiceImpl implements IUserRechargeService {
         if (userRecharge != null) {
             return ServerResponse.createBySuccess(userRecharge);
         }
-        return ServerResponse.createByErrorMsg("找不到充订单");
+        return ServerResponse.createByErrorMsg("找不到充订单");
     }
 
 
     @Transactional
     public ServerResponse chargeSuccess(UserRecharge userRecharge) throws Exception {
-        log.info("充订单 确认成功操作 id = {}", userRecharge.getId());
+        log.info("充订单 确认成功操作 id = {}", userRecharge.getId());
 
         if (userRecharge.getOrderStatus().intValue() != 0) {
             return ServerResponse.createByErrorMsg("订单状态不能重复修改");
@@ -191,18 +191,18 @@ public class UserRechargeServiceImpl implements IUserRechargeService {
         ucd.setAgentName(user.getAgentName());
         ucd.setUserId(user.getId());
         ucd.setUserName(user.getRealName());
-        ucd.setDeType("用户充");
+        ucd.setDeType("用户充");
         ucd.setDeAmt(userRecharge.getPayAmt());
-        ucd.setDeSummary("用户充值成功,充值前总金额:" + userAmt_before + ",充值后总金额:" + user.getUserAmt() + ",充值前可用:" + enableAmt_before + ",充值后可用:" + user
+        ucd.setDeSummary("用户充币成功,充币前总金额:" + userAmt_before + ",充币后总金额:" + user.getUserAmt() + ",充币前可用:" + enableAmt_before + ",充币后可用:" + user
                 .getEnableAmt());
 
         ucd.setAddTime(new Date());
         ucd.setIsRead(Integer.valueOf(0));
         int insertCount = this.userCashDetailMapper.insert(ucd);
         if (insertCount > 0) {
-            return ServerResponse.createBySuccessMsg("充成功!");
+            return ServerResponse.createBySuccessMsg("充成功!");
         }
-        return ServerResponse.createByErrorMsg("充失败");
+        return ServerResponse.createByErrorMsg("充失败");
     }
 
 
@@ -298,7 +298,7 @@ public class UserRechargeServiceImpl implements IUserRechargeService {
         UserRecharge userRecharge = this.userRechargeMapper.selectByPrimaryKey(chargeId);
 
         if (userRecharge == null) {
-            return ServerResponse.createByErrorMsg("充订单不存在");
+            return ServerResponse.createByErrorMsg("充订单不存在");
         }
         if (userRecharge.getOrderStatus().intValue() != 0) {
             return ServerResponse.createByErrorMsg("订单状态不是下单状态不能更改");

+ 2 - 9
src/main/java/com/xc/service/impl/UserServiceImpl.java

@@ -255,21 +255,14 @@ public class UserServiceImpl implements IUserService {
         String gid = stock.getStockGid();
         String sinaResult = SinaStockApi.getSinaStock(gid);
         StockVO stockVO = SinaStockApi.assembleStockVO(sinaResult);
-
         StockOption stockOption = new StockOption();
         stockOption.setUserId(user.getId());
         stockOption.setStockId(stock.getId());
         stockOption.setAddTime(new Date());
-
         stockOption.setStockCode(stock.getStockCode());
         stockOption.setStockName(stock.getStockName());
         stockOption.setStockGid(stock.getStockGid());
         stockOption.setIsLock(stock.getIsLock());
-
-//        stockOption.setHcrate(stockVO.getHcrate().doubleValue());
-//        //System.out.println(stockOptionListVOS.getHcrate()+"fuke");
-//
-//        System.out.println(stockOption.getHcrate()+"不愿");
         int insertCount = this.stockOptionMapper.insert(stockOption);
         if (insertCount > 0) {
             return ServerResponse.createBySuccessMsg("添加自选股成功");
@@ -1000,9 +993,9 @@ public class UserServiceImpl implements IUserService {
         log.info("管理员 {} 删除用户 {}", siteAdmin.getAdminName(), userId);
         int delChargeCount = this.iUserRechargeService.deleteByUserId(userId);
         if (delChargeCount > 0) {
-            log.info("删除 充 记录成功");
+            log.info("删除 充 记录成功");
         } else {
-            log.info("删除 充 记录失败");
+            log.info("删除 充 记录失败");
         }
         int delWithdrawCount = this.iUserWithdrawService.deleteByUserId(userId);
         if (delWithdrawCount > 0) {

+ 9 - 2
src/main/java/com/xc/utils/email/MailSender.java

@@ -55,10 +55,17 @@ public class MailSender {
             this.fromPassword = fromPassword;
             return this;
         }
-        public Builder(String mailContent, String toAddress) {
+
+        public Builder(String host ,String protocol , String subject , String fromAddress , String fromPassword , String mailContent, String toAddress) {
+            this.host = host;
+            this.protocol = protocol;
+            this.subject =subject;
+            this.fromAddress = fromAddress;
+            this.fromPassword = fromPassword;
             this.mailContent = mailContent;
             this.toAddress = toAddress;
         }
+
         public Builder Protocol(String protocol) {
             this.protocol = protocol;
             return this;
@@ -83,7 +90,7 @@ public class MailSender {
         this.transport = this.session.getTransport();
         this.msg.setSubject(builder.subject);
         this.msg.setFrom((Address) new InternetAddress(builder.fromAddress, "通知邮件"));
-        this.transport.connect(builder.fromCount, builder.fromPassword);
+        this.transport.connect(builder.fromAddress, builder.fromPassword);
         this.msg.setContent(builder.mailContent, "text/html;charset=utf-8");
         this.transport.sendMessage(this.msg, new Address[]{ new InternetAddress(builder.toAddress)});
     }

+ 1 - 1
src/main/java/com/xc/utils/email/SendHTMLMail.java

@@ -91,7 +91,7 @@ public class SendHTMLMail {
             String str = new String(buff);
 
             str = str.replaceAll("\000", "");
-            (new MailSender.Builder(str.toString(), emailTo)).send();
+//            (new MailSender.Builder(str.toString(), emailTo)).send();
         } catch (Exception e) {
             e.printStackTrace();
         }

+ 31 - 197
src/main/java/mappers/SiteInfoMapper.xml

@@ -31,25 +31,40 @@
       <arg column="describe" jdbcType="VARCHAR" javaType="java.lang.String" />
       <arg column="open_notice" jdbcType="VARCHAR" javaType="java.lang.String" />
       <arg column="trader_notice" jdbcType="VARCHAR" javaType="java.lang.String" />
+      <arg column="site_email_password" jdbcType="VARCHAR" javaType="java.lang.String" />
+      <arg column="site_email_host" jdbcType="VARCHAR" javaType="java.lang.String" />
+      <arg column="site_email_protocol" jdbcType="VARCHAR" javaType="java.lang.String" />
+      <arg column="site_email_subject" jdbcType="VARCHAR" javaType="java.lang.String" />
     </constructor>
-
   </resultMap>
+
   <sql id="Base_Column_List" >
     id, site_name, site_host, site_keywords, site_description, site_logo, site_logo_sm, site_qq,
     site_phone, site_android_img, site_android_url, site_ios_img, site_ios_url, site_email_from,
     site_email_to, site_language, site_version_info, site_intro, risk_notice, company_info,
-    cert_img1, cert_img2, reg_agree, trade_agree, site_color, `describe`, open_notice, trader_notice
+    cert_img1, cert_img2, reg_agree, trade_agree, site_color, `describe`, open_notice, trader_notice,
+    site_email_password , site_email_host , site_email_protocol , site_email_subject
   </sql>
+
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
     select
     <include refid="Base_Column_List" />
     from site_info
     where id = #{id,jdbcType=INTEGER}
   </select>
+
+  <select id="selectOne" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
+    select
+    <include refid="Base_Column_List" />
+    from site_info
+    order by id DESC limit 1
+  </select>
+
   <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
     delete from site_info
     where id = #{id,jdbcType=INTEGER}
   </delete>
+
   <insert id="insert" parameterType="com.xc.pojo.SiteInfo" >
     insert into site_info (id, site_name, site_host, site_keywords,
       site_description, site_logo, site_logo_sm,
@@ -71,169 +86,6 @@
       )
   </insert>
 
-  <insert id="insertSelective" parameterType="com.xc.pojo.SiteInfo" >
-    insert into site_info
-    <trim prefix="(" suffix=")" suffixOverrides="," >
-      <if test="id != null" >
-        id,
-      </if>
-      <if test="siteName != null" >
-        site_name,
-      </if>
-      <if test="siteHost != null" >
-        site_host,
-      </if>
-      <if test="siteKeywords != null" >
-        site_keywords,
-      </if>
-      <if test="siteDescription != null" >
-        site_description,
-      </if>
-      <if test="siteLogo != null" >
-        site_logo,
-      </if>
-      <if test="siteLogoSm != null" >
-        site_logo_sm,
-      </if>
-      <if test="siteQq != null" >
-        site_qq,
-      </if>
-      <if test="sitePhone != null" >
-        site_phone,
-      </if>
-      <if test="siteAndroidImg != null" >
-        site_android_img,
-      </if>
-      <if test="siteAndroidUrl != null" >
-        site_android_url,
-      </if>
-      <if test="siteIosImg != null" >
-        site_ios_img,
-      </if>
-      <if test="siteIosUrl != null" >
-        site_ios_url,
-      </if>
-      <if test="siteEmailFrom != null" >
-        site_email_from,
-      </if>
-      <if test="siteEmailTo != null" >
-        site_email_to,
-      </if>
-      <if test="siteLanguage != null" >
-        site_language,
-      </if>
-      <if test="siteVersionInfo != null" >
-        site_version_info,
-      </if>
-
-      <if test="siteIntro != null" >
-        site_intro,
-      </if>
-      <if test="riskNotice != null" >
-        risk_notice,
-      </if>
-      <if test="companyInfo != null" >
-        company_info,
-      </if>
-      <if test="certImg1 != null" >
-        cert_img1,
-      </if>
-      <if test="certImg2 != null" >
-        cert_img2,
-      </if>
-
-      <if test="regAgree != null" >
-        reg_agree,
-      </if>
-      <if test="tradeAgree != null" >
-        trade_agree,
-      </if>
-      <if test="siteColor != null" >
-        site_color
-      </if>
-
-    </trim>
-    <trim prefix="values (" suffix=")" suffixOverrides="," >
-      <if test="id != null" >
-        #{id,jdbcType=INTEGER},
-      </if>
-      <if test="siteName != null" >
-        #{siteName,jdbcType=VARCHAR},
-      </if>
-      <if test="siteHost != null" >
-        #{siteHost,jdbcType=VARCHAR},
-      </if>
-      <if test="siteKeywords != null" >
-        #{siteKeywords,jdbcType=VARCHAR},
-      </if>
-      <if test="siteDescription != null" >
-        #{siteDescription,jdbcType=VARCHAR},
-      </if>
-      <if test="siteLogo != null" >
-        #{siteLogo,jdbcType=VARCHAR},
-      </if>
-      <if test="siteLogoSm != null" >
-        #{siteLogoSm,jdbcType=VARCHAR},
-      </if>
-      <if test="siteQq != null" >
-        #{siteQq,jdbcType=VARCHAR},
-      </if>
-      <if test="sitePhone != null" >
-        #{sitePhone,jdbcType=VARCHAR},
-      </if>
-      <if test="siteAndroidImg != null" >
-        #{siteAndroidImg,jdbcType=VARCHAR},
-      </if>
-      <if test="siteAndroidUrl != null" >
-        #{siteAndroidUrl,jdbcType=VARCHAR},
-      </if>
-      <if test="siteIosImg != null" >
-        #{siteIosImg,jdbcType=VARCHAR},
-      </if>
-      <if test="siteIosUrl != null" >
-        #{siteIosUrl,jdbcType=VARCHAR},
-      </if>
-      <if test="siteEmailFrom != null" >
-        #{siteEmailFrom,jdbcType=VARCHAR},
-      </if>
-      <if test="siteEmailTo != null" >
-        #{siteEmailTo,jdbcType=VARCHAR},
-      </if>
-      <if test="siteLanguage != null" >
-        #{siteLanguage,jdbcType=VARCHAR},
-      </if>
-      <if test="siteVersionInfo != null" >
-        #{siteVersionInfo,jdbcType=VARCHAR},
-      </if>
-
-      <if test="siteIntro != null" >
-        #{siteIntro,jdbcType=VARCHAR},
-      </if>
-      <if test="riskNotice != null" >
-        #{riskNotice,jdbcType=VARCHAR},
-      </if>
-      <if test="companyInfo != null" >
-        #{companyInfo,jdbcType=VARCHAR},
-      </if>
-      <if test="certImg1 != null" >
-        #{certImg1,jdbcType=VARCHAR},
-      </if>
-      <if test="certImg2 != null" >
-        #{certImg2,jdbcType=VARCHAR},
-      </if>
-
-      <if test="regAgree != null" >
-        #{regAgree,jdbcType=VARCHAR},
-      </if>
-      <if test="tradeAgree != null" >
-        #{tradeAgree,jdbcType=VARCHAR},
-      </if>
-      <if test="siteColor != null" >
-        #{siteColor,jdbcType=VARCHAR}
-      </if>
-    </trim>
-  </insert>
-
   <update id="updateByPrimaryKeySelective" parameterType="com.xc.pojo.SiteInfo" >
     update site_info
     <set >
@@ -285,7 +137,6 @@
       <if test="siteVersionInfo != null" >
         site_version_info = #{siteVersionInfo,jdbcType=VARCHAR},
       </if>
-
       <if test="siteIntro != null" >
         site_intro = #{siteIntro,jdbcType=VARCHAR},
       </if>
@@ -301,7 +152,6 @@
       <if test="certImg2 != null" >
         cert_img2 = #{certImg2,jdbcType=VARCHAR},
       </if>
-
       <if test="regAgree != null" >
         reg_agree = #{regAgree,jdbcType=VARCHAR},
       </if>
@@ -318,41 +168,25 @@
         open_notice = #{openNotice,jdbcType=VARCHAR},
       </if>
       <if test="traderNotice != null" >
-        trader_notice = #{traderNotice,jdbcType=VARCHAR}
+        trader_notice = #{traderNotice,jdbcType=VARCHAR},
+      </if>
+      <if test="siteEmailPassword != null" >
+        site_email_password = #{siteEmailPassword,jdbcType=VARCHAR},
+      </if>
+      <if test="siteEmailHost != null" >
+        site_email_host = #{siteEmailHost,jdbcType=VARCHAR},
+      </if>
+      <if test="siteEmailProtocol != null" >
+        site_email_protocol = #{siteEmailProtocol,jdbcType=VARCHAR},
+      </if>
+      <if test="siteEmailSubject != null" >
+        site_email_subject = #{siteEmailSubject,jdbcType=VARCHAR},
       </if>
     </set>
     where id = #{id,jdbcType=INTEGER}
   </update>
-  <update id="updateByPrimaryKey" parameterType="com.xc.pojo.SiteInfo" >
-    update site_info
-    set site_name = #{siteName,jdbcType=VARCHAR},
-      site_host = #{siteHost,jdbcType=VARCHAR},
-      site_keywords = #{siteKeywords,jdbcType=VARCHAR},
-      site_description = #{siteDescription,jdbcType=VARCHAR},
-      site_logo = #{siteLogo,jdbcType=VARCHAR},
-      site_logo_sm = #{siteLogoSm,jdbcType=VARCHAR},
-      site_qq = #{siteQq,jdbcType=VARCHAR},
-      site_phone = #{sitePhone,jdbcType=VARCHAR},
-      site_android_img = #{siteAndroidImg,jdbcType=VARCHAR},
-      site_android_url = #{siteAndroidUrl,jdbcType=VARCHAR},
-      site_ios_img = #{siteIosImg,jdbcType=VARCHAR},
-      site_ios_url = #{siteIosUrl,jdbcType=VARCHAR},
-      site_email_from = #{siteEmailFrom,jdbcType=VARCHAR},
-      site_email_to = #{siteEmailTo,jdbcType=VARCHAR},
-      site_language = #{siteLanguage,jdbcType=VARCHAR},
-      site_version_info = #{siteVersionInfo,jdbcType=VARCHAR},
 
-      site_intro = #{siteIntro,jdbcType=VARCHAR},
-      risk_notice = #{riskNotice,jdbcType=VARCHAR},
-      company_info = #{companyInfo,jdbcType=VARCHAR},
-      cert_img1 = #{certImg1,jdbcType=VARCHAR},
-      cert_img2 = #{certImg2,jdbcType=VARCHAR},
 
-      reg_agree = #{regAgree,jdbcType=VARCHAR},
-      trade_agree = #{tradeAgree,jdbcType=VARCHAR},
-      site_color = #{siteColor,jdbcType=VARCHAR}
-    where id = #{id,jdbcType=INTEGER}
-  </update>
 
   <select id="findAll" resultMap="BaseResultMap">
     select
@@ -360,4 +194,4 @@
     from site_info
   </select>
 
-</mapper>
+</mapper>

+ 3 - 3
src/main/resources/stock2guo.properties

@@ -36,12 +36,12 @@ agent.key.prefix=SR
 admin.super.name=18916320007
 
 #管理 邮箱 - 发件主题
-admin.auth.email.subject=众想
+#admin.auth.email.subject=众想
 #管理 邮箱 - 发件地址
 #admin.auth.email=navihold800@163.com
-admin.auth.email=18317918160@163.com
+#admin.auth.email=18317918160@163.com
 #管理 邮箱 - 发件密码  118318asd  XY118318asd
-admin.auth.email.pwd=173008754
+#admin.auth.email.pwd=173008754
 #cookie config endXY118318asd
 
 # close order task config start