From fc96e4d7fc20dbec5d2d96c6e8c557c1cc3212d3 Mon Sep 17 00:00:00 2001 From: wjli <591616088@qq.com> Date: 星期一, 08 四月 2024 18:53:10 +0800 Subject: [PATCH] 修改密码错误登录bug --- xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/mapper/CustomerMapper.java | 36 ++++++++++++++++++++++++------------ 1 files changed, 24 insertions(+), 12 deletions(-) diff --git a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/mapper/CustomerMapper.java b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/mapper/CustomerMapper.java index 24a4d60..04581dc 100644 --- a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/mapper/CustomerMapper.java +++ b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/mapper/CustomerMapper.java @@ -4,7 +4,12 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; import cn.exrick.xboot.your.entity.Customer; import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Result; +import org.apache.ibatis.annotations.Results; import org.apache.ibatis.annotations.Select; +import org.apache.ibatis.type.JdbcType; + +import java.util.List; /** * 鍟嗘埛琛ㄦ暟鎹鐞嗗眰 @@ -16,18 +21,25 @@ int count(); @Select("select \n" + - "sum(case when create_time < '${year}-01' then 1 else 0 end) as january,\n" + - "sum(case when create_time < '${year}-02' then 1 else 0 end) as february,\n" + - "sum(case when create_time < '${year}-03' then 1 else 0 end) as march,\n" + - "sum(case when create_time < '${year}-04' then 1 else 0 end) as april,\n" + - "sum(case when create_time < '${year}-05' then 1 else 0 end) as may,\n" + - "sum(case when create_time < '${year}-06' then 1 else 0 end) as june,\n" + - "sum(case when create_time < '${year}-07' then 1 else 0 end) as july,\n" + - "sum(case when create_time < '${year}-08' then 1 else 0 end) as august,\n" + - "sum(case when create_time < '${year}-09' then 1 else 0 end) as september,\n" + - "sum(case when create_time < '${year}-10' then 1 else 0 end) as october,\n" + - "sum(case when create_time < '${year}-11' then 1 else 0 end) as november,\n" + - "sum(case when create_time < '${year}-12' then 1 else 0 end) as december\n" + + "sum(case when create_time < '${year}-02' then 1 else 0 end) as january,\n" + + "sum(case when create_time < '${year}-03' then 1 else 0 end) as february,\n" + + "sum(case when create_time < '${year}-04' then 1 else 0 end) as march,\n" + + "sum(case when create_time < '${year}-05' then 1 else 0 end) as april,\n" + + "sum(case when create_time < '${year}-06' then 1 else 0 end) as may,\n" + + "sum(case when create_time < '${year}-07' then 1 else 0 end) as june,\n" + + "sum(case when create_time < '${year}-08' then 1 else 0 end) as july,\n" + + "sum(case when create_time < '${year}-09' then 1 else 0 end) as august,\n" + + "sum(case when create_time < '${year}-10' then 1 else 0 end) as september,\n" + + "sum(case when create_time < '${year}-11' then 1 else 0 end) as october,\n" + + "sum(case when create_time < '${year}-12' then 1 else 0 end) as november,\n" + + "sum(case when create_time < '${year}-13' then 1 else 0 end) as december\n" + "from t_customer") Month getCustomerCount(@Param("year")Integer year); + + @Select("select sum(login_num) from t_customer") + int sumLogin(); + + @Select("SELECT a.*,b.name as temp FROM t_customer a,t_customer b where a.like_cusotmer_id=b.id") + @Results({@Result(column="temp", property="code", jdbcType = JdbcType.VARCHAR)}) + List<Customer> getYiHuDuoZheng(); } \ No newline at end of file -- Gitblit v1.9.1