Browse Source

11.11 修改执行人

sunjiabei/feature-20251021102635-银行接口
huangqizhen 2 weeks ago
parent
commit
e01421ab2e
  1. 9
      src/main/java/com/example/demo/Mysql/MysqlServiceImpl.java
  2. 2
      src/main/java/com/example/demo/security/SecurityConfig.java
  3. 6
      src/main/resources/cashMapper/CashCollectionMapper.xml
  4. 6
      src/main/resources/cashMapper/CashRefundMapper.xml
  5. 11
      src/main/resources/mapper/AuditMapper.xml
  6. 7
      src/main/resources/mapper/MarketMapper.xml

9
src/main/java/com/example/demo/Mysql/MysqlServiceImpl.java

@ -26,6 +26,7 @@ import java.time.LocalDateTime;
import java.time.Month;
import java.time.format.DateTimeFormatter;
import java.util.*;
import java.util.Date;
@Service
@ -64,7 +65,7 @@ public class MysqlServiceImpl implements MysqlService {
@Override
@Transactional(transactionManager = "mysqlTransactionManager") // 👈 保证插入和用户更新在一个事务
@Transactional(transactionManager = "mysqlTransactionManager",rollbackFor = Exception.class) // 👈 保证插入和用户更新在一个事务
public void getSqlserverData() throws Exception {
logger.info("开始从 SQL Server 同步数据到 MySQL");
@ -357,7 +358,7 @@ public class MysqlServiceImpl implements MysqlService {
if (validZeroTypes.contains(data.gtype)) {
stmt.setInt(13, 0);
stmt.setNull(20, 0);
stmt.setInt(20, 0);
stmt.setString(1, "ERPCZ_" + data.orderNumber);
} else if (validOneTypes.contains(data.gtype)) {
stmt.setInt(13, 1);
@ -415,8 +416,8 @@ public class MysqlServiceImpl implements MysqlService {
} else {
stmt.setInt(17, 1);
}
stmt.setTimestamp(18, data.cz_time);
Timestamp now = new Timestamp(System.currentTimeMillis());
stmt.setTimestamp(18, now);
stmt.setTimestamp(19, data.cz_time);
stmt.setString(21, data.uid);
}

2
src/main/java/com/example/demo/security/SecurityConfig.java

@ -60,7 +60,7 @@ public class SecurityConfig {
request
.requestMatchers( HttpMethod.POST,
// 用户不登录就可以访问的路径
"/admin/login","/upload/**","/detailY/ERP","/home/java/haiwaiyanfa/gold1/**","/home/java/haiwaiyanfa/**","/statistics/**","/Mysql").permitAll()
"/admin/login","/upload/**","/detailY/ERP","/home/java/haiwaiyanfa/gold1/**","/home/java/haiwaiyanfa/**","/statistics/**","/Mysql/**").permitAll()
.requestMatchers(
"/error","alipay/**","/upload/**","/home/java/haiwaiyanfa/gold1/**","/home/java/haiwaiyanfa/**"
).permitAll()

6
src/main/resources/cashMapper/CashCollectionMapper.xml

@ -265,9 +265,13 @@
left join admin a1 on cr.submitter_id = a1.id
left join admin a2 on cr.audit_id = a2.id
left join recharge_activity ra on ra.id = cr.activity
where cr.id IN
<where>
<if test="relatedIds != null and relatedIds.size() > 0">
cr.id IN
<foreach collection="relatedIds" item="id" open="(" separator="," close=")">
#{id}
</foreach>
</if>
</where>
</select>
</mapper>

6
src/main/resources/cashMapper/CashRefundMapper.xml

@ -380,10 +380,14 @@
<select id="getAuditBatch" resultType="com.example.demo.domain.vo.cash.LhlAudit">
select * from lhl_audit
where id in
<where>
<if test="auditIds != null and auditIds.size() > 0">
id in
<foreach collection="auditIds" item="id" open="(" separator="," close=")">
#{id}
</foreach>
</if>
</where>
</select>
</mapper>

11
src/main/resources/mapper/AuditMapper.xml

@ -169,12 +169,19 @@
select admin_name from admin where id = #{auditId}
</select>
<select id="getNamesByIds" resultType="com.example.demo.domain.entity.Admin">
<select id="getNamesByIds" resultType="map">
select id, admin_name from admin
where id in
<where>
<if test="submitterIds != null and submitterIds.size() > 0">
id in
<foreach collection="submitterIds" item="id" open="(" separator="," close=")">
#{id}
</foreach>
</if>
<if test="submitterIds == null or submitterIds.size() == 0">
1=0
</if>
</where>
</select>
<update id="updateFirstRecharge">

7
src/main/resources/mapper/MarketMapper.xml

@ -39,9 +39,14 @@
select name from market where id=#{market}
</select>
<select id="getMarketByIds" resultType="com.example.demo.domain.entity.Market">
select id,name from market where id in
select id,name from market
<where>
<if test="marketIds != null and marketIds.size() > 0">
id in
<foreach collection="marketIds" item="marketId" open="(" separator="," close=")">
#{marketId}
</foreach>
</if>
</where>
</select>
</mapper>
Loading…
Cancel
Save