Althars123 3 жил өмнө
parent
commit
d660693706

+ 1 - 1
twzd-admin/src/main/resources/application-prodtest.yml

@@ -6,7 +6,7 @@ spring:
         druid:
             # 主库数据源
             master:
-                url: jdbc:mysql://sh-cdb-2y9n2832.sql.tencentcdb.com:60123/jkt?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true
+                url: jdbc:mysql://sh-cdb-2y9n2832.sql.tencentcdb.com:60123/twzd?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true
                 username: root
                 password: Miaxis@2020
             # 从库数据源

+ 2 - 0
twzd-service/src/main/java/com/miaxis/wx/service/impl/WxForeverCodeServiceImpl.java

@@ -7,6 +7,7 @@ import com.miaxis.wx.mapper.WxForeverCodeMapper;
 import com.miaxis.wx.service.IWxForeverCodeService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
 import org.springframework.util.CollectionUtils;
 
 import java.util.List;
@@ -30,6 +31,7 @@ public class WxForeverCodeServiceImpl extends ServiceImpl<WxForeverCodeMapper, W
      * @return 微信永久二维码口令
      */
     @Override
+    @Transactional
     public List<WxForeverCode> selectWxForeverCodeList(WxForeverCode wxForeverCode){
         List<WxForeverCode> wxForeverCodes = wxForeverCodeMapper.selectWxForeverCodeList(wxForeverCode);
         // 若目前无数据,则创建一个

+ 1 - 1
twzd-service/src/main/resources/mapper/wx/WxForeverCodeMapper.xml

@@ -26,7 +26,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="nickName != null "> and nick_name like concat('%', #{nickName}, '%')</if>
             <if test="status != null "> and status = #{status}</if>
         </where>
-        order by create_time desc
+        order by create_time desc for update
     </select>
 
 </mapper>