Compare commits

..

No commits in common. "21f3e553ba97e45f8c0fa4b84f7207b965827805" and "22b9cb5b98c9d8b3725e17515ac0264a27097e2e" have entirely different histories.

17 changed files with 41 additions and 41 deletions

View File

@ -19,7 +19,7 @@ import java.util.Date;
@Data @Data
@EqualsAndHashCode(callSuper = false) @EqualsAndHashCode(callSuper = false)
@Accessors(chain = true) @Accessors(chain = true)
@TableName("zp_system_store") @TableName("fw_system_store")
@ApiModel(value="SystemStoreNearVo对象", description="门店自提") @ApiModel(value="SystemStoreNearVo对象", description="门店自提")
public class SystemStoreNearVo implements Serializable { public class SystemStoreNearVo implements Serializable {

View File

@ -4,7 +4,7 @@
<select id="getListGroup" resultType="com.yzt.common.response.ShippingTemplatesFreeResponse" parameterType="integer"> <select id="getListGroup" resultType="com.yzt.common.response.ShippingTemplatesFreeResponse" parameterType="integer">
SELECT group_concat(`title`) AS title, `number`, price, uniqid SELECT group_concat(`title`) AS title, `number`, price, uniqid
FROM zp_shipping_templates_free FROM fw_shipping_templates_free
where temp_id = #{tempId, jdbcType=INTEGER} where temp_id = #{tempId, jdbcType=INTEGER}
GROUP BY `uniqid` ORDER BY id ASC GROUP BY `uniqid` ORDER BY id ASC
</select> </select>

View File

@ -4,7 +4,7 @@
<select id="getListGroup" resultType="com.yzt.common.response.ShippingTemplatesRegionResponse" parameterType="integer"> <select id="getListGroup" resultType="com.yzt.common.response.ShippingTemplatesRegionResponse" parameterType="integer">
SELECT group_concat(`title`) AS title, `first`, first_price, `renewal`, renewal_price, uniqid SELECT group_concat(`title`) AS title, `first`, first_price, `renewal`, renewal_price, uniqid
FROM zp_shipping_templates_region FROM fw_shipping_templates_region
where temp_id = #{tempId, jdbcType=INTEGER} where temp_id = #{tempId, jdbcType=INTEGER}
GROUP BY `uniqid` GROUP BY `uniqid`
ORDER BY id ASC ORDER BY id ASC

View File

@ -5,10 +5,10 @@
SELECT u.uid, u.nickname, u.now_money, u.brokerage_price AS brokerage,u.create_time,u.spread_uid, SELECT u.uid, u.nickname, u.now_money, u.brokerage_price AS brokerage,u.create_time,u.spread_uid,
IF(( Sum(b.price) ) IS NULL, 0.00, Sum(b.price)) AS total_brokerage, IF(( Sum(b.price) ) IS NULL, 0.00, Sum(b.price)) AS total_brokerage,
-- IF(( Sum(e.extract_price) ) IS NULL, 0.00, Sum(e.extract_price)) AS total_extract -- IF(( Sum(e.extract_price) ) IS NULL, 0.00, Sum(e.extract_price)) AS total_extract
(SELECT if(Sum( e.extract_price ) IS NULL, 0.00, Sum( e.extract_price ) ) from zp_user_extract e where e.uid = u.uid and e.`status` = 1 ) AS total_extract (SELECT if(Sum( e.extract_price ) IS NULL, 0.00, Sum( e.extract_price ) ) from fw_user_extract e where e.uid = u.uid and e.`status` = 1 ) AS total_extract
FROM zp_user AS u FROM fw_user AS u
LEFT JOIN zp_user_brokerage_record AS b ON u.uid = b.uid AND b.link_type = 'order' AND b.`type` = 1 AND b.`status` = 3 LEFT JOIN fw_user_brokerage_record AS b ON u.uid = b.uid AND b.link_type = 'order' AND b.`type` = 1 AND b.`status` = 3
-- LEFT JOIN zp_user_extract AS e ON u.`uid` = e.uid AND e.STATUS = 1 -- LEFT JOIN fw_user_extract AS e ON u.`uid` = e.uid AND e.STATUS = 1
where 1 = 1 where 1 = 1
<if test="keywords != '' and keywords != null "> <if test="keywords != '' and keywords != null ">
and ( u.uid like #{keywords} or u.nickname like #{keywords, jdbcType=VARCHAR}) and ( u.uid like #{keywords} or u.nickname like #{keywords, jdbcType=VARCHAR})

View File

@ -3,7 +3,7 @@
<mapper namespace="com.yzt.service.mapper.UserRechargeMapper"> <mapper namespace="com.yzt.service.mapper.UserRechargeMapper">
<!-- 根据类型获取该类型充值金额--> <!-- 根据类型获取该类型充值金额-->
<select id="getSumByType" resultType="java.math.BigDecimal" parameterType="string"> <select id="getSumByType" resultType="java.math.BigDecimal" parameterType="string">
select sum(price) as price from zp_user_recharge select sum(price) as price from fw_user_recharge
where paid = 1 where paid = 1
<if test="type != null and type != '' "> <if test="type != null and type != '' ">
and recharge_type = #{type, jdbcType=VARCHAR} and recharge_type = #{type, jdbcType=VARCHAR}
@ -11,7 +11,7 @@
</select> </select>
<!-- 获取退款总额--> <!-- 获取退款总额-->
<select id="getSumByRefund" resultType="java.math.BigDecimal"> <select id="getSumByRefund" resultType="java.math.BigDecimal">
select sum(refund_price) as price from zp_user_recharge select sum(refund_price) as price from fw_user_recharge
where refund_price > 0 and paid = 1 where refund_price > 0 and paid = 1
</select> </select>
</mapper> </mapper>

View File

@ -5,7 +5,7 @@
<select id="getListByPreOrderNo" resultType="com.yzt.common.model.coupon.StoreCouponUser" parameterType="Map"> <select id="getListByPreOrderNo" resultType="com.yzt.common.model.coupon.StoreCouponUser" parameterType="Map">
SELECT * SELECT *
FROM zp_store_coupon_user FROM fw_store_coupon_user
where where
`status` = 0 `status` = 0
AND min_price &lt;= #{maxPrice} AND min_price &lt;= #{maxPrice}

View File

@ -6,10 +6,10 @@
SELECT SELECT
p.id, p.uid, p.bargain_id, p.bargain_price_min, p.id, p.uid, p.bargain_id, p.bargain_price_min,
p.bargain_price, p.price, p.status, p.add_time, p.is_del p.bargain_price, p.price, p.status, p.add_time, p.is_del
FROM zp_store_bargain_user p FROM fw_store_bargain_user p
INNER JOIN ( INNER JOIN (
SELECT uid, MAX(id) AS max_id SELECT uid, MAX(id) AS max_id
FROM zp_store_bargain_user FROM fw_store_bargain_user
WHERE status = 3 AND is_del = FALSE WHERE status = 3 AND is_del = FALSE
GROUP BY uid GROUP BY uid
) AS tmp ON p.uid = tmp.uid AND p.id = tmp.max_id ) AS tmp ON p.uid = tmp.uid AND p.id = tmp.max_id

View File

@ -3,14 +3,14 @@
<mapper namespace="com.yzt.service.mapper.StoreOrderInfoMapper"> <mapper namespace="com.yzt.service.mapper.StoreOrderInfoMapper">
<select id="getSalesNumByDateAndProductId" resultType="java.lang.Integer"> <select id="getSalesNumByDateAndProductId" resultType="java.lang.Integer">
select IFNULL(sum(pay_num), 0) as pay_num from zp_store_order_info select IFNULL(sum(pay_num), 0) as pay_num from fw_store_order_info
where order_id in (SELECT id FROM `zp_store_order` where paid = 1 and date_format(create_time, '%Y-%m-%d') = #{date}) where order_id in (SELECT id FROM `fw_store_order` where paid = 1 and date_format(create_time, '%Y-%m-%d') = #{date})
and product_id = #{proId} and product_id = #{proId}
</select> </select>
<select id="getSalesByDateAndProductId" resultType="java.math.BigDecimal"> <select id="getSalesByDateAndProductId" resultType="java.math.BigDecimal">
select IFNULL(sum(vip_price), 0) as price from zp_store_order_info select IFNULL(sum(vip_price), 0) as price from fw_store_order_info
where order_id in (SELECT id FROM `zp_store_order` where paid = 1 and date_format(create_time, '%Y-%m-%d') = #{date}) where order_id in (SELECT id FROM `fw_store_order` where paid = 1 and date_format(create_time, '%Y-%m-%d') = #{date})
and product_id = #{proId} and product_id = #{proId}
</select> </select>

View File

@ -3,8 +3,8 @@
<mapper namespace="com.yzt.service.mapper.StoreOrderStatusMapper"> <mapper namespace="com.yzt.service.mapper.StoreOrderStatusMapper">
<select id="getRefundOrderAmountByDate" resultType="java.math.BigDecimal"> <select id="getRefundOrderAmountByDate" resultType="java.math.BigDecimal">
SELECT IFNULL(sum(o.refund_price),0) FROM `zp_store_order_status` os SELECT IFNULL(sum(o.refund_price),0) FROM `fw_store_order_status` os
left join zp_store_order o on os.oid = o.id left join fw_store_order o on os.oid = o.id
where date_format(os.create_time, '%Y-%m-%d') = #{date} where date_format(os.create_time, '%Y-%m-%d') = #{date}
and os.change_type = 'refund_price' and os.change_type = 'refund_price'
</select> </select>

View File

@ -7,10 +7,10 @@
p.id, p.uid, p.order_id, p.order_id_key, p.total_num, p.total_price, p.id, p.uid, p.order_id, p.order_id_key, p.total_num, p.total_price,
p.cid, p.pid, p.people, p.price, p.add_time, p.stop_time, p.k_id, p.cid, p.pid, p.people, p.price, p.add_time, p.stop_time, p.k_id,
p.is_tpl, p.is_refund, p.status, p.nickname, p.avatar, p.is_virtual p.is_tpl, p.is_refund, p.status, p.nickname, p.avatar, p.is_virtual
FROM zp_store_pink p FROM fw_store_pink p
INNER JOIN ( INNER JOIN (
SELECT uid, MAX(id) AS max_id SELECT uid, MAX(id) AS max_id
FROM zp_store_pink FROM fw_store_pink
WHERE is_refund = 'false' AND status IN (1, 2) WHERE is_refund = 'false' AND status IN (1, 2)
GROUP BY uid GROUP BY uid
) AS tmp ON p.uid = tmp.uid AND p.id = tmp.max_id ) AS tmp ON p.uid = tmp.uid AND p.id = tmp.max_id

View File

@ -2,7 +2,7 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yzt.service.mapper.StoreProductAttrMapper"> <mapper namespace="com.yzt.service.mapper.StoreProductAttrMapper">
<update id="updateByProductId" parameterType="com.yzt.common.model.product.StoreProductAttr"> <update id="updateByProductId" parameterType="com.yzt.common.model.product.StoreProductAttr">
update zp_store_product_attr update fw_store_product_attr
<set> <set>
attr_name = #{ attrName }, attr_name = #{ attrName },
attr_values = #{ attrValues }, attr_values = #{ attrValues },

View File

@ -4,8 +4,8 @@
<select id="getUserList" resultType="com.yzt.common.response.UserRelationResponse" parameterType="java.lang.Integer"> <select id="getUserList" resultType="com.yzt.common.response.UserRelationResponse" parameterType="java.lang.Integer">
-- SELECT r.id,r.product_id as productId,r.create_time as createTime,p.store_name as storeName,p.image,p.price -- SELECT r.id,r.product_id as productId,r.create_time as createTime,p.store_name as storeName,p.image,p.price
SELECT r.id,r.product_id,r.create_time,p.store_name,p.image,p.price SELECT r.id,r.product_id,r.create_time,p.store_name,p.image,p.price
FROM zp_store_product_relation r FROM fw_store_product_relation r
INNER JOIN zp_store_product p ON r.product_id = p.id And p.is_show = 1 INNER JOIN fw_store_product p ON r.product_id = p.id And p.is_show = 1
where r.`type` = 'collect' where r.`type` = 'collect'
<if test="uid != '' and type != null"> <if test="uid != '' and type != null">
and r.uid = #{uid} and r.uid = #{uid}

View File

@ -4,20 +4,20 @@
<select id="findPermissionByUserId" resultType="com.yzt.common.model.system.SystemMenu" parameterType="Integer" > <select id="findPermissionByUserId" resultType="com.yzt.common.model.system.SystemMenu" parameterType="Integer" >
SELECT m.* SELECT m.*
FROM zp_system_menu m FROM fw_system_menu m
right join zp_system_role_menu rm on rm.menu_id = m.id right join fw_system_role_menu rm on rm.menu_id = m.id
right join zp_system_role r on rm.rid = r.id right join fw_system_role r on rm.rid = r.id
right join zp_system_admin a on FIND_IN_SET(r.id, a.roles) right join fw_system_admin a on FIND_IN_SET(r.id, a.roles)
where m.is_delte = 0 and r.`status` = 1 and a.id = #{userId} where m.is_delte = 0 and r.`status` = 1 and a.id = #{userId}
GROUP BY m.id GROUP BY m.id
</select> </select>
<select id="getMenusByUserId" resultType="com.yzt.common.model.system.SystemMenu" parameterType="Integer" > <select id="getMenusByUserId" resultType="com.yzt.common.model.system.SystemMenu" parameterType="Integer" >
SELECT m.* SELECT m.*
FROM zp_system_menu m FROM fw_system_menu m
right join zp_system_role_menu rm on rm.menu_id = m.id right join fw_system_role_menu rm on rm.menu_id = m.id
right join zp_system_role r on rm.rid = r.id right join fw_system_role r on rm.rid = r.id
right join zp_system_admin a on FIND_IN_SET(r.id, a.roles) right join fw_system_admin a on FIND_IN_SET(r.id, a.roles)
where m.is_delte = 0 and r.`status` = 1 and m.menu_type != 'A' and m.is_show = 1 and a.id = #{userId} where m.is_delte = 0 and r.`status` = 1 and m.menu_type != 'A' and m.is_show = 1 and a.id = #{userId}
GROUP BY m.id GROUP BY m.id
</select> </select>

View File

@ -4,10 +4,10 @@
<select id="findPermissionByUserId" resultType="com.yzt.common.model.system.SystemPermissions" parameterType="Integer" > <select id="findPermissionByUserId" resultType="com.yzt.common.model.system.SystemPermissions" parameterType="Integer" >
SELECT p.id,p.pid,p.name,p.path SELECT p.id,p.pid,p.name,p.path
FROM zp_system_permissions p FROM fw_system_permissions p
right join zp_system_role_permissions rp on rp.pid = p.id right join fw_system_role_permissions rp on rp.pid = p.id
right join zp_system_role r on rp.rid = r.id right join fw_system_role r on rp.rid = r.id
right join zp_system_admin a on FIND_IN_SET(r.id, a.roles) right join fw_system_admin a on FIND_IN_SET(r.id, a.roles)
where p.is_delte = 0 and r.`status` = 1 and a.id = #{userId} where p.is_delte = 0 and r.`status` = 1 and a.id = #{userId}
GROUP BY p.id; GROUP BY p.id;
</select> </select>

View File

@ -4,7 +4,7 @@
<select id="getNearList" resultType="com.yzt.common.vo.SystemStoreNearVo" parameterType="com.yzt.common.request.StoreNearRequest"> <select id="getNearList" resultType="com.yzt.common.vo.SystemStoreNearVo" parameterType="com.yzt.common.request.StoreNearRequest">
SELECT *, (round(6367000 * 2 * asin(sqrt(pow(sin(((latitude * pi()) / 180 - (${latitude} * pi()) / 180) / 2), 2) + cos((${latitude} * pi()) / 180) * cos((latitude * pi()) / 180) * pow(sin(((longitude * pi()) / 180 - (${longitude} * pi()) / 180) / 2), 2))))) AS distance SELECT *, (round(6367000 * 2 * asin(sqrt(pow(sin(((latitude * pi()) / 180 - (${latitude} * pi()) / 180) / 2), 2) + cos((${latitude} * pi()) / 180) * cos((latitude * pi()) / 180) * pow(sin(((longitude * pi()) / 180 - (${longitude} * pi()) / 180) / 2), 2))))) AS distance
FROM zp_system_store WHERE is_show = 1 and is_del = 0 FROM fw_system_store WHERE is_show = 1 and is_del = 0
ORDER BY distance asc ORDER BY distance asc
</select> </select>
</mapper> </mapper>

View File

@ -3,8 +3,8 @@
<mapper namespace="com.yzt.service.mapper.UserBillMapper"> <mapper namespace="com.yzt.service.mapper.UserBillMapper">
<select id="getListAdminAndIntegeal" resultType="com.yzt.common.response.UserBillResponse" parameterType="map"> <select id="getListAdminAndIntegeal" resultType="com.yzt.common.response.UserBillResponse" parameterType="map">
SELECT ub.id,ub.link_id AS linkId,ub.pm,ub.title,ub.category,ub.type,ub.number,ub.balance,ub.mark,ub.status,ub.create_time AS createTime,ub.update_time AS updateTime,u.nickname,ub.uid FROM zp_user_bill ub SELECT ub.id,ub.link_id AS linkId,ub.pm,ub.title,ub.category,ub.type,ub.number,ub.balance,ub.mark,ub.status,ub.create_time AS createTime,ub.update_time AS updateTime,u.nickname,ub.uid FROM fw_user_bill ub
LEFT JOIN zp_user u ON ub.uid = u.uid LEFT JOIN fw_user u ON ub.uid = u.uid
where 1 = 1 where 1 = 1
<if test="keywords != '' and keywords != null "> <if test="keywords != '' and keywords != null ">
and ( ub.id like #{keywords} or ub.uid like #{keywords} or ub.link_id like #{keywords, jdbcType=VARCHAR} or ub.title like #{keywords, jdbcType=VARCHAR} or u.nickname like #{keywords, jdbcType=VARCHAR}) and ( ub.id like #{keywords} or ub.uid like #{keywords} or ub.link_id like #{keywords, jdbcType=VARCHAR} or ub.title like #{keywords, jdbcType=VARCHAR} or u.nickname like #{keywords, jdbcType=VARCHAR})
@ -29,8 +29,8 @@
</select> </select>
<select id="fundMonitoring" resultType="com.yzt.common.response.UserBillResponse" parameterType="map"> <select id="fundMonitoring" resultType="com.yzt.common.response.UserBillResponse" parameterType="map">
SELECT ub.id,ub.link_id AS linkId,ub.link_type AS linkType,ub.pm,ub.title,ub.category,ub.type,ub.number,ub.balance,ub.mark,ub.status,ub.create_time AS createTime,ub.update_time AS updateTime,u.nickname,u.phone,u.level,u.tenant_id AS tenantId,ub.uid FROM zp_user_bill ub SELECT ub.id,ub.link_id AS linkId,ub.link_type AS linkType,ub.pm,ub.title,ub.category,ub.type,ub.number,ub.balance,ub.mark,ub.status,ub.create_time AS createTime,ub.update_time AS updateTime,u.nickname,u.phone,u.level,u.tenant_id AS tenantId,ub.uid FROM fw_user_bill ub
LEFT JOIN zp_user u ON ub.uid = u.uid LEFT JOIN fw_user u ON ub.uid = u.uid
where ub.category = 'now_money' where ub.category = 'now_money'
<if test="keywords != '' and keywords != null "> <if test="keywords != '' and keywords != null ">
and u.nickname like #{keywords, jdbcType=VARCHAR} and u.nickname like #{keywords, jdbcType=VARCHAR}

View File

@ -21,7 +21,7 @@
MAX(update_time) as update_time, MAX(update_time) as update_time,
MAX(brokerage_level) as brokerage_level, MAX(brokerage_level) as brokerage_level,
MAX(attr_type) as attr_type MAX(attr_type) as attr_type
FROM zp_user_brokerage_record FROM fw_user_brokerage_record
WHERE uid = #{uid} and link_type != 'order' WHERE uid = #{uid} and link_type != 'order'
GROUP BY uid, link_id, link_type GROUP BY uid, link_id, link_type
ORDER BY MAX(update_time) DESC ORDER BY MAX(update_time) DESC