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

Commit 4d36b3ab authored by 胡佳晨's avatar 胡佳晨

提交 sweet项目

parent 37a2f051
......@@ -31,7 +31,7 @@ public class SweetArtistsController {
ISweetArtistsService sweetArtistsService;
@GetMapping("list")
@ApiOperation("舞台列表")
@ApiOperation("艺人列表")
@ApiImplicitParams({
@ApiImplicitParam(type = "query", dataType = "Integer", name = "page", value = "页数", required = true),
@ApiImplicitParam(type = "query", dataType = "Integer", name = "size", value = "数量", required = true),
......@@ -39,12 +39,12 @@ public class SweetArtistsController {
})
public ResponseDto<PageInfo<SweetArtists>> getList(@RequestParam(defaultValue = "1") Integer page,
@RequestParam(defaultValue = "10") Integer size,
@RequestParam(defaultValue = "艺人姓名") String name) {
@RequestParam(defaultValue = "艺人姓名",required = false) String name) {
return sweetArtistsService.getList(page, size, name);
}
@PostMapping("add")
@ApiOperation("添加舞台")
@ApiOperation("添加艺人")
@ApiImplicitParams({
@ApiImplicitParam(type = "query", dataType = "String", name = "picUrl", value = "图片", required = true),
@ApiImplicitParam(type = "query", dataType = "String", name = "name", value = "艺人姓名", required = true),
......@@ -59,7 +59,7 @@ public class SweetArtistsController {
}
@PostMapping("detail")
@ApiOperation("舞台详情")
@ApiOperation("艺人详情")
@ApiImplicitParams({
@ApiImplicitParam(type = "query", dataType = "String", name = "artistsId", value = "艺人Id", required = true),
})
......@@ -68,7 +68,7 @@ public class SweetArtistsController {
}
@PostMapping("change")
@ApiOperation("修改舞台")
@ApiOperation("修改艺人")
@ApiImplicitParams({
@ApiImplicitParam(type = "query", dataType = "String", name = "artistsId", value = "艺人Id", required = true),
@ApiImplicitParam(type = "query", dataType = "String", name = "picUrl", value = "图片", required = true),
......
package com.liquidnet.service.sweet.controller;
import com.github.pagehelper.PageInfo;
import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.sweet.dto.SweetManualArtistListDto;
import com.liquidnet.service.sweet.dto.SweetManualDto;
import com.liquidnet.service.sweet.entity.SweetManualArtists;
import com.liquidnet.service.sweet.service.ISweetManualArtistsService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
/**
......@@ -13,8 +26,84 @@ import org.springframework.web.bind.annotation.RestController;
* @author liquidnet
* @since 2021-07-23
*/
@Api(tags = "电子手册艺人")
@RestController
@RequestMapping("/sweet-manual-artists")
public class SweetManualArtistsController {
@Autowired
private ISweetManualArtistsService sweetManualArtistsService;
@GetMapping("getList")
@ApiOperation("宣传手册艺人列表")
@ApiImplicitParams({
@ApiImplicitParam(type = "query", dataType = "Integer", name = "page", value = "页数", required = true),
@ApiImplicitParam(type = "query", dataType = "Integer", name = "size", value = "数量", required = true),
@ApiImplicitParam(type = "query", dataType = "String", name = "manaulId", value = "手册id", required = true),
})
public ResponseDto<PageInfo<SweetManualArtistListDto>> getList(@RequestParam(defaultValue = "1") Integer page,
@RequestParam(defaultValue = "10") Integer size,
@RequestParam(defaultValue = "") String manualId) {
return sweetManualArtistsService.getList(page, size, manualId);
}
@GetMapping("details")
@ApiOperation("宣传手册艺人详情")
@ApiImplicitParams({
@ApiImplicitParam(type = "query", dataType = "String", name = "manualRelationId", value = "手册艺人id", required = true),
})
public ResponseDto<SweetManualArtistListDto> details(@RequestParam(defaultValue = "") String manualRelationId) {
return sweetManualArtistsService.details(manualRelationId);
}
@GetMapping("add")
@ApiOperation("宣传手册艺人添加")
@ApiImplicitParams({
@ApiImplicitParam(type = "query", dataType = "String", name = "manualId", value = "手册id", required = true),
@ApiImplicitParam(type = "query", dataType = "String", name = "artistId", value = "艺人id", required = true),
@ApiImplicitParam(type = "query", dataType = "String", name = "stageId", value = "场地id", required = true),
@ApiImplicitParam(type = "query", dataType = "String", name = "performanceStart", value = "演出开始时间", required = false),
@ApiImplicitParam(type = "query", dataType = "String", name = "performanceEnd", value = "演出结束时间", required = false),
@ApiImplicitParam(type = "query", dataType = "String", name = "signatureStart", value = "签售开始时间", required = false),
@ApiImplicitParam(type = "query", dataType = "String", name = "signatureEnd", value = "签售结束时间", required = false),
})
public ResponseDto<Boolean> add(@RequestParam(defaultValue = "1") String manualId,
@RequestParam(defaultValue = "10") String artistId,
@RequestParam(defaultValue = "") String stageId,
@RequestParam(defaultValue = "", required = false) String performanceStart,
@RequestParam(defaultValue = "", required = false) String performanceEnd,
@RequestParam(defaultValue = "", required = false) String signatureStart,
@RequestParam(defaultValue = "", required = false) String signatureEnd) {
return sweetManualArtistsService.add(manualId, artistId, stageId, performanceStart, performanceEnd, signatureStart, signatureEnd);
}
@GetMapping("change")
@ApiOperation("宣传手册艺人修改")
@ApiImplicitParams({
@ApiImplicitParam(type = "query", dataType = "String", name = "manualRelationId", value = "手册艺人id", required = true),
@ApiImplicitParam(type = "query", dataType = "String", name = "artistId", value = "艺人id", required = true),
@ApiImplicitParam(type = "query", dataType = "String", name = "stageId", value = "场地id", required = true),
@ApiImplicitParam(type = "query", dataType = "String", name = "performanceStart", value = "演出开始时间", required = false),
@ApiImplicitParam(type = "query", dataType = "String", name = "performanceEnd", value = "演出结束时间", required = false),
@ApiImplicitParam(type = "query", dataType = "String", name = "signatureStart", value = "签售开始时间", required = false),
@ApiImplicitParam(type = "query", dataType = "String", name = "signatureEnd", value = "签售结束时间", required = false),
})
public ResponseDto<Boolean> change(@RequestParam(defaultValue = "1") String manualRelationId,
@RequestParam(defaultValue = "10") String artistId,
@RequestParam(defaultValue = "") String stageId,
@RequestParam(defaultValue = "", required = false) String performanceStart,
@RequestParam(defaultValue = "", required = false) String performanceEnd,
@RequestParam(defaultValue = "", required = false) String signatureStart,
@RequestParam(defaultValue = "", required = false) String signatureEnd) {
return sweetManualArtistsService.change(manualRelationId, artistId, stageId, performanceStart, performanceEnd, signatureStart, signatureEnd);
}
@GetMapping("delete")
@ApiOperation("宣传手册艺人删除")
@ApiImplicitParams({
@ApiImplicitParam(type = "query", dataType = "String", name = "manualRelationId", value = "手册艺人id", required = true)
})
public ResponseDto<Boolean> delete(@RequestParam(defaultValue = "1") String manualRelationId) {
return sweetManualArtistsService.delete(manualRelationId);
}
}
......@@ -39,11 +39,11 @@ public class SweetManualController {
@ApiImplicitParams({
@ApiImplicitParam(type = "query", dataType = "Integer", name = "page", value = "页数", required = true),
@ApiImplicitParam(type = "query", dataType = "Integer", name = "size", value = "数量", required = true),
@ApiImplicitParam(type = "query", dataType = "String", name = "name", value = "姓名", required = true),
@ApiImplicitParam(type = "query", dataType = "String", name = "name", value = "姓名", required = false),
})
public ResponseDto<PageInfo<SweetManualDto>> getList(@RequestParam(defaultValue = "1") Integer page,
@RequestParam(defaultValue = "10") Integer size,
@RequestParam(defaultValue = "") String name) {
@RequestParam(defaultValue = "",required = false) String name) {
return sweetManualService.getManualList(page, size, name);
}
......
......@@ -41,7 +41,7 @@ public class SweetManualNotifyController {
})
public ResponseDto<PageInfo<SweetManualNotify>> getList(@RequestParam(defaultValue = "1") Integer page,
@RequestParam(defaultValue = "10") Integer size,
@RequestParam(defaultValue = "标题") String name,
@RequestParam(defaultValue = "标题",required = false) String name,
@RequestParam(defaultValue = "手册id") String manualId) {
return sweetManualNotifyService.getList(page, size, name, manualId);
}
......
......@@ -55,9 +55,9 @@ public class SweetRichtextController {
@ApiImplicitParam(type = "query", dataType = "Integer", name = "type", value = "类型 (1签售时间 2现场地图 3官方大巴 4公共交通 5自驾导航坐标 6官方支持 7观众须知 8防疫指南 9观演攻略)", required = true),
})
public ResponseDto<Boolean> add(@RequestParam(defaultValue = "1") String manualId,
@RequestParam(defaultValue = "") String details,
@RequestParam(defaultValue = "100.100,200.200") String local,
@RequestParam(defaultValue = "") String picUrl,
@RequestParam(defaultValue = "",required = false) String details,
@RequestParam(defaultValue = "100.100,200.200",required = false) String local,
@RequestParam(defaultValue = "",required = false) String picUrl,
@RequestParam(defaultValue = "1") Integer type) {
return sweetRichtextService.add(manualId, details, local, picUrl, type);
}
......@@ -72,9 +72,9 @@ public class SweetRichtextController {
@ApiImplicitParam(type = "query", dataType = "Integer", name = "type", value = "类型 (1签售时间 2现场地图 3官方大巴 4公共交通 5自驾导航坐标 6官方支持 7观众须知 8防疫指南 9观演攻略)", required = true),
})
public ResponseDto<Boolean> change(@RequestParam(defaultValue = "1") String manualId,
@RequestParam(defaultValue = "") String details,
@RequestParam(defaultValue = "100.100,200.200") String local,
@RequestParam(defaultValue = "") String picUrl,
@RequestParam(defaultValue = "",required = false) String details,
@RequestParam(defaultValue = "100.100,200.200",required = false) String local,
@RequestParam(defaultValue = "",required = false) String picUrl,
@RequestParam(defaultValue = "1") Integer type) {
return sweetRichtextService.change(manualId, details, local, picUrl, type);
}
......
......@@ -37,7 +37,7 @@ public class SweetStageController {
})
public ResponseDto<PageInfo<SweetStage>> getList(@RequestParam(defaultValue = "1") Integer page,
@RequestParam(defaultValue = "10") Integer size,
@RequestParam(defaultValue = "名字") String title) {
@RequestParam(defaultValue = "名字",required = false) String title) {
return sweetStageService.getList(page, size, title);
}
......
package com.liquidnet.service.sweet.dto;
import lombok.Data;
import java.io.Serializable;
@Data
public class SweetManualArtistListDto implements Serializable {
private String manualRelationId;
private String name;
private String title;
private String performanceStart;
private String performanceEnd;
private String signatureStart;
private String signatureEnd;
}
package com.liquidnet.service.sweet.mapper;
import com.liquidnet.service.sweet.dto.SweetManualArtistListDto;
import com.liquidnet.service.sweet.dto.SweetManualDto;
import com.liquidnet.service.sweet.entity.SweetManualArtists;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
......@@ -17,8 +18,8 @@ import java.util.Map;
*/
public interface SweetManualArtistsMapper extends BaseMapper<SweetManualArtists> {
List<SweetManualDto> getManualList(Map<String, Object> map);
List<SweetManualArtistListDto> getManualList(Map<String, Object> map);
SweetManualDto getManualDetails(Map<String, Object> map);
SweetManualArtistListDto getManualDetails(Map<String, Object> map);
}
......@@ -2,6 +2,7 @@ package com.liquidnet.service.sweet.service;
import com.github.pagehelper.PageInfo;
import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.sweet.dto.SweetManualArtistListDto;
import com.liquidnet.service.sweet.entity.SweetManualArtists;
import com.baomidou.mybatisplus.extension.service.IService;
import com.liquidnet.service.sweet.entity.SweetManualNotify;
......@@ -17,11 +18,11 @@ import com.liquidnet.service.sweet.entity.SweetManualNotify;
public interface ISweetManualArtistsService extends IService<SweetManualArtists> {
ResponseDto<PageInfo<SweetManualArtists>> getList(Integer page, Integer size,String manualId);
ResponseDto<PageInfo<SweetManualArtistListDto>> getList(Integer page, Integer size, String manualId);
ResponseDto<Boolean> add(String manualId,String artistId, String stageId,String performanceStart,String performanceEnd,String signatureStart,String signatureEnd);
ResponseDto<SweetManualArtists> details(String manualRelationId);
ResponseDto<SweetManualArtistListDto> details(String manualRelationId);
ResponseDto<Boolean> change(String manualRelationId,String artistId, String stageId,String performanceStart,String performanceEnd,String signatureStart,String signatureEnd);
......
package com.liquidnet.service.sweet.service.impl;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.liquidnet.commons.lang.util.DateUtil;
import com.liquidnet.commons.lang.util.IDGenerator;
import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.sweet.dto.SweetManualArtistListDto;
import com.liquidnet.service.sweet.dto.SweetManualDto;
import com.liquidnet.service.sweet.entity.SweetManualArtists;
import com.liquidnet.service.sweet.entity.SweetManualNotify;
import com.liquidnet.service.sweet.mapper.SweetManualArtistsMapper;
......@@ -14,6 +17,8 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.time.LocalDateTime;
import java.util.HashMap;
import java.util.List;
/**
* <p>
......@@ -30,8 +35,19 @@ public class SweetManualArtistsServiceImpl extends ServiceImpl<SweetManualArtist
private SweetManualArtistsMapper sweetManualArtistsMapper;
@Override
public ResponseDto<PageInfo<SweetManualArtists>> getList(Integer page, Integer size, String manualId) {
return null;
public ResponseDto<PageInfo<SweetManualArtistListDto>> getList(Integer page, Integer size, String manualId) {
PageInfo<SweetManualArtistListDto> pageInfoTmp;
try {
PageHelper.startPage(page, size);
HashMap<String, Object> map = new HashMap<>();
map.put("manualId", manualId);
List<SweetManualArtistListDto> voList = sweetManualArtistsMapper.getManualList(map);
pageInfoTmp = new PageInfo(voList);
} catch (Exception e) {
e.printStackTrace();
return ResponseDto.failure();
}
return ResponseDto.success(pageInfoTmp);
}
@Override
......@@ -55,8 +71,16 @@ public class SweetManualArtistsServiceImpl extends ServiceImpl<SweetManualArtist
}
@Override
public ResponseDto<SweetManualArtists> details(String manualRelationId) {
return null;
public ResponseDto<SweetManualArtistListDto> details(String manualRelationId) {
try {
HashMap<String, Object> map = new HashMap<>();
map.put("manualRelationId", manualRelationId);
SweetManualArtistListDto dto = sweetManualArtistsMapper.getManualDetails(map);
return ResponseDto.success(dto);
} catch (Exception e) {
e.printStackTrace();
return ResponseDto.failure();
}
}
@Override
......
......@@ -2,33 +2,41 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.liquidnet.service.sweet.mapper.SweetManualArtistsMapper">
<resultMap id="getManualListResult" type="com.liquidnet.service.sweet.dto.SweetManualDto">
<result column="performances_id" property="performancesId"/>
<resultMap id="getManualListResult" type="com.liquidnet.service.sweet.dto.SweetManualArtistListDto">
<result column="manual_relation_id" property="manualRelationId"/>
<result column="name" property="name"/>
<result column="title" property="title"/>
<result column="time_start" property="timeStart"/>
<result column="time_end" property="timeEnd"/>
<result column="time_sell" property="timeSell"/>
<result column="time_stop" property="timeStop"/>
<result column="status" property="status"/>
<result column="manualStatus" property="manualStatus"/>
<result column="is_release" property="isRelease"/>
<result column="performance_start" property="performanceStart"/>
<result column="performance_end" property="performanceEnd"/>
<result column="signature_start" property="signatureStart"/>
<result column="signature_end" property="signatureEnd"/>
</resultMap>
<resultMap id="getManualDetailsResult" type="com.liquidnet.service.sweet.dto.SweetManualDto">
<result column="performances_id" property="performancesId"/>
<result column="title" property="title"/>
<result column="time_start" property="timeStart"/>
<result column="time_end" property="timeEnd"/>
<result column="time_sell" property="timeSell"/>
<result column="time_stop" property="timeStop"/>
<result column="status" property="status"/>
<result column="manualStatus" property="manualStatus"/>
<result column="is_release" property="isRelease"/>
</resultMap>
<select id="getManualList" parameterType="java.util.Map" resultMap="partnerPerformanceListResult">
<select id="getManualList" parameterType="java.util.Map" resultMap="getManualListResult">
select manual_relation_id,
sa.`name`,
ss.title,
performance_start,
performance_end,
signature_start,
signature_end
from sweet_manual_artists as sma
left join sweet_artists as sa on sa.artists_id = sma.artists_id
left join sweet_stage as ss on ss.stage_id = sma.stage_id
where manual_id = #{manualId}
</select>
<select id="getManualDetails" parameterType="java.util.Map" resultMap="partnerPerformanceListResult">
</select>
<select id="getManualDetails" parameterType="java.util.Map" resultMap="getManualListResult">
select manual_relation_id,
sa.`name`,
ss.title,
performance_start,
performance_end,
signature_start,
signature_end
from sweet_manual_artists as sma
left join sweet_artists as sa on sa.artists_id = sma.artists_id
left join sweet_stage as ss on ss.stage_id = sma.stage_id
where manual_relation_id = #{manualRelationId}
</select>
</mapper>
......@@ -21,10 +21,11 @@
p.title ,
p.time_start ,
p.time_end ,
ps.status ,
t.time_sell ,
t.time_stop,
sm.status as 'manualStatus',
sm.is_release
IFNULL(sm.status ,0) as 'manualStatus',
IFNULL(sm.is_release,0) as 'is_release'
FROM
kylin_performances AS p
LEFT JOIN kylin_performance_status AS ps ON p.performances_id = ps.performance_id
......@@ -49,7 +50,7 @@
ttr.performance_id
) AS t ON p.performances_id = t.performance_id
<where>
<if test="title!=''">
<if test="title!='' and title != null">
AND title LIKE concat('%', #{title}, '%')
</if>
</where>
......
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