SELECT count(*) from tb_pluss_merchant_base_info
SELECT COUNT(*)
FROM tb_pluss_fans pf
LEFT JOIN tb_pluss_merchant_base_info mbi
ON mbi.merchantCode = pf.merchantCode
pf.nickName is not null and pf.nickName!=''
and mbi.bindingCode =( SELECT bindingCode FROM tb_pluss_merchant_base_info WHERE merchantCode = #{merchantCode})
SELECT count(*) from tb_pluss_fans
nickName is not null and nickName!=''
and merchantCode IN (SELECT merchantCode
FROM tb_pluss_merchant_base_info
WHERE bindingCode = (SELECT bindingCode
FROM tb_pluss_merchant_base_info
where merchantCode = #{merchantCode}))
=DATE_FORMAT(#{stTime}, '%Y-%m-%d %H:%i:%S')
]]>
SELECT sum(consumeFee) from tb_pluss_merchant_order
SELECT count(1) from tb_pluss_merchant_order
=DATE_FORMAT(#{stTime}, '%Y-%m-%d %H:%i:%S')
]]>
SELECT count(1) from tb_pluss_merchant_menber mm LEFT JOIN tb_pluss_merchant_base_info mbi on mbi.merchantCode = mm.merchantCode
and mbi.merchantCode in (SELECT merchantCode
FROM tb_pluss_merchant_base_info
WHERE bindingCode =(SELECT bindingCode
FROM tb_pluss_merchant_base_info
where merchantCode = #{merchantCode}))
and mm.nickName !='null'
SELECT SUM(mm.usableRechargeFee+mm.usableGiveFee)
FROM tb_pluss_merchant_menber mm
LEFT JOIN tb_pluss_merchant_base_info mbi ON mbi.merchantCode = mm.merchantCode
WHERE mm.merchantCode in (SELECT merchantCode
FROM tb_pluss_merchant_base_info
WHERE bindingCode = (SELECT bindingCode
FROM tb_pluss_merchant_base_info
where merchantCode = #{merchantCode}))
SELECT * from tb_pluss_fans
lastMerchantCode IS NOT NULL
and lastMerchantCode in (SELECT merchantCode
FROM tb_pluss_merchant_base_info
WHERE bindingCode =(SELECT bindingCode
FROM tb_pluss_merchant_base_info
where merchantCode = #{merchantCode}))
SELECT sum(consumeFee) from tb_pluss_merchant_order
and merchantCode IN (SELECT merchantCode
FROM tb_pluss_merchant_base_info
WHERE bindingCode = (SELECT bindingCode
FROM tb_pluss_merchant_base_info
where merchantCode = #{merchantCode}))
and consumeFee = #{consumeFee}
and createDt = #{createDt}
and status = #{status}
and createDt #{endTime}
and transDt = #{transDt}
and staffName = #{staffName}
and transDt =]]> #{stTime}
and transDt #{endTime}
SELECT sum(consumeFee) from tb_pluss_merchant_order
and merchantCode IN (SELECT merchantCode
FROM tb_pluss_merchant_base_info
WHERE bindingCode = (SELECT bindingCode
FROM tb_pluss_merchant_base_info
where merchantCode = #{merchantCode}))
and consumeFee = #{consumeFee}
and createDt = #{createDt}
and status = #{status}
and createDt <= #{endTime}
and transDt = #{transDt}
and staffName = #{staffName}
and transDt =]]> #{stTime}
and transDt #{endTime}
and (payTypeCode='leshuaPay0' or payTypeCode= 'aliPay' or payTypeCode='sxfPay0')
SELECT sum(consumeFee) from tb_pluss_merchant_order
and merchantCode IN (SELECT merchantCode
FROM tb_pluss_merchant_base_info
WHERE bindingCode = (SELECT bindingCode
FROM tb_pluss_merchant_base_info
where merchantCode = #{merchantCode}))
and consumeFee = #{consumeFee}
and createDt = #{createDt}
and status = #{status}
and createDt <= #{endTime}
and transDt = #{transDt}
and staffName = #{staffName}
and transDt =]]> #{stTime}
and transDt #{endTime}
and (payTypeCode='leshuaPay1' or payTypeCode= 'wechatPay' or payTypeCode='sxfPay1')
SELECT sum(consumeFee) from tb_pluss_merchant_order
and merchantCode IN (SELECT merchantCode
FROM tb_pluss_merchant_base_info
WHERE bindingCode = (SELECT bindingCode
FROM tb_pluss_merchant_base_info
where merchantCode = #{merchantCode}))
and consumeFee = #{consumeFee}
and createDt = #{createDt}
and status = #{status}
and createDt <= #{endTime}
and transDt = #{transDt}
and staffName = #{staffName}
and transDt =]]> #{stTime}
and transDt #{endTime}
and payTypeCode='sxfPay2'
SELECT count(*) from tb_pluss_merchant_order
and id = #{id}
and orderNumber like CONCAT("%",#{orderNumber},"%")
and merchantCode IN (SELECT merchantCode
FROM tb_pluss_merchant_base_info
WHERE bindingCode = (SELECT bindingCode
FROM tb_pluss_merchant_base_info
where merchantCode = #{merchantCode}))
and merchantName = #{merchantName}
and payTypeCode = #{payTypeCode}
and payTypeName = #{payTypeName}
and consumeFee = #{consumeFee}
and transNo like CONCAT("%",#{transNo},"%")
and memberCode like CONCAT("%",#{memberCode},"%")
and storeId = #{storeId}
and storeName like CONCAT("%",#{storeName},"%")
and createDt = #{createDt}
and staffCode = #{staffCode}
and status = #{status}
and shareMoney = #{shareMoney}
and aliPayTransNo = #{aliPayTransNo}
and enterFee = #{enterFee}
and weChatTransNo = #{weChatTransNo}
and aisleSwitch = #{aisleSwitch}
and leshuaMerchantRefundId = #{leshuaMerchantRefundId}
and leshuaTransNo = #{leshuaTransNo}
and orderType = #{orderType}
and promoteruserId = #{promoteruserId}
and userImg = #{userImg}
and nickName = #{nickName}
and remark = #{remark}
and transDt = #{transDt}
and staffName = #{staffName}
and transDt =]]> #{stTime}
and transDt #{endTime}
and (payTypeCode='leshuaPay0' or payTypeCode= 'aliPay' or payTypeCode='sxfPay0')
SELECT count(*) from tb_pluss_merchant_order
and id = #{id}
and orderNumber like CONCAT("%",#{orderNumber},"%")
and merchantCode IN (SELECT merchantCode
FROM tb_pluss_merchant_base_info
WHERE bindingCode = (SELECT bindingCode
FROM tb_pluss_merchant_base_info
where merchantCode = #{merchantCode}))
and merchantName = #{merchantName}
and payTypeCode = #{payTypeCode}
and payTypeName = #{payTypeName}
and consumeFee = #{consumeFee}
and transNo like CONCAT("%",#{transNo},"%")
and memberCode like CONCAT("%",#{memberCode},"%")
and storeId = #{storeId}
and storeName like CONCAT("%",#{storeName},"%")
and createDt = #{createDt}
and staffCode = #{staffCode}
and status = #{status}
and shareMoney = #{shareMoney}
and aliPayTransNo = #{aliPayTransNo}
and enterFee = #{enterFee}
and weChatTransNo = #{weChatTransNo}
and aisleSwitch = #{aisleSwitch}
and leshuaMerchantRefundId = #{leshuaMerchantRefundId}
and leshuaTransNo = #{leshuaTransNo}
and orderType = #{orderType}
and promoteruserId = #{promoteruserId}
and userImg = #{userImg}
and nickName = #{nickName}
and remark = #{remark}
and transDt = #{transDt}
and staffName = #{staffName}
and transDt =]]> #{stTime}
and transDt #{endTime}
and (payTypeCode='leshuaPay1' or payTypeCode= 'wechatPay' or payTypeCode='sxfPay1')
SELECT count(1) from tb_pluss_merchant_order
and id = #{id}
and orderNumber like CONCAT("%",#{orderNumber},"%")
and merchantCode IN (SELECT merchantCode
FROM tb_pluss_merchant_base_info
WHERE bindingCode = (SELECT bindingCode
FROM tb_pluss_merchant_base_info
where merchantCode = #{merchantCode}))
and merchantName = #{merchantName}
and payTypeCode = #{payTypeCode}
and payTypeName = #{payTypeName}
and consumeFee = #{consumeFee}
and transNo like CONCAT("%",#{transNo},"%")
and memberCode like CONCAT("%",#{memberCode},"%")
and storeId = #{storeId}
and storeName like CONCAT("%",#{storeName},"%")
and createDt = #{createDt}
and staffCode = #{staffCode}
and status = #{status}
and shareMoney = #{shareMoney}
and aliPayTransNo = #{aliPayTransNo}
and enterFee = #{enterFee}
and weChatTransNo = #{weChatTransNo}
and aisleSwitch = #{aisleSwitch}
and leshuaMerchantRefundId = #{leshuaMerchantRefundId}
and leshuaTransNo = #{leshuaTransNo}
and orderType = #{orderType}
and promoteruserId = #{promoteruserId}
and userImg = #{userImg}
and nickName = #{nickName}
and remark = #{remark}
and transDt = #{transDt}
and staffName = #{staffName}
and transDt =]]> #{stTime}
and transDt #{endTime}
and payTypeCode='sxfPay2'
SELECT * from tb_pluss_merchant_order
and id = #{id}
and orderNumber like CONCAT("%",#{orderNumber},"%")
and merchantCode IN (SELECT merchantCode
FROM tb_pluss_merchant_base_info
WHERE bindingCode = (SELECT bindingCode
FROM tb_pluss_merchant_base_info
where merchantCode = #{merchantCode}))
and merchantName like CONCAT("%",#{merchantName},"%")
and payTypeCode = #{payTypeCode}
and payTypeName = #{payTypeName}
and consumeFee = #{consumeFee}
and transNo like CONCAT("%",#{transNo},"%")
and memberCode like CONCAT("%",#{memberCode},"%")
and storeId = #{storeId}
and storeName like CONCAT("%",#{storeName},"%")
and createDt = #{createDt}
and staffCode = #{staffCode}
and status = #{status}
and shareMoney = #{shareMoney}
and aliPayTransNo = #{aliPayTransNo}
and enterFee = #{enterFee}
and weChatTransNo = #{weChatTransNo}
and aisleSwitch = #{aisleSwitch}
and leshuaMerchantRefundId = #{leshuaMerchantRefundId}
and leshuaTransNo = #{leshuaTransNo}
and orderType = #{orderType}
and promoteruserId = #{promoteruserId}
and userImg = #{userImg}
and nickName = #{nickName}
and createDt =]]> #{startTime}
and remark = #{remark}
and createDt #{endTime}
and transDt = #{transDt}
and staffName = #{staffName}
and transDt =]]> #{stTime}
and transDt #{endTime}
select sum(shareMoney) from tb_pluss_fans
and merchantCode IN (SELECT merchantCode
FROM tb_pluss_merchant_base_info
WHERE bindingCode = (SELECT bindingCode
FROM tb_pluss_merchant_base_info
where merchantCode = #{merchantCode}))
and createDt =]]> #{stTime}
and createDt #{endTime}
SELECT count(*) from tb_pluss_merchant_menber
and id = #{id}
and nickName !='null'
and merchantCode IN (SELECT merchantCode
FROM tb_pluss_merchant_base_info
WHERE bindingCode = (SELECT bindingCode
FROM tb_pluss_merchant_base_info
where merchantCode = #{merchantCode}))
and merchantName = #{merchantName}
and storeId = #{storeId}
and storeName = #{storeName}
and status = #{status}
and createDt = #{createDt}
and createDt =]]> #{stTime}
and createDt #{endTime}
and logo = #{logo}
and memberCode = #{memberCode}
and (
nickName like CONCAT("%",#{nickName},"%")
or phone like CONCAT("%",#{phone},"%")
)
and openid = #{openid}
and alipayUserId = #{alipayUserId}
and comsumeMoney = #{comsumeMoney}
and profitMoney = #{profitMoney}
and orderNumber = #{orderNumber}
and totalRechargeFee = #{totalRechargeFee}
and usableRechargeFee = #{usableRechargeFee}
and totalGiveFee = #{totalGiveFee}
and usableGiveFee = #{usableGiveFee}
and cardNo = #{cardNo}
and birthdayDt = #{birthdayDt}
and memberName Like CONCAT('%',#{memberName},'%')
and provinces = #{provinces}
and sex = #{sex}
and bindingUrl = #{bindingUrl}
and appOpenId = #{appOpenId}
SELECT sum(price) from tb_pluss_merchant_profit profit
and profit.id = #{id}
and profit.agentStaffId = #{agentStaffId}
and profit.userId = #{userId}
and profit.type = #{type}
and profit.price = #{price}
and profit.orderNumber = #{orderNumber}
and profit.merchantName = #{merchantName}
and profit.agentStaffId = #{agentStaffId}
and profit.consumeFee = #{consumeFee}
and profit.createDt = #{createDt}
and profit.createDt =]]> #{stTime}
and profit.createDt #{enTime}
and profit.orderDt = #{orderDt}
and profit.status = #{status}
and profit.createDt ]]> #{startTime}
and profit.createDt #{endTime}
and profit.payTypeCode = #{payTypeCode}
and profit.payTypeName = #{payTypeName}
and profit.merchantLogo = #{merchantLogo}
and profit.level = #{level}
and profit.merchantParentId = #{merchantParentId}
and profit.merchantParentName = #{merchantParentName}
and profit.merchantParentLogo = #{merchantParentLogo}
and profit.createDt ]]> #{startTime}
and profit.createDt #{endTime}
and profit.merchantCode in
#{item}
and profit.phone = #{phone}
and profit.userName = #{userName}
and profit.merchantParentLevel = #{merchantParentLevel}
and profit.merchantParentPhone = #{merchantParentPhone}
and profit.type !=4
SELECT count(*) from tb_pluss_user_app
userType = 'promoter'
and parentId = #{parentId}
SELECT COUNT(*)
FROM tb_pluss_merchant_base_info
WHERE userId IN (SELECT userId
FROM tb_pluss_user_app
userType = 'promoter'
and parentId = #{parentId}
)
and merchantCode in (SELECT merchantCode
FROM tb_pluss_merchant_base_info
WHERE bindingCode =(SELECT bindingCode
FROM tb_pluss_merchant_base_info
where merchantCode = #{merchantCode}))
and status = #{status}
and status = '1'