提交 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 @@ ...@@ -54,31 +54,29 @@
where user_id = #{id} where user_id = #{id}
</select> </select>
<select id="queryList" resultType="com.platform.entity.TbCfUserInfoEntity"> <select id="queryList" resultType="com.platform.entity.TbCfUserInfoEntityExtends">
select SELECT
`user_id`, u.*,
`user_no`, IFNULL( o.count, 0 ) count,
`user_type`, IFNULL( o.total, 0 ) total,
`account`, IFNULL( c.num, 0 ) num
`avatar`, FROM
`nick`, tb_cf_user_info u
`phone`, LEFT JOIN (
`phone_flag`, SELECT
`password`, user_id,
`last_login_time`, count( order_id ) count,
`last_login_ip`, sum( total_price ) total
`login_count`, FROM
`email`, tb_cf_order
`facebook`, WHERE
`create_time`, pay_status = 20
`sex`, AND enable_flag = 1
`default_address_id`, GROUP BY
`invited_user_id`, user_id
`invited_count`, ) o ON u.user_id = o.user_id
`enable_flag`, 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
`email_flag` WHERE 1=1
from tb_cf_user_info
WHERE 1=1
<if test="name != null and name.trim() != ''"> <if test="name != null and name.trim() != ''">
AND name LIKE concat('%',#{name},'%') AND name LIKE concat('%',#{name},'%')
</if> </if>
...@@ -87,7 +85,8 @@ ...@@ -87,7 +85,8 @@
order by ${sidx} ${order} order by ${sidx} ${order}
</when> </when>
<otherwise> <otherwise>
order by user_id desc ORDER BY
o.total DESC
</otherwise> </otherwise>
</choose> </choose>
<if test="offset != null and limit != null"> <if test="offset != null and limit != null">
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
<Form-item label="用户编号" prop="userNo"> <Form-item label="用户编号" prop="userNo">
<i-input v-model="tbCfUserInfo.userNo" placeholder="用户编号"/> <i-input v-model="tbCfUserInfo.userNo" placeholder="用户编号"/>
</Form-item> </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)"/> <i-input v-model="tbCfUserInfo.userType" placeholder="用户类型(1邮箱、2facebook、3twitter)"/>
</Form-item> </Form-item>
<Form-item label="账号" prop="account"> <Form-item label="账号" prop="account">
...@@ -75,7 +75,7 @@ ...@@ -75,7 +75,7 @@
<Form-item label="创建时间" prop="createTime"> <Form-item label="创建时间" prop="createTime">
<i-input v-model="tbCfUserInfo.createTime" placeholder="创建时间"/> <i-input v-model="tbCfUserInfo.createTime" placeholder="创建时间"/>
</Form-item> </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女性"/> <i-input v-model="tbCfUserInfo.sex" placeholder="性别,0未知,1男性,2女性"/>
</Form-item> </Form-item>
<Form-item label="默认地址id" prop="defaultAddressId"> <Form-item label="默认地址id" prop="defaultAddressId">
......
...@@ -6,10 +6,13 @@ $(function () { ...@@ -6,10 +6,13 @@ $(function () {
{label: '用户编号', name: 'userNo', index: 'user_no', width: 120}, {label: '用户编号', name: 'userNo', index: 'user_no', width: 120},
{label: '用户类型', name: 'userType', index: 'user_type', width: 80,formatter:userTypeFormat}, {label: '用户类型', name: 'userType', index: 'user_type', width: 80,formatter:userTypeFormat},
{label: '账号', name: 'account', index: 'account', width: 120}, {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: '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: '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: 'password', index: 'password', width: 80, hidden: true},
{label: '上一次登录时间', name: 'lastLoginTime', index: 'last_login_time', width: 120}, {label: '上一次登录时间', name: 'lastLoginTime', index: 'last_login_time', width: 120},
{label: '上一次登录IP', name: 'lastLoginIp', index: 'last_login_ip', width: 80}, {label: '上一次登录IP', name: 'lastLoginIp', index: 'last_login_ip', width: 80},
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论