Quellcode durchsuchen

优惠券分享人

zhijiezhao vor 1 Jahr
Ursprung
Commit
407441c190

+ 10 - 0
src/main/java/com/caimei/modules/coupon/entity/CmCouponClub.java

@@ -16,6 +16,8 @@ import java.util.Date;
 public class CmCouponClub extends DataEntity<CmCouponClub> {
 
     private static final long serialVersionUID = 1L;
+
+    private String spName;         // 分享人姓名
     private Integer userId;        // 机构用户Id
     private Integer couponId;        // 优惠券id
     private Integer orderId;        // 订单id
@@ -42,6 +44,14 @@ public class CmCouponClub extends DataEntity<CmCouponClub> {
         super(id);
     }
 
+    public String getSpName() {
+        return spName;
+    }
+
+    public void setSpName(String spName) {
+        this.spName = spName;
+    }
+
     public Integer getUserId() {
         return userId;
     }

+ 2 - 0
src/main/resources/mappings/modules/coupon/CmCouponClubMapper.xml

@@ -30,8 +30,10 @@
 	<select id="findList" resultType="CmCouponClub">
 		SELECT 
 			<include refid="cmCouponClubColumns"/>
+		,IFNULL(s.`name`,'---') AS 'spName'
 		FROM cm_coupon_club a
 		<include refid="cmCouponClubJoins"/>
+		LEFT JOIN serviceprovider s ON s.`serviceProviderID` = a.spId
 		<where>
 			<if test="couponId != null">
 				AND a.couponId = #{couponId}

+ 2 - 0
src/main/webapp/WEB-INF/views/modules/coupon/cmCouponClubList.jsp

@@ -87,6 +87,7 @@
 				<th>机构名称</th>
 				<th>领取渠道</th>
 				<th>使用状态</th>
+				<th>分享人</th>
 				<th>
 					<c:if test="${cmCouponClub.moneyCouponFlag ne 1}">
 					领取时间:
@@ -115,6 +116,7 @@
 						<font color="#00CC66"><a href="${ctx}/order/detail?id=${cmCouponClub.orderId}">已使用</a></font>
 					</c:if>
 				</td>
+				<td>${cmCouponClub.spName}</td>
 				<td>
 					<fmt:formatDate value="${cmCouponClub.createDate}" pattern="yyyy-MM-dd HH:mm:ss"/>
 				</td>