会员列表与订单修改
This commit is contained in:
parent
c7d09d07d3
commit
64e0249053
|
|
@ -9,6 +9,9 @@ spring:
|
|||
url: jdbc:mysql://www.ks1.top:20336/Bizz?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||
username: root
|
||||
password: 123456
|
||||
#url: jdbc:mysql://101.200.139.69:3306/majiang?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||
#username: root
|
||||
#password: jaLZ;nr+O2rC
|
||||
# 从库数据源
|
||||
slave:
|
||||
# 从数据源开关/默认关闭
|
||||
|
|
|
|||
|
|
@ -33,9 +33,6 @@ public class BizMember extends BaseEntity
|
|||
@Excel(name = "推荐人ID")
|
||||
private Long recommendId;
|
||||
|
||||
/** 所有上级推荐人ID */
|
||||
private String recommendAllId;
|
||||
|
||||
/** 推荐人手机 */
|
||||
private String recommendMobile;
|
||||
|
||||
|
|
@ -53,6 +50,19 @@ public class BizMember extends BaseEntity
|
|||
@Excel(name = "是否禁用:0-否,1-是")
|
||||
private Integer isEnable;
|
||||
|
||||
/** 福豆相关数据 */
|
||||
@Excel(name = "福豆余额")
|
||||
private Long douBalance;
|
||||
|
||||
@Excel(name = "福豆余额")
|
||||
private Long douPerson;
|
||||
|
||||
@Excel(name = "团队福豆")
|
||||
private Long douTeam;
|
||||
|
||||
@Excel(name = "福豆田")
|
||||
private Long douField;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
|
|
@ -98,15 +108,7 @@ public class BizMember extends BaseEntity
|
|||
{
|
||||
return recommendId;
|
||||
}
|
||||
public void setRecommendAllId(String recommendAllId)
|
||||
{
|
||||
this.recommendAllId = recommendAllId;
|
||||
}
|
||||
|
||||
public String getRecommendAllId()
|
||||
{
|
||||
return recommendAllId;
|
||||
}
|
||||
public void setRecommendMobile(String recommendMobile)
|
||||
{
|
||||
this.recommendMobile = recommendMobile;
|
||||
|
|
@ -153,6 +155,38 @@ public class BizMember extends BaseEntity
|
|||
return isEnable;
|
||||
}
|
||||
|
||||
public Long getDouBalance() {
|
||||
return douBalance;
|
||||
}
|
||||
|
||||
public void setDouBalance(Long douBalance) {
|
||||
this.douBalance = douBalance;
|
||||
}
|
||||
|
||||
public Long getDouPerson() {
|
||||
return douPerson;
|
||||
}
|
||||
|
||||
public void setDouPerson(Long douPerson) {
|
||||
this.douPerson = douPerson;
|
||||
}
|
||||
|
||||
public Long getDouTeam() {
|
||||
return douTeam;
|
||||
}
|
||||
|
||||
public void setDouTeam(Long douTeam) {
|
||||
this.douTeam = douTeam;
|
||||
}
|
||||
|
||||
public Long getDouField() {
|
||||
return douField;
|
||||
}
|
||||
|
||||
public void setDouField(Long douField) {
|
||||
this.douField = douField;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
|
|
@ -161,7 +195,6 @@ public class BizMember extends BaseEntity
|
|||
.append("memberName", getMemberName())
|
||||
.append("password", getPassword())
|
||||
.append("recommendId", getRecommendId())
|
||||
.append("recommendAllId", getRecommendAllId())
|
||||
.append("recommendMobile", getRecommendMobile())
|
||||
.append("recommendName", getRecommendName())
|
||||
.append("memberType", getMemberType())
|
||||
|
|
|
|||
|
|
@ -64,10 +64,10 @@ public class BizOrder extends BaseEntity
|
|||
private String productName;
|
||||
|
||||
@Excel(name = "商品单价")
|
||||
private String productAmount;
|
||||
private Long productAmount;
|
||||
|
||||
@Excel(name = "商品数量")
|
||||
private String productCount;
|
||||
private Integer productCount;
|
||||
|
||||
/** 收货人地址信息 */
|
||||
@Excel(name = "收货人姓名")
|
||||
|
|
@ -182,19 +182,19 @@ public class BizOrder extends BaseEntity
|
|||
this.productName = productName;
|
||||
}
|
||||
|
||||
public String getProductAmount() {
|
||||
public Long getProductAmount() {
|
||||
return productAmount;
|
||||
}
|
||||
|
||||
public void setProductAmount(String productAmount) {
|
||||
public void setProductAmount(Long productAmount) {
|
||||
this.productAmount = productAmount;
|
||||
}
|
||||
|
||||
public String getProductCount() {
|
||||
public Integer getProductCount() {
|
||||
return productCount;
|
||||
}
|
||||
|
||||
public void setProductCount(String productCount) {
|
||||
public void setProductCount(Integer productCount) {
|
||||
this.productCount = productCount;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="memberName" column="member_name" />
|
||||
<result property="password" column="password" />
|
||||
<result property="recommendId" column="recommend_id" />
|
||||
<result property="recommendAllId" column="recommend_all_id" />
|
||||
<result property="recommendMobile" column="recommend_mobile" />
|
||||
<result property="recommendName" column="recommend_name" />
|
||||
<result property="memberType" column="member_type" />
|
||||
|
|
@ -23,7 +22,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</resultMap>
|
||||
|
||||
<sql id="selectBizMemberVo">
|
||||
select id, mobile, member_name, password, recommend_id, recommend_all_id, recommend_mobile, recommend_name, member_type, is_delete, is_enable, create_by, create_time, update_by, update_time from biz_member
|
||||
select a.id, mobile, member_name, password, recommend_id, recommend_mobile, recommend_name, member_type, is_delete, is_enable, create_by, create_time, update_by, update_time,
|
||||
(select amount from biz_account where member_id = a.id and account_type = 0) douBalance,
|
||||
(select amount from biz_account where member_id = a.id and account_type = 1) douPerson,
|
||||
(select amount from biz_account where member_id = a.id and account_type = 0) douTeam,
|
||||
(select amount from biz_account where member_id = a.id and account_type = 0) douField
|
||||
from biz_member a
|
||||
</sql>
|
||||
|
||||
<select id="selectBizMemberList" parameterType="BizMember" resultMap="BizMemberResult">
|
||||
|
|
@ -34,11 +38,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="recommendId != null "> and recommend_id = #{recommendId}</if>
|
||||
<if test="memberType != null "> and member_type = #{memberType}</if>
|
||||
</where>
|
||||
order by a.id desc
|
||||
</select>
|
||||
|
||||
<select id="selectBizMemberById" parameterType="Long" resultMap="BizMemberResult">
|
||||
<include refid="selectBizMemberVo"/>
|
||||
where id = #{id}
|
||||
where a.id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertBizMember" parameterType="BizMember" useGeneratedKeys="true" keyProperty="id">
|
||||
|
|
|
|||
|
|
@ -23,11 +23,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
|
||||
<sql id="selectBizOrderVo">
|
||||
select a.id, order_sn, a.member_id, a.mobile, a.member_name, order_amount, order_status, remark, address_detail, address_id, a.create_by, a.create_time, a.update_by, a.update_time,
|
||||
b.mobile addressMobile, b.member_name addressName, b.province_name addressProvince, b.city_name addressCity, b.area_name addressArea
|
||||
b.mobile addressMobile, b.member_name addressName, b.province_name addressProvince, b.city_name addressCity, b.area_name addressArea,
|
||||
c.productName, c.productCount, c.productAmount
|
||||
from biz_order a
|
||||
left join biz_member_address b on a.member_id = b.member_id
|
||||
left join (select max(id), product_id, product_code productName, product_count productCount, product_amount productAmount from biz_order_detail group by product_id) c
|
||||
on a.id = c.product_id
|
||||
left join (select max(id), order_id, product_code productName, product_count productCount, product_amount productAmount from biz_order_detail group by product_id) c
|
||||
on a.id = c.order_id
|
||||
</sql>
|
||||
|
||||
<select id="selectBizOrderList" parameterType="BizOrder" resultMap="BizOrderResult">
|
||||
|
|
@ -35,6 +36,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<where>
|
||||
<if test="memberName != null and memberName != ''"> and a.member_name like concat('%', #{memberName}, '%')</if>
|
||||
</where>
|
||||
order by a.id desc
|
||||
</select>
|
||||
|
||||
<select id="selectBizOrderById" parameterType="Long" resultMap="BizOrderResult">
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
<div class="select-list">
|
||||
<ul>
|
||||
<li>
|
||||
<label>用户姓名:</label>
|
||||
<label>会员姓名:</label>
|
||||
<input type="text" name="memberName"/>
|
||||
</li>
|
||||
<li>
|
||||
|
|
@ -117,11 +117,11 @@
|
|||
title: '订单状态',
|
||||
formatter: function(value, row, index) {
|
||||
switch (value){
|
||||
case 0: return "待支付";
|
||||
case 1: return "已支付";
|
||||
case 2: return "已取消";
|
||||
case 3: return "待收货";
|
||||
case 4: return "已完成";
|
||||
case 0: return "<span style='color:#5c5c5c'>待支付</span>";
|
||||
case 1: return "<span style='color:#db8301'>已支付</span>";
|
||||
case 2: return "<span style='color:#ad3636'>已取消</span>";
|
||||
case 3: return "<span style='color:#a5a544'>待收货</span>";
|
||||
case 4: return "<span style='color:#04c404'>已完成</span>";
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
@ -135,10 +135,10 @@
|
|||
formatter: function(value, row, index) {
|
||||
var actions = [];
|
||||
if(row.orderStatus == 1){
|
||||
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="deliver(\'' + row.id + '\')"><i class="fa fa-edit"></i>设为已发货</a> ');
|
||||
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="deliver(\'' + row.id + '\')"><i class="fa fa-truck"></i>发货</a> ');
|
||||
}
|
||||
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="updateRemark(\'' + row.id + '\', \'' + row.remark + '\')"><i class="fa fa-edit"></i>修改备注</a> ');
|
||||
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="updateAddress(\'' + row.id + '\', \'' + row.addressDetail + '\')"><i class="fa fa-edit"></i>修改收货地址</a> ');
|
||||
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="updateRemark(\'' + row.id + '\', \'' + row.remark + '\')"><i class="fa fa-book"></i>修改备注</a> ');
|
||||
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="updateAddress(\'' + row.id + '\', \'' + row.addressDetail + '\')"><i class="fa fa fa-map-marker"></i>收货地址</a> ');
|
||||
return actions.join('');
|
||||
}
|
||||
}]
|
||||
|
|
|
|||
|
|
@ -168,7 +168,7 @@ CREATE TABLE `biz_order_detail` (
|
|||
`order_sn` varchar(64) NOT NULL DEFAULT '' COMMENT '订单编码',
|
||||
`product_id` bigint(20) NOT NULL COMMENT '产品ID',
|
||||
`product_code` varchar(64) NOT NULL DEFAULT '' COMMENT '产品编码',
|
||||
`product_count` decimal(12,2) NOT NULL DEFAULT 0.0 COMMENT '商品数量',
|
||||
`product_count` int NOT NULL DEFAULT 0 COMMENT '商品数量',
|
||||
`product_amount` decimal(12,2) NOT NULL DEFAULT 0.0 COMMENT '商品金额',
|
||||
`create_by` varchar(64) DEFAULT '' COMMENT '创建者',
|
||||
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||||
|
|
|
|||
Loading…
Reference in New Issue