提交 3e029461 authored 作者: zhengfg's avatar zhengfg

完善用户模块

上级 9e8e44f1
package com.platform.entity;
import java.io.Serializable;
import java.math.BigDecimal;
public class TbCfUserInfoEntityExtends extends TbCfUserInfoEntity implements Serializable {
private Integer count;
private BigDecimal total;
private Integer num;
public Integer getNum() {
return num;
}
public void setNum(Integer num) {
this.num = num;
}
public Integer getCount() {
return count;
}
public void setCount(Integer count) {
this.count = count;
}
public BigDecimal getTotal() {
return total;
}
public void setTotal(BigDecimal total) {
this.total = total;
}
}
......@@ -54,31 +54,29 @@
where user_id = #{id}
</select>
<select id="queryList" resultType="com.platform.entity.TbCfUserInfoEntity">
select
`user_id`,
`user_no`,
`user_type`,
`account`,
`avatar`,
`nick`,
`phone`,
`phone_flag`,
`password`,
`last_login_time`,
`last_login_ip`,
`login_count`,
`email`,
`facebook`,
`create_time`,
`sex`,
`default_address_id`,
`invited_user_id`,
`invited_count`,
`enable_flag`,
`email_flag`
from tb_cf_user_info
WHERE 1=1
<select id="queryList" resultType="com.platform.entity.TbCfUserInfoEntityExtends">
SELECT
u.*,
IFNULL( o.count, 0 ) count,
IFNULL( o.total, 0 ) total,
IFNULL( c.num, 0 ) num
FROM
tb_cf_user_info u
LEFT JOIN (
SELECT
user_id,
count( order_id ) count,
sum( total_price ) total
FROM
tb_cf_order
WHERE
pay_status = 20
AND enable_flag = 1
GROUP BY
user_id
) o ON u.user_id = o.user_id
LEFT JOIN ( SELECT o.user_id, count( o.coupon_id ) num FROM tb_cf_order o GROUP BY o.user_id ) c ON u.user_id = c.user_id
WHERE 1=1
<if test="name != null and name.trim() != ''">
AND name LIKE concat('%',#{name},'%')
</if>
......@@ -87,7 +85,8 @@
order by ${sidx} ${order}
</when>
<otherwise>
order by user_id desc
ORDER BY
o.total DESC
</otherwise>
</choose>
<if test="offset != null and limit != null">
......
......@@ -36,7 +36,7 @@
<Form-item label="用户编号" prop="userNo">
<i-input v-model="tbCfUserInfo.userNo" placeholder="用户编号"/>
</Form-item>
<Form-item label="用户类型(1邮箱、2facebook、3twitter)" prop="userType">
<Form-item label="用户类型" prop="userType">
<i-input v-model="tbCfUserInfo.userType" placeholder="用户类型(1邮箱、2facebook、3twitter)"/>
</Form-item>
<Form-item label="账号" prop="account">
......@@ -75,7 +75,7 @@
<Form-item label="创建时间" prop="createTime">
<i-input v-model="tbCfUserInfo.createTime" placeholder="创建时间"/>
</Form-item>
<Form-item label="性别,0未知,1男性,2女性" prop="sex">
<Form-item label="性别" prop="sex">
<i-input v-model="tbCfUserInfo.sex" placeholder="性别,0未知,1男性,2女性"/>
</Form-item>
<Form-item label="默认地址id" prop="defaultAddressId">
......
......@@ -6,10 +6,13 @@ $(function () {
{label: '用户编号', name: 'userNo', index: 'user_no', width: 120},
{label: '用户类型', name: 'userType', index: 'user_type', width: 80,formatter:userTypeFormat},
{label: '账号', name: 'account', index: 'account', width: 120},
{label: '用户头像地址', name: 'avatar', index: 'avatar', width: 200,formatter:imageFormat},
{label: '用户头像地址', name: 'avatar', index: 'avatar', width: 100,formatter:imageFormat},
{label: '用户名', name: 'nick', index: 'nick', width: 80},
{label: '下单次数', name: 'count', index: 'count', width: 80},
{label: '总金额', name: 'total', index: 'total', width: 80},
{label: '使用优惠券次数', name: 'num', index: 'num', width: 100},
{label: '电话号码', name: 'phone', index: 'phone', width: 100},
{label: '是否绑定手机', name: 'phoneFlag', index: 'phone_flag', width: 80},
{label: '是否绑定手机', name: 'phoneFlag', index: 'phone_flag', width: 80,formatter:yesOrNoFormat},
{label: '密码', name: 'password', index: 'password', width: 80, hidden: true},
{label: '上一次登录时间', name: 'lastLoginTime', index: 'last_login_time', width: 120},
{label: '上一次登录IP', name: 'lastLoginIp', index: 'last_login_ip', width: 80},
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论