记得上下班打卡 | git大法好,push需谨慎

Commit 017f2036 authored by 胡佳晨's avatar 胡佳晨

添加 接口

parent 8d61cd38
......@@ -15,6 +15,9 @@ public class GoblinStoreZhengzaiParam {
@ApiModelProperty(required = true, value = "演出id", example = "1")
private String performanceId;
@ApiModelProperty(required = true, value = "演出图", example = "1")
private String performanceImg;
@ApiModelProperty(required = true, value = "商铺id", example = "活动名称")
private String storeId;
......
......@@ -26,6 +26,8 @@ public class GoblinSelfMarketingVo implements Serializable, Cloneable {
private String selfMarketId;
@ApiModelProperty(value = "演出id")
private String performanceId;
@ApiModelProperty(value = "演出图")
private String performanceImg;
@ApiModelProperty(value = "营销名称")
private String name;
@ApiModelProperty(value = "营销类型[1-正在下单]")
......
......@@ -83,7 +83,7 @@ public class GoblinSelfZhengzaiController extends BaseController {
@ApiResponse(code = 200, message = "接口返回对象参数")
@ResponseBody
public ResponseDto<String> purchasingInsert(GoblinStoreZhengzaiParam goblinStoreZhengzaiParam) {
return goblinZhengzaiMarketService.zhengzaiInsert(goblinStoreZhengzaiParam.getName(), goblinStoreZhengzaiParam.getPerformanceId(), goblinStoreZhengzaiParam.getStartTime(), goblinStoreZhengzaiParam.getEndTime());
return goblinZhengzaiMarketService.zhengzaiInsert(goblinStoreZhengzaiParam.getName(), goblinStoreZhengzaiParam.getPerformanceId(), goblinStoreZhengzaiParam.getPerformanceImg(), goblinStoreZhengzaiParam.getStartTime(), goblinStoreZhengzaiParam.getEndTime());
}
@PostMapping("zhengzai/change")
......@@ -91,7 +91,7 @@ public class GoblinSelfZhengzaiController extends BaseController {
@ApiResponse(code = 200, message = "接口返回对象参数")
@ResponseBody
public ResponseDto<String> purchasingUpdate(GoblinStoreZhengzaiParam goblinStoreZhengzaiParam) {
goblinZhengzaiMarketService.zhengzaiUpdate(goblinStoreZhengzaiParam.getMarketId(), goblinStoreZhengzaiParam.getName(), goblinStoreZhengzaiParam.getStartTime(), goblinStoreZhengzaiParam.getEndTime());
goblinZhengzaiMarketService.zhengzaiUpdate(goblinStoreZhengzaiParam.getMarketId(), goblinStoreZhengzaiParam.getName(), goblinStoreZhengzaiParam.getPerformanceId(), goblinStoreZhengzaiParam.getPerformanceImg(), goblinStoreZhengzaiParam.getStartTime(), goblinStoreZhengzaiParam.getEndTime());
return ResponseDto.success();
}
......
......@@ -45,7 +45,7 @@ public interface IGoblinZhengzaiMarketService {
* @param et 结束时间
* @return
*/
ResponseDto<String> zhengzaiInsert(String purchaseName, String performancesId, String st, String et);
ResponseDto<String> zhengzaiInsert(String purchaseName, String performancesId,String img, String st, String et);
/**
* @param marketId 活动id
......@@ -54,7 +54,7 @@ public interface IGoblinZhengzaiMarketService {
* @param et 结束时间
* @return
*/
ResponseDto<Boolean> zhengzaiUpdate(String marketId, String purchaseName, String st, String et);
ResponseDto<Boolean> zhengzaiUpdate(String marketId, String purchaseName, String performanceId,String img,String st, String et);
/**
* 获取 限时秒杀 详情
......
......@@ -110,7 +110,7 @@ public class GoblinZhengzaiMarketServiceImpl implements IGoblinZhengzaiMarketSer
}
@Override
public ResponseDto<String> zhengzaiInsert(String purchaseName, String performanceId, String st, String et) {
public ResponseDto<String> zhengzaiInsert(String purchaseName, String performanceId, String img, String st, String et) {
GoblinSelfMarketing selfMarketing = GoblinSelfMarketing.getNew();
String SelfMarketId = IDGenerator.nextTimeId2();
selfMarketing.setSelfMarketId(SelfMarketId);
......@@ -127,6 +127,8 @@ public class GoblinZhengzaiMarketServiceImpl implements IGoblinZhengzaiMarketSer
BeanUtils.copyProperties(selfMarketing, vo);
vo.setStartTime(st);
vo.setEndTime(et);
vo.setPerformanceId(performanceId);
vo.setPerformanceImg(img);
vo.setCreatedAt(DateUtil.Formatter.yyyyMMddHHmmss.format(selfMarketing.getCreatedAt()));
goblinMongoUtils.insertSelfMarket(vo);
//redis
......@@ -136,7 +138,7 @@ public class GoblinZhengzaiMarketServiceImpl implements IGoblinZhengzaiMarketSer
}
@Override
public ResponseDto<Boolean> zhengzaiUpdate(String marketId, String purchaseName, String st, String et) {
public ResponseDto<Boolean> zhengzaiUpdate(String marketId, String purchaseName,String performanceId, String img, String st, String et) {
GoblinSelfMarketing selfMarketing = GoblinSelfMarketing.getNew();
selfMarketing.setName(purchaseName);
selfMarketing.setType(GoblinStatusConst.MarketingStatus.SELF_TYPE_ZHENGZAI.getValue());
......@@ -151,6 +153,8 @@ public class GoblinZhengzaiMarketServiceImpl implements IGoblinZhengzaiMarketSer
vo.setName(purchaseName);
vo.setStartTime(st);
vo.setEndTime(et);
vo.setPerformanceImg(img);
vo.setPerformanceId(performanceId);
GoblinSelfMarketingVo changeVo = goblinMongoUtils.updateSelfMarket(marketId, vo);
//redis
goblinRedisUtils.setSelfMarket(marketId, vo);
......@@ -188,7 +192,7 @@ public class GoblinZhengzaiMarketServiceImpl implements IGoblinZhengzaiMarketSer
@Override
public ResponseDto<Boolean> zhengzaiStore(List<GoblinInsertZhengzaiParam> params) {
for (GoblinInsertZhengzaiParam item : params) {
if(item.getNewTag()==1){//新增
if (item.getNewTag() == 1) {//新增
String marketId = item.getMarketId();
String storeId = item.getStoreId();
String showTime = item.getShowTime();
......@@ -210,7 +214,7 @@ public class GoblinZhengzaiMarketServiceImpl implements IGoblinZhengzaiMarketSer
//redis
goblinRedisUtils.setZhengzaiRelation(marketId, vo);
goblinRedisUtils.addStoreSelfRelation(marketId, storeId);
}else{//修改
} else {//修改
int delTag = item.getDelTag();
String showTime = item.getShowTime();
String marketId = item.getMarketId();
......@@ -249,7 +253,7 @@ public class GoblinZhengzaiMarketServiceImpl implements IGoblinZhengzaiMarketSer
@Override
public ResponseDto<Boolean> zhengzaiStoreUpdate(List<GoblinInsertZhengzaiParam> params) {
for (GoblinInsertZhengzaiParam item:params) {
for (GoblinInsertZhengzaiParam item : params) {
int delTag = item.getDelTag();
String showTime = item.getShowTime();
String marketId = item.getMarketId();
......@@ -292,7 +296,7 @@ public class GoblinZhengzaiMarketServiceImpl implements IGoblinZhengzaiMarketSer
params.add("page", page + "");
MultiValueMap<String, String> headers = CollectionUtil.linkedMultiValueMapStringString();
headers.add("Accept", "application/json;charset=UTF-8");
String returnData = HttpUtil.get(goblinUrl + "/goblin/inner/config/spu?page="+page+"&selfMarketId="+marketId+"&storeId="+storeId, params, headers);
String returnData = HttpUtil.get(goblinUrl + "/goblin/inner/config/spu?page=" + page + "&selfMarketId=" + marketId + "&storeId=" + storeId, params, headers);
ResponseDto<List<GoblinMarketSpuListVo>> rsp = JsonUtils.fromJson(returnData, new TypeReference<ResponseDto<List<GoblinMarketSpuListVo>>>() {
});
return rsp;
......@@ -306,7 +310,7 @@ public class GoblinZhengzaiMarketServiceImpl implements IGoblinZhengzaiMarketSer
params.add("spuId", spuId);
MultiValueMap<String, String> headers = CollectionUtil.linkedMultiValueMapStringString();
headers.add("Accept", "application/json;charset=UTF-8");
String returnData = HttpUtil.get(goblinUrl + "/goblin/inner/config/sku?selfMarketId="+marketId+"&storeId="+storeId+"&spuId="+spuId, params, headers);
String returnData = HttpUtil.get(goblinUrl + "/goblin/inner/config/sku?selfMarketId=" + marketId + "&storeId=" + storeId + "&spuId=" + spuId, params, headers);
ResponseDto<List<GoblinSelfZhengzaiSkuVo>> rsp = JsonUtils.fromJson(returnData, new TypeReference<ResponseDto<List<GoblinSelfZhengzaiSkuVo>>>() {
});
return rsp;
......
......@@ -8,5 +8,6 @@ public class PerformanceTitleDao {
//演出数据
private String performancesId;
private String title;
private String img_poster;
}
......@@ -46,6 +46,7 @@
<resultMap id="performanceTitleDaoResult" type="com.liquidnet.service.kylin.dao.PerformanceTitleDao">
<result column="performances_id" property="performancesId"/>
<result column="title" property="title"/>
<result column="img_poster" property="imgPoster"/>
</resultMap>
<resultMap id="OrderExportDaoResult" type="com.liquidnet.service.kylin.dao.OrderExportDao">
......@@ -320,7 +321,8 @@
<!-- Mis 根据巡演查询演出列表 -->
<select id="misTitleByRoadShowIdList" parameterType="java.lang.String" resultMap="performanceTitleDaoResult">
SELECT performances_id,
title
title,
img_poster
FROM kylin_performances AS p
LEFT JOIN kylin_performance_status AS ps ON ps.performance_id = p.performances_id
LEFT JOIN kylin_performance_relations AS pr ON pr.performance_id = p.performances_id
......@@ -331,7 +333,8 @@
<!-- Mis 根据状态查询演出列表 -->
<select id="misTitleByStatusList" parameterType="java.lang.String" resultMap="performanceTitleDaoResult">
SELECT performances_id,
title
title,
img_poster
FROM kylin_performances AS p
LEFT JOIN kylin_performance_status AS ps ON ps.performance_id = p.performances_id
LEFT JOIN kylin_performance_relations AS pr ON pr.performance_id = p.performances_id
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment