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

Commit 7ea181cc authored by jiangxiulong's avatar jiangxiulong

快递

parent 2ddcac1b
package com.liquidnet.service.kylin.dto.param;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class PerformanceExpressAdminListParam {
@ApiModelProperty(value = "演出名称", example = "")
private String title;
@ApiModelProperty(value = "-2全部状态:-1删除;0未提交;1审核中;2审核中(自动上线);3审核通过;4审核未通过;6上线;7下架;8活动结束;9活动取消退款中;10活动取消退", example = "-2")
private Integer status;
@ApiModelProperty(value = "城市名称", example = "")
private String cityName;
@ApiModelProperty(value = "-2全部,0审核中,2审核拒绝", example = "0")
private Integer auditStatus;
@ApiModelProperty(value = "停售时间(天)-2全部", example = "-2")
private long stopSellDay;
@ApiModelProperty(value = "停售时间", example = "2000-01-01 12:00:00", hidden = true)
private String stopSellTime;
@ApiModelProperty(value = "页数", example = "0")
private Integer pageSize;
@ApiModelProperty(value = "数量", example = "20")
private Integer pageNum;
}
package com.liquidnet.client.admin.web.controller.zhengzai.kylin;
import com.liquidnet.client.admin.common.core.controller.BaseController;
import com.liquidnet.client.admin.common.core.page.TableDataInfo;
import com.liquidnet.client.admin.zhengzai.kylin.service.impl.PerformancesExpressServiceImpl;
import com.liquidnet.service.kylin.dao.PerformanceExpressAdminListDao;
import com.liquidnet.service.kylin.dto.param.PerformanceExpressAdminListParam;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* <p>
* 演出快递
* </p>
*
* @author jiangxiulong
* @since 2021-06-21
*/
@Controller
@RequestMapping("/kylin/performancesExpress")
public class PerformancesExpressController extends BaseController {
private String prefix = "zhengzai/kylin/performancesExpress";
@Value("${liquidnet.shunfeng.url}")
private String url;
@Value("${liquidnet.shunfeng.sk}")
private String sk;
@Value("${liquidnet.shunfeng.appid}")
private String appid;
@Autowired
private PerformancesExpressServiceImpl performancesExpressServiceImpl;
@RequiresPermissions("kylin:performancesExpress:view")
@GetMapping()
public String banners() {
return prefix + "/performancesExpress";
}
/**
* 查询演出列表
*/
@RequiresPermissions("kylin:performances:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(PerformanceExpressAdminListParam performanceExpressAdminListParam) {
List<PerformanceExpressAdminListDao> result = performancesExpressServiceImpl.getList(performanceExpressAdminListParam);
return getDataTable(result);
}
}
...@@ -59,6 +59,10 @@ liquidnet: ...@@ -59,6 +59,10 @@ liquidnet:
endpoint: http://oss-cn-hangzhou.aliyuncs.com endpoint: http://oss-cn-hangzhou.aliyuncs.com
accessKeyId: LTAI4FxrURzMvvu9reFgwY5o accessKeyId: LTAI4FxrURzMvvu9reFgwY5o
accessKeySecret: Ym5tfAxOf2zX20MgjikLI3Wz3tlwVV accessKeySecret: Ym5tfAxOf2zX20MgjikLI3Wz3tlwVV
shunfeng:
url: "https://butler-dev-ms.sf-express.com"
sk: 21e9a70f677a2bf29dfa2b3bead4f018
appid: 557104628450889728
# end-dev-这里是配置信息基本值 # end-dev-这里是配置信息基本值
......
...@@ -48,6 +48,10 @@ liquidnet: ...@@ -48,6 +48,10 @@ liquidnet:
endpoint: http://oss-cn-hangzhou.aliyuncs.com endpoint: http://oss-cn-hangzhou.aliyuncs.com
accessKeyId: LTAI4FxrURzMvvu9reFgwY5o accessKeyId: LTAI4FxrURzMvvu9reFgwY5o
accessKeySecret: Ym5tfAxOf2zX20MgjikLI3Wz3tlwVV accessKeySecret: Ym5tfAxOf2zX20MgjikLI3Wz3tlwVV
shunfeng:
url: "https://butler-dev-ms.sf-express.com"
sk: 21e9a70f677a2bf29dfa2b3bead4f018
appid: 557104628450889728
# end-dev-这里是配置信息基本值 # end-dev-这里是配置信息基本值
spring: spring:
......
...@@ -60,6 +60,10 @@ liquidnet: ...@@ -60,6 +60,10 @@ liquidnet:
endpoint: http://oss-cn-hangzhou.aliyuncs.com endpoint: http://oss-cn-hangzhou.aliyuncs.com
accessKeyId: LTAI4FxrURzMvvu9reFgwY5o accessKeyId: LTAI4FxrURzMvvu9reFgwY5o
accessKeySecret: Ym5tfAxOf2zX20MgjikLI3Wz3tlwVV accessKeySecret: Ym5tfAxOf2zX20MgjikLI3Wz3tlwVV
shunfeng:
url: "https://butler-dev-ms.sf-express.com"
sk: 21e9a70f677a2bf29dfa2b3bead4f018
appid: 557104628450889728
# end-dev-这里是配置信息基本值 # end-dev-这里是配置信息基本值
spring: spring:
......
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
<th:block th:include="include :: header('演出快递列表')"/>
</head>
<body class="gray-bg">
<div class="container-div">
<div class="row">
<div class="col-sm-12 search-collapse">
<form id="formId">
<div class="select-list">
<ul>
<li>
<label>演出名称:</label>
<input type="text" name="title"/>
</li>
<li>
<label>城市名称:</label>
<input type="text" name="cityName"/>
</li>
<li>
<label>演出状态:</label>
<select name="status">
<option value="-2">全部</option>
<option value="1">审核中</option>
<option value="3">审核通过</option>
<option value="4">审核拒绝</option>
<option value="6">售卖</option>
<option value="7">已下架</option>
<option value="8">售罄</option>
<option value="9">未开始</option>
<option value="10">演出结束</option>
</select>
</li>
<li>
<label>审核状态:</label>
<select name="auditStatus">
<option value="-2">全部</option>
<option value="0">审核中</option>
<option value="2">审核拒绝</option>
</select>
</li>
<li>
<label>停售时间:</label>
<select name="stopSellDay">
<option value="-2">全部</option>
<option value="0">今天</option>
<option value="1">明天</option>
<option value="-1">昨天</option>
</select>
</li>
<li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i
class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i
class="fa fa-refresh"></i>&nbsp;重置</a>
</li>
</ul>
</div>
</form>
</div>
<div class="col-sm-12 select-table table-bordered">
<table id="bootstrap-table"></table>
</div>
</div>
</div>
<th:block th:include="include :: footer"/>
<script th:inline="javascript">
var detailFlag = [[${@permission.hasPermi('kylin:performancesExpress:detail')}]];
var expertFlag = [[${@permission.hasPermi('kylin:performancesExpress:expert')}]];
var prefix = ctx + "kylin/performancesExpress";
$(function () {
var options = {
url: prefix + "/list",
detailUrl: prefix + "/details/{id}",
createUrl: prefix + "/add",
updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove",
exportUrl: prefix + "/export",
modalName: "演出快递",
columns: [{
checkbox: true
},
{
field: 'performancesId',
title: '演出id'
},
{
field: 'title',
title: '演出名称'
},
{
field: 'timeStart',
title: '开演时间'
},
{
field: 'statusName',
title: '演出状态'
},
{
field: '22',
title: '总数'
},
{
field: '33',
title: '待发货'
},
{
field: '44',
title: '已发货'
},
{
field: '55',
title: '已签收'
},
{
title: '操作',
align: 'center',
formatter: function (value, row, index) {
var actions = [];
actions.push('<a class="btn btn-success btn-xs ' + detailFlag + '" href="javascript:void(0)" onclick="$.operate.detailTab(\'' + row.performancesId + '\')"><i class="fa fa-edit"></i>管理</a> ');
actions.push('<a class="btn btn-success btn-xs ' + detailFlag + '" href="javascript:void(0)" onclick="$.operate.detailTab(\'' + row.performancesId + '\')"><i class="fa fa-edit"></i>查看</a> ');
return actions.join('');
}
}]
};
$.table.init(options);
});
</script>
</body>
</html>
\ No newline at end of file
package com.liquidnet.client.admin.zhengzai.kylin.service.impl;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.liquidnet.client.admin.zhengzai.kylin.utils.DataUtils;
import com.liquidnet.client.admin.zhengzai.kylin.utils.PerformanceVoUtils;
import com.liquidnet.commons.lang.util.BeanUtil;
import com.liquidnet.service.kylin.dao.*;
import com.liquidnet.service.kylin.dto.param.*;
import com.liquidnet.service.kylin.dto.vo.admin.KylinPerformanceAgentVo;
import com.liquidnet.service.kylin.dto.vo.admin.KylinPerformanceDamaiVo;
import com.liquidnet.service.kylin.dto.vo.admin.KylinPerformanceMemberHistoryVo;
import com.liquidnet.service.kylin.dto.vo.partner.KylinPerformanceMisVo;
import com.liquidnet.service.kylin.dto.vo.partner.KylinTicketPartnerVo;
import com.liquidnet.service.kylin.dto.vo.partner.KylinTicketTimesPartnerVo;
import com.liquidnet.service.kylin.entity.*;
import com.liquidnet.service.kylin.mapper.*;
import com.liquidnet.service.kylin.service.admin.IKylinPerformancesAdminService;
import com.mongodb.BasicDBObject;
import com.mongodb.client.model.FindOneAndUpdateOptions;
import com.mongodb.client.model.ReturnDocument;
import lombok.extern.slf4j.Slf4j;
import org.bson.Document;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Sort;
import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.data.mongodb.core.convert.MongoConverter;
import org.springframework.data.mongodb.core.query.Criteria;
import org.springframework.data.mongodb.core.query.Query;
import org.springframework.stereotype.Service;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* <p>
* 演出 服务实现类
* </p>
*
* @author liquidnet
* @since 2021-05-05
*/
@Service
@Slf4j
public class PerformancesExpressServiceImpl extends ServiceImpl<KylinPerformancesMapper, KylinPerformances> {
@Autowired
MongoTemplate mongoTemplate;
@Autowired
private PerformanceVoUtils performanceVoUtils;
@Autowired
private KylinPerformancesMapper performancesMapper;
public KylinPerformanceMisVo performanceDetails(String performancesId) {
log.info(" PERFORMANCE mis演出详情");
KylinPerformanceMisVo createMisVo = performanceVoUtils.getPerformanceMisVo(performancesId);
return createMisVo;
}
public List<PerformanceExpressAdminListDao> getList(PerformanceExpressAdminListParam performanceExpressAdminListParam) {
List<PerformanceExpressAdminListDao> voList = new ArrayList();
try {
Map<String, Object> map = BeanUtil.convertBeanToMap(performanceExpressAdminListParam);
voList = performancesMapper.misPerformanceExpressList(map);
for (PerformanceExpressAdminListDao item : voList) {
item.setStatus(item.getStatus());
}
} catch (Exception e) {
e.printStackTrace();
return null;
}
return voList;
}
}
package com.liquidnet.service.kylin.dao;
import lombok.Data;
@Data
public class PerformanceExpressAdminListDao {
//演出数据
private String performancesId;
private String title;
private String timeStart;
private String timeEnd;
private String sponsor;
private Integer status;
private String statusName;
private String auditTime;
private Integer auditStatus;
private Integer totalGeneral;
private Integer saleGeneral;
private Integer totalSalePrice;
private Integer surplusGeneral;
private Integer syncDamai;
private String rejectTxt;
private Integer sort;
private String createdAt;
public void setStatus(Integer status){
this.status=status;
switch (status){
case 1:
this.statusName="审核中";
break;
case 3:
this.statusName="审核通过";
break;
case 4:
this.statusName="审核拒绝";
break;
case 6:
this.statusName="售卖中";
break;
case 7:
this.statusName="已下架";
break;
case 8:
this.statusName="售罄";
break;
case 9:
this.statusName="未开始";
break;
case 10:
this.statusName="已结束";
break;
default:
this.statusName="其他";
break;
}
}
}
...@@ -45,4 +45,6 @@ public interface KylinPerformancesMapper extends BaseMapper<KylinPerformances> { ...@@ -45,4 +45,6 @@ public interface KylinPerformancesMapper extends BaseMapper<KylinPerformances> {
List<PerformanceOrderStatisticalDao> getPerformanceOrderStatisticalList(String performancesId); List<PerformanceOrderStatisticalDao> getPerformanceOrderStatisticalList(String performancesId);
List<PerformanceSponsorDao> getPerformanceSponsorList(String sponsorType); List<PerformanceSponsorDao> getPerformanceSponsorList(String sponsorType);
List<PerformanceExpressAdminListDao> misPerformanceExpressList(Map<String, Object> map);
} }
...@@ -447,4 +447,42 @@ ...@@ -447,4 +447,42 @@
</where> </where>
order by sponsor_id order by sponsor_id
</select> </select>
<select id="misPerformanceExpressList"
resultType="com.liquidnet.service.kylin.dao.PerformanceExpressAdminListDao">
SELECT
p.performances_id ,
p.title ,
p.type,
p.time_start ,
p.time_end ,
ps.`status` ,
p.created_at
FROM
kylin_performances AS p
LEFT JOIN kylin_performance_status AS ps ON p.performances_id = ps.performance_id
LEFT JOIN kylin_performance_relations AS pr ON p.performances_id = pr.performance_id
<where>
<if test="title!=''">
AND title LIKE concat('%', #{title}, '%')
</if>
<if test="cityName!=''">
AND city_name LIKE concat('%', #{cityName}, '%')
</if>
<if test="status!='-2'">
AND ps.STATUS = #{status}
</if>
<if test="status=='-2'">
AND (ps.STATUS >= 3 or ps.STATUS = 1)
</if>
<if test="auditStatus!='-2'">
AND ps.audit_status = #{auditStatus}
</if>
<if test="stopSellDay!=-2">
AND p.time_end BETWEEN #{stopSellTime} AND NOW()
</if>
</where>
<if test="orderItem!=''">
ORDER BY created_at DESC
</if>
</select>
</mapper> </mapper>
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