首页 统计 数据统计(包括弹窗)/销量统计

快捷修改接口 报错问题
This commit is contained in:
2024-09-26 15:14:40 +08:00
parent 57269a1e92
commit b2dad3b3fd
16 changed files with 335 additions and 581 deletions

View File

@@ -2,6 +2,7 @@ package cn.ysk.cashier.mybatis.entity;
import java.io.Serializable;
import java.math.BigDecimal;
import java.sql.Timestamp;
import javax.persistence.Id;
import javax.persistence.Table;
import lombok.Data;
@@ -159,6 +160,8 @@ public class TbShopUser implements Serializable {
*/
private String dynamic_code;
private Timestamp joinTime;
private static final long serialVersionUID = 1L;
@Override

View File

@@ -23,18 +23,18 @@ public interface TbShopUserFlowMapper extends BaseMapper<TbShopUserFlow> {
* @return 用户流水总金额
*/
@Select("<script>" +
" SELECT \n" +
" COALESCE(SUM(flow.total_amount), 0) AS chageTotal\n" +
"FROM \n" +
" tb_shop_user AS a\n" +
" LEFT JOIN (\n" +
" SELECT shop_user_id, SUM(amount) AS total_amount \n" +
" FROM tb_shop_user_flow \n" +
" WHERE biz_code IN ('cashMemberIn','scanMemberIn', 'scanMemberAwardIn') \n" +
" AND create_time BETWEEN #{startTime} AND #{endTime} \n" +
" GROUP BY shop_user_id\n" +
" ) AS flow ON flow.shop_user_id = a.id\n" +
"WHERE \n" +
" SELECT " +
" COALESCE(SUM(flow.total_amount), 0) AS chageTotal " +
"FROM " +
" tb_shop_user AS a " +
" LEFT JOIN ( " +
" SELECT shop_user_id, SUM(amount) AS total_amount " +
" FROM tb_shop_user_flow " +
" WHERE biz_code IN ('cashMemberIn','scanMemberIn', 'scanMemberAwardIn') " +
" AND create_time BETWEEN #{startTime} AND #{endTime} " +
" GROUP BY shop_user_id " +
" ) AS flow ON flow.shop_user_id = a.id " +
"WHERE " +
" a.shop_id = #{shopId}" +
"</script>")
BigDecimal sumUserFlowAmountByConditions(@Param("shopId") Long shopId,