Browse Source

双11活动

zouxuan 4 years ago
parent
commit
239e90dff7

+ 19 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/ActivityDetailDto.java

@@ -0,0 +1,19 @@
+package com.ym.mec.biz.dal.entity;
+
+import java.math.BigDecimal;
+
+public class ActivityDetailDto {
+	private Integer activityId;
+
+	private String activityName;
+
+	private String activityDesc;
+
+	private BigDecimal currentPrice;
+
+	private BigDecimal originalPrice;
+
+	private String categoryName;
+
+
+}

+ 32 - 29
mec-biz/src/main/resources/config/mybatis/LuckDrawLogMapper.xml

@@ -21,35 +21,6 @@
 		l.id_,l.group_id_, l.prize_id_,d.name_,d.reward_type_, l.user_id_, l.create_on_
 	</sql>
 
-	<sql id="queryCondition">
-		<where>
-			<if test="prizeId != null">
-				and l.prize_id_ = #{id}
-			</if>
-			<if test="userId != null">
-				and l.user_id_ = #{userId}
-			</if>
-			<if test="name != null">
-				and d.name_ like concat('%',#{name},'%')
-			</if>
-			<if test="rewardType != null">
-				and d.reward_type_ like concat('%',#{rewardType},'%')
-			</if>
-			<if test="groupId != null">
-				and l.group_id_ = #{groupId}
-			</if>
-			<if test="startDate != null">
-				and l.create_on_ &gt;= #{startDate}
-			</if>
-			<if test="endDate != null">
-				and l.create_on_ &lt;= #{endDate}
-			</if>
-			<if test="organId != null">
-				and u.organ_id_ = #{organId}
-			</if>
-		</where>
-	</sql>
-
 	<select id="get" resultMap="BaseResultMap" parameterType="java.lang.Long">
 		select
 		<include refid="Base_Column_List" />
@@ -109,4 +80,36 @@
 		order by l.create_on_ desc
 		<include refid="global.limit" />
 	</select>
+
+	<sql id="queryCondition">
+		<where>
+			<if test="prizeId != null">
+				and l.prize_id_ = #{id}
+			</if>
+			<if test="userId != null">
+				and l.user_id_ = #{userId}
+			</if>
+			<if test="name != null">
+				and d.name_ like concat('%',#{name},'%')
+			</if>
+			<if test="rewardType != null">
+				and d.reward_type_ like concat('%',#{rewardType},'%')
+			</if>
+			<if test="groupId != null">
+				and l.group_id_ = #{groupId}
+			</if>
+			<if test="startDate != null">
+				and l.create_on_ &gt;= #{startDate}
+			</if>
+			<if test="endDate != null">
+				and l.create_on_ &lt;= #{endDate}
+			</if>
+			<if test="organId != null">
+				and u.organ_id_ = #{organId}
+			</if>
+			<if test="search != null and search != ''">
+				AND (u.username_ = LIKE CONCAT('%',#{search},'%') OR u.id_ = #{search})
+			</if>
+		</where>
+	</sql>
 </mapper>

+ 19 - 0
mec-student/src/main/java/com/ym/mec/student/controller/ActivityController.java

@@ -3,6 +3,7 @@ package com.ym.mec.student.controller;
 import com.ym.mec.auth.api.client.SysUserFeignService;
 import com.ym.mec.auth.api.entity.SysUser;
 import com.ym.mec.biz.dal.entity.SporadicChargeInfo;
+import com.ym.mec.biz.service.MarketActivityService;
 import com.ym.mec.biz.service.SporadicChargeInfoService;
 import com.ym.mec.common.controller.BaseController;
 import com.ym.mec.common.entity.HttpResponseResult;
@@ -23,6 +24,8 @@ public class ActivityController extends BaseController {
     private SysUserFeignService sysUserFeignService;
     @Autowired
     private SporadicChargeInfoService sporadicChargeInfoService;
+    @Autowired
+    private MarketActivityService marketActivityService;
 
     @ApiOperation(value = "分部双11活动信息")
     @GetMapping("/doubleEleven2020")
@@ -43,4 +46,20 @@ public class ActivityController extends BaseController {
         }
         return succeed(activeInfos);
     }
+
+//    @ApiOperation(value = "分部双11活动信息")
+//    @GetMapping("/doubleEleven2021")
+//    public HttpResponseResult<List<SporadicChargeInfo>> doubleEleven2021() throws Exception {
+//        SysUser sysUser = sysUserFeignService.queryUserInfo();
+//    ActivityDetailDto
+//        if (sysUser == null || sysUser.getId() == null) {
+//            return failed("请先登录");
+//        }
+//        if (sysUser.getOrganId() == null) {
+//            return failed("用户信息有误,没有分部信息");
+//        }
+//        Integer organId = sysUser.getOrganId();
+//        marketActivityService.queryActivity(12);
+//        return succeed(activeInfos);
+//    }
 }