user服务启动

This commit is contained in:
杨旭 2025-03-20 23:47:40 +08:00
parent 5c0326de6e
commit 5cc3d8facd
12 changed files with 30 additions and 33 deletions

View File

@ -1,4 +1,3 @@
package com.tmerclub.cloud.api.coupon.vo; package com.tmerclub.cloud.api.coupon.vo;
import com.tmerclub.cloud.common.vo.BaseVO; import com.tmerclub.cloud.common.vo.BaseVO;
@ -12,8 +11,8 @@ import java.util.List;
/** /**
* 优惠券VO * 优惠券VO
* *
* @author YXF * @author tmerclub
* @date 2020-12-08 17:22:56 * @date: 2022-04-14
*/ */
public class CouponDataVO extends BaseVO implements Serializable { public class CouponDataVO extends BaseVO implements Serializable {
@Serial @Serial

View File

@ -1,4 +1,3 @@
package com.tmerclub.cloud.api.payment.vo; package com.tmerclub.cloud.api.payment.vo;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
@ -7,7 +6,8 @@ import java.io.Serial;
import java.io.Serializable; import java.io.Serializable;
/** /**
* @author TRACK * @author tmerclub
* @date: 2022-04-14
*/ */
public class ShopAccountDetailVO implements Serializable { public class ShopAccountDetailVO implements Serializable {
@Serial @Serial

View File

@ -1,4 +1,3 @@
package com.tmerclub.cloud.api.user.vo; package com.tmerclub.cloud.api.user.vo;
import com.tmerclub.cloud.api.coupon.vo.CouponUserCountDataVO; import com.tmerclub.cloud.api.coupon.vo.CouponUserCountDataVO;
@ -13,8 +12,8 @@ import java.util.List;
/** /**
* 全部会员VO * 全部会员VO
* *
* @author cl * @author tmerclub
* @data 2020-04-09 16:16:53 * @date: 2022-04-14
*/ */
public class UserManagerVO implements Serializable { public class UserManagerVO implements Serializable {
@Serial @Serial

View File

@ -1,4 +1,3 @@
package com.tmerclub.cloud.api.user.vo; package com.tmerclub.cloud.api.user.vo;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
@ -8,7 +7,8 @@ import java.io.Serializable;
import java.util.Date; import java.util.Date;
/** /**
* @author TRACK * @author tmerclub
* @date: 2022-04-14
*/ */
public class UserPayInfoVO implements Serializable { public class UserPayInfoVO implements Serializable {
@Serial @Serial

View File

@ -1,4 +1,3 @@
package com.tmerclub.cloud.api.user.vo; package com.tmerclub.cloud.api.user.vo;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
@ -9,7 +8,8 @@ import java.util.List;
/** /**
* 用户标签VO * 用户标签VO
* @author: cl *
* @author: tmerclub
* @date: 2021-04-12 15:56 * @date: 2021-04-12 15:56
*/ */
public class UserTagApiVO implements Serializable { public class UserTagApiVO implements Serializable {

View File

@ -1,4 +1,3 @@
package com.tmerclub.cloud.user; package com.tmerclub.cloud.user;
import org.apache.dubbo.config.spring.context.annotation.EnableDubbo; import org.apache.dubbo.config.spring.context.annotation.EnableDubbo;
@ -10,8 +9,8 @@ import org.springframework.boot.autoconfigure.security.servlet.UserDetailsServic
* @author tmerclub * @author tmerclub
* @date 2020/11/19 * @date 2020/11/19
*/ */
@SpringBootApplication(scanBasePackages = "com.moyuer.cloud", exclude = UserDetailsServiceAutoConfiguration.class) @SpringBootApplication(scanBasePackages = "com.tmerclub.cloud", exclude = UserDetailsServiceAutoConfiguration.class)
@EnableDubbo(scanBasePackages = "com.moyuer.cloud.**.feign") @EnableDubbo(scanBasePackages = "com.tmerclub.cloud.**.feign")
public class UserApplication { public class UserApplication {
public static void main(String[] args) { public static void main(String[] args) {

View File

@ -16,7 +16,7 @@
<result column="create_time" property="createTime"/> <result column="create_time" property="createTime"/>
<result column="update_time" property="updateTime"/> <result column="update_time" property="updateTime"/>
</resultMap> </resultMap>
<select id="listByParam" resultType="vo.user.api.com.tmerclub.cloud.UserManagerVO"> <select id="listByParam" resultType="com.tmerclub.cloud.api.user.vo.UserManagerVO">
select sc.shop_id, sc.user_id, u.nick_name, u.phone, u.pic select sc.shop_id, sc.user_id, u.nick_name, u.phone, u.pic
from shop_customer sc from shop_customer sc
join user u on sc.user_id = u.user_id join user u on sc.user_id = u.user_id

View File

@ -109,7 +109,7 @@
delete from `user_level_log` WHERE user_id = #{userId} delete from `user_level_log` WHERE user_id = #{userId}
</delete> </delete>
<select id="getUserTypeAtTime" resultType="vo.user.api.com.tmerclub.cloud.UserApiVO"> <select id="getUserTypeAtTime" resultType="com.tmerclub.cloud.api.user.vo.UserApiVO">
SELECT ul.after_level_type AS level_type, u.nick_name FROM `user` u SELECT ul.after_level_type AS level_type, u.nick_name FROM `user` u
LEFT JOIN user_level_log ul ON ul.user_id = u.user_id AND ul.create_time &lt; #{createTime} LEFT JOIN user_level_log ul ON ul.user_id = u.user_id AND ul.create_time &lt; #{createTime}
WHERE u.user_id = #{userId} WHERE u.user_id = #{userId}
@ -117,7 +117,7 @@
LIMIT 1 LIMIT 1
</select> </select>
<select id="listFinanceDetail" resultType="vo.user.api.com.tmerclub.cloud.FinanceDetailVO"> <select id="listFinanceDetail" resultType="com.tmerclub.cloud.api.user.vo.FinanceDetailVO">
SELECT tull.pay_type, tull.create_time AS trans_date, tull.create_time AS place_time,tull.level_log_id AS order_id, SELECT tull.pay_type, tull.create_time AS trans_date, tull.create_time AS place_time,tull.level_log_id AS order_id,
ul.level_name AS prod_name,tull.pay_amount AS trans_amount, 0 AS shop_id, tull.pay_id as pay_ids, 4 AS biz_type, tull.user_id, '官方店' as shop_name ul.level_name AS prod_name,tull.pay_amount AS trans_amount, 0 AS shop_id, tull.pay_id as pay_ids, 4 AS biz_type, tull.user_id, '官方店' as shop_name
FROM `user_level_log` tull FROM `user_level_log` tull
@ -135,7 +135,7 @@
ORDER BY trans_date DESC ORDER BY trans_date DESC
</select> </select>
<select id="getPlatformAccountDetail" resultType="vo.payment.api.com.tmerclub.cloud.ShopAccountDetailVO"> <select id="getPlatformAccountDetail" resultType="com.tmerclub.cloud.api.payment.vo.ShopAccountDetailVO">
SELECT SUM(CASE WHEN pay_type IN (1,3,4,5,8) THEN pay_amount ELSE 0 END) AS wechat_amount, SELECT SUM(CASE WHEN pay_type IN (1,3,4,5,8) THEN pay_amount ELSE 0 END) AS wechat_amount,
SUM(CASE WHEN pay_type IN (2,6,7) THEN pay_amount ELSE 0 END) AS alipay_amount, SUM(CASE WHEN pay_type IN (2,6,7) THEN pay_amount ELSE 0 END) AS alipay_amount,
SUM(CASE WHEN pay_type IN (9) THEN pay_amount ELSE 0 END) AS balance_amount SUM(CASE WHEN pay_type IN (9) THEN pay_amount ELSE 0 END) AS balance_amount
@ -151,7 +151,7 @@
</where> </where>
</select> </select>
<select id="listPayInfo" resultType="vo.user.api.com.tmerclub.cloud.UserPayInfoVO"> <select id="listPayInfo" resultType="com.tmerclub.cloud.api.user.vo.UserPayInfoVO">
SELECT level_log_id as orderIds, pay_id, 2 as pay_entry, pay_type,pay_amount, SELECT level_log_id as orderIds, pay_id, 2 as pay_entry, pay_type,pay_amount,
IF(pay_type IN (1,3,4,5,8), pay_amount, 0) AS wechat_amount, IF(pay_type IN (1,3,4,5,8), pay_amount, 0) AS wechat_amount,
IF(pay_type IN (2,6,7), pay_amount, 0) AS alipay_amount, IF(pay_type IN (2,6,7), pay_amount, 0) AS alipay_amount,

View File

@ -17,7 +17,7 @@
<result column="phone" property="phone"/> <result column="phone" property="phone"/>
</resultMap> </resultMap>
<resultMap id="userAndOpenIdsMap" type="vo.user.api.com.tmerclub.cloud.UserApiVO"> <resultMap id="userAndOpenIdsMap" type="com.tmerclub.cloud.api.user.vo.UserApiVO">
<!-- <!--
WARNING - @mbg.generated WARNING - @mbg.generated
--> -->
@ -48,7 +48,7 @@
</where> </where>
order by user_id desc order by user_id desc
</select> </select>
<select id="getByUserId" resultType="vo.user.api.com.tmerclub.cloud.UserApiVO"> <select id="getByUserId" resultType="com.tmerclub.cloud.api.user.vo.UserApiVO">
select <include refid="Vo_Column_List"/> from user where user_id = #{userId} select <include refid="Vo_Column_List"/> from user where user_id = #{userId}
</select> </select>
@ -126,7 +126,7 @@
#{userId} #{userId}
</foreach> </foreach>
</update> </update>
<select id="getUserByUserIds" resultType="vo.user.api.com.tmerclub.cloud.UserApiVO"> <select id="getUserByUserIds" resultType="com.tmerclub.cloud.api.user.vo.UserApiVO">
select `user_id`,`nick_name`,`pic`,`create_time`, phone, status from user select `user_id`,`nick_name`,`pic`,`create_time`, phone, status from user
where user_id in where user_id in
<foreach collection="userIds" item="userId" separator="," open="(" close=")"> <foreach collection="userIds" item="userId" separator="," open="(" close=")">
@ -187,7 +187,7 @@
</where> </where>
ORDER BY u.create_time DESC ORDER BY u.create_time DESC
</select> </select>
<select id="listUserByParam" resultType="vo.user.api.com.tmerclub.cloud.UserManagerVO"> <select id="listUserByParam" resultType="com.tmerclub.cloud.api.user.vo.UserManagerVO">
SELECT utemp.*, SELECT utemp.*,
<!-- start初始化订单的数据 --> <!-- start初始化订单的数据 -->
@consAmount := 0 AS consAmount, @consAmount := 0 AS consAmount,
@ -294,7 +294,7 @@
</if> </if>
</where> </where>
</select> </select>
<select id="getUserCountInfo" resultType="vo.user.api.com.tmerclub.cloud.MemberOverviewVO"> <select id="getUserCountInfo" resultType="com.tmerclub.cloud.api.user.vo.MemberOverviewVO">
SELECT SELECT
count( DISTINCT u.user_id ) AS totalMember, count( DISTINCT u.user_id ) AS totalMember,
count( DISTINCT CASE WHEN u.level_type = 1 THEN u.user_id ELSE NULL END ) AS paidMember, count( DISTINCT CASE WHEN u.level_type = 1 THEN u.user_id ELSE NULL END ) AS paidMember,
@ -328,7 +328,7 @@
</if> </if>
</where> </where>
</select> </select>
<select id="getUserByParam" resultType="vo.user.api.com.tmerclub.cloud.UserApiVO"> <select id="getUserByParam" resultType="com.tmerclub.cloud.api.user.vo.UserApiVO">
select user_id, nick_name from user select user_id, nick_name from user
<where> <where>
<if test="userApiVO.nickName != null and userApiVO.nickName != ''"> <if test="userApiVO.nickName != null and userApiVO.nickName != ''">
@ -397,7 +397,7 @@
</foreach> </foreach>
</select> </select>
<select id="countUserNumByType" resultType="vo.user.api.com.tmerclub.cloud.MemberTrendRespVO"> <select id="countUserNumByType" resultType="com.tmerclub.cloud.api.user.vo.MemberTrendRespVO">
SELECT COUNT(*) memberNum, ( SELECT COUNT(*) memberNum, (
SELECT COUNT(DISTINCT user_id) SELECT COUNT(DISTINCT user_id)
FROM user_level_log FROM user_level_log
@ -408,7 +408,7 @@
</select> </select>
<select id="statisticsUserNum" resultType="vo.user.api.com.tmerclub.cloud.MemberCountVO"> <select id="statisticsUserNum" resultType="com.tmerclub.cloud.api.user.vo.MemberCountVO">
SELECT COUNT(*) totalMember, ( SELECT COUNT(*) totalMember, (
SELECT COUNT(DISTINCT user_id) SELECT COUNT(DISTINCT user_id)
FROM user_level_log FROM user_level_log
@ -429,7 +429,7 @@
SELECT create_time FROM `user` ORDER BY create_time ASC LIMIT 0,1 SELECT create_time FROM `user` ORDER BY create_time ASC LIMIT 0,1
</select> </select>
<select id="listUserByMobile" resultType="vo.user.api.com.tmerclub.cloud.UserApiVO"> <select id="listUserByMobile" resultType="com.tmerclub.cloud.api.user.vo.UserApiVO">
select user_id, status from `user` where phone = #{mobile} select user_id, status from `user` where phone = #{mobile}
</select> </select>

View File

@ -16,7 +16,7 @@
</resultMap> </resultMap>
<resultMap id="userRechargeInfoMap" type="com.tmerclub.cloud.user.vo.UserRechargeVO" extends="userRechargeMap"> <resultMap id="userRechargeInfoMap" type="com.tmerclub.cloud.user.vo.UserRechargeVO" extends="userRechargeMap">
<collection property="couponList" ofType="vo.coupon.api.com.tmerclub.cloud.CouponDataVO"> <collection property="couponList" ofType="com.tmerclub.cloud.api.coupon.vo.CouponDataVO">
<id column="coupon_id" jdbcType="BIGINT" property="couponId"/> <id column="coupon_id" jdbcType="BIGINT" property="couponId"/>
<result column="coupon_num" jdbcType="VARCHAR" property="couponNum"/> <result column="coupon_num" jdbcType="VARCHAR" property="couponNum"/>
</collection> </collection>

View File

@ -66,7 +66,7 @@
</if> </if>
</where> </where>
</select> </select>
<select id="getByUserTagIds" resultType="vo.user.api.com.tmerclub.cloud.UserTagApiVO" <select id="getByUserTagIds" resultType="com.tmerclub.cloud.api.user.vo.UserTagApiVO"
parameterType="java.util.List"> parameterType="java.util.List">
select `user_tag_id` as tagId,`tag_name`,`tag_type` from user_tag select `user_tag_id` as tagId,`tag_name`,`tag_type` from user_tag
where user_tag_id IN where user_tag_id IN

View File

@ -17,7 +17,7 @@
<select id="getByUserTagUserId" resultType="com.tmerclub.cloud.user.model.UserTagUser"> <select id="getByUserTagUserId" resultType="com.tmerclub.cloud.user.model.UserTagUser">
select <include refid="Vo_Column_List"/> from user_tag_user where user_tag_user_id = #{userTagUserId} select <include refid="Vo_Column_List"/> from user_tag_user where user_tag_user_id = #{userTagUserId}
</select> </select>
<select id="getUserTagsByUserId" resultType="vo.user.api.com.tmerclub.cloud.UserTagApiVO"> <select id="getUserTagsByUserId" resultType="com.tmerclub.cloud.api.user.vo.UserTagApiVO">
SELECT distinct ut.user_tag_id AS tagId,ut.tag_name, ut.tag_type SELECT distinct ut.user_tag_id AS tagId,ut.tag_name, ut.tag_type
FROM `user_tag` ut FROM `user_tag` ut
LEFT JOIN `user_tag_user` utg ON utg.user_tag_id = ut.user_tag_id LEFT JOIN `user_tag_user` utg ON utg.user_tag_id = ut.user_tag_id
@ -31,7 +31,7 @@
#{userId} #{userId}
</foreach> </foreach>
</select> </select>
<select id="getUserByTagIds" resultType="vo.user.api.com.tmerclub.cloud.UserApiVO" parameterType="java.util.List"> <select id="getUserByTagIds" resultType="com.tmerclub.cloud.api.user.vo.UserApiVO" parameterType="java.util.List">
SELECT u.`user_id`,u.`phone` as userMobile,u.`nick_name` FROM `user` u SELECT u.`user_id`,u.`phone` as userMobile,u.`nick_name` FROM `user` u
LEFT JOIN `user_tag_user` utu ON u.`user_id` = utu.`user_id` LEFT JOIN `user_tag_user` utu ON u.`user_id` = utu.`user_id`
WHERE utu.user_tag_id IN WHERE utu.user_tag_id IN