fei.wang
2024-05-13 b9b58b9ef261cb290d93465f88a2cbd814b576f0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//
 
package com.flow.mapper;
 
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.flow.pojo.Card;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
 
public interface CardMapper extends BaseMapper<Card> {
    @Select({"select * from card where none = 0  ORDER BY enterdate DESC"})
    List<Card> findAllUsers();
 
    @Select({"select * from card where none = 0 and company = #{Zong} ORDER BY enterdate DESC"})
    List<Card> findAllUsersZi(@Param("Zong")String var1);
 
    @Select({"SELECT COUNT(*) FROM card where none = 0"})
    int findCardNum1();
 
    @Select({"SELECT count(*) FROM card WHERE DATE_FORMAT (enddate, '%Y%m') = DATE_FORMAT(CURDATE(), '%Y%m') AND none = 0"})
    int findCardNum2();
 
    @Select({"SELECT count(*) FROM card WHERE YEAR(enddate)=YEAR(NOW()) and DATE_FORMAT (enddate, '%Y%m') = DATE_FORMAT(CURDATE(), '%Y%m') AND none = 0"})
    int findCardNum3();
 
    @Select({"SELECT count(*) FROM card WHERE syflow = '0' and none = 0"})
    int findCardNum4();
 
    @Select({"SELECT count(*) FROM card WHERE syflow < '2000' and none = 0"})
    int findCardNum5();
 
    @Select({"SELECT COUNT(*) FROM card where none = 0 and company = #{zi} "})
    int findCardNum1z(String var1);
 
    @Select({"SELECT count(*) FROM card WHERE DATE_FORMAT (enddate, '%Y%m') = DATE_FORMAT(CURDATE(), '%Y%m') AND none = 0 and company = #{zi}"})
    int findCardNum2z(String var1);
 
    @Select({"SELECT count(*) FROM card WHERE YEAR(enddate)=YEAR(NOW()) and DATE_FORMAT (enddate, '%Y%m') = DATE_FORMAT(CURDATE(), '%Y%m') AND none = 0 and company = #{zi}"})
    int findCardNum3z(String var1);
 
    @Select({"SELECT count(*) FROM card WHERE syflow = '0G' and none = 0 and company = #{zi}"})
    int findCardNum4z(String var1);
 
    @Select({"SELECT count(*) FROM card WHERE syflow < '2G' and none = 0 and company = #{zi}"})
    int findCardNum5z(String var1);
 
    @Select({"SELECT * FROM card WHERE none = 0 and cardnumber LIKE CONCAT('%', #{number}, '%') and company = #{company} ORDER BY enterdate DESC"})
    List<Card> FindSearch(@Param("number") String var1, @Param("company") String var2);
 
    @Select({"SELECT * FROM card WHERE none = 0 and cardnumber LIKE CONCAT('%', #{number}, '%') ORDER BY enterdate DESC"})
    List<Card> FindSearch1(@Param("number") String var1);
 
    @Update({
            "<script>",
            "UPDATE card",
            "<set>",
            "<foreach item='item' collection='list' separator=','>",
            "carddate = #{item.carddate},",
            "enddate = #{item.enddate},",
            "unitprice = #{item.unitprice},",
            "enterdate = #{item.enterdate}",
//            "...", // 更多的字段更新语句
            "</foreach>",
            "</set>",
            "WHERE num IN",
            "<foreach item='item' collection='list' open='(' separator=',' close=')'>",
            "#{item.num}",
            "</foreach>",
            "</script>"
    })
    int updateBatchById(List<Card> list);
 
    @Update({
            "<script>",
            "UPDATE card",
            "<set>",
            "<foreach item='item' collection='list' separator=','>",
            "rechargedate = #{item.rechargedate},",
            "rechargemoney = #{item.rechargemoney},",
            "enddate = #{item.enddate},",
            "remainingdays = #{item.remainingdays},",
            "enterdate = #{item.rechargedate}",
//            "...", // 更多的字段更新语句
            "</foreach>",
            "</set>",
            "WHERE num IN",
            "<foreach item='item' collection='list' open='(' separator=',' close=')'>",
            "#{item.num}",
            "</foreach>",
            "</script>"
    })
    int updateBatchByIdcz(List<Card> list);
}