From 3d8841f84c94d93349fb471d0435289e540d5143 Mon Sep 17 00:00:00 2001
From: 44323 <443237572@qq.com>
Date: 星期五, 27 十月 2023 16:14:53 +0800
Subject: [PATCH] Merge branch 'master' of http://120.76.84.145:10101/gitblit/r/java/PlayPai
---
cloud-server-management/src/main/webapp/WEB-INF/view/system/ball/registerList.html | 507 ++++++++++++++++++++++++++++++++++++++++++++++++++
cloud-server-course/src/main/resources/mapper/CoursePackageSchedulingMapper.xml | 11
cloud-server-course/src/main/java/com/dsh/course/service/impl/CoursePackageSchedulingServiceImpl.java | 24 +-
cloud-server-activity/src/main/java/com/dsh/activity/service/impl/UserCouponServiceImpl.java | 10
cloud-server-other/src/main/java/com/dsh/other/controller/SiteController.java | 15 +
cloud-server-course/src/main/java/com/dsh/course/controller/PostCourseVideoController.java | 6
6 files changed, 551 insertions(+), 22 deletions(-)
diff --git a/cloud-server-activity/src/main/java/com/dsh/activity/service/impl/UserCouponServiceImpl.java b/cloud-server-activity/src/main/java/com/dsh/activity/service/impl/UserCouponServiceImpl.java
index 5bf3e1d..ad19807 100644
--- a/cloud-server-activity/src/main/java/com/dsh/activity/service/impl/UserCouponServiceImpl.java
+++ b/cloud-server-activity/src/main/java/com/dsh/activity/service/impl/UserCouponServiceImpl.java
@@ -101,7 +101,7 @@
if (type == 1) {//满减{"num1":1,"num2":1}
JSONObject jsonObject = JSON.parseObject(content);
Double num1 = jsonObject.getDouble("conditionalAmount");
- if(price.compareTo(num1) <= 0){
+ if(price.compareTo(num1) < 0){
continue;
}
couponListVo.setUseCondition("满" + num1 + "元可用");
@@ -113,7 +113,7 @@
if(num1==null){
num1=0d;
}
- if(price.compareTo(num1) <= 0){
+ if(price.compareTo(num1) < 0){
continue;
}
couponListVo.setUseCondition("");
@@ -157,7 +157,7 @@
if (type == 1) {//满减{"num1":1,"num2":1}
JSONObject jsonObject = JSON.parseObject(content);
Double num1 = jsonObject.getDouble("conditionalAmount");
- if(price.compareTo(num1) <= 0){
+ if(price.compareTo(num1) < 0){
continue;
}
couponListVo.setUseCondition("满" + num1 + "元可用");
@@ -165,11 +165,11 @@
}
if (type == 2) {//代金券{"num1":1}
JSONObject jsonObject = JSON.parseObject(content);
- Double num1 = jsonObject.getDouble("deductionAmount");
+ Double num1 = jsonObject.getDouble("conditionalAmount");
if(num1==null){
num1=0d;
}
- if(price.compareTo(num1) <= 0){
+ if(price.compareTo(num1) < 0){
continue;
}
couponListVo.setUseCondition("");
diff --git a/cloud-server-course/src/main/java/com/dsh/course/controller/PostCourseVideoController.java b/cloud-server-course/src/main/java/com/dsh/course/controller/PostCourseVideoController.java
index d821eae..2e190e8 100644
--- a/cloud-server-course/src/main/java/com/dsh/course/controller/PostCourseVideoController.java
+++ b/cloud-server-course/src/main/java/com/dsh/course/controller/PostCourseVideoController.java
@@ -63,9 +63,11 @@
longs.add(coursePackageStudent.getCoursePackageSchedulingId());
}
System.out.println("======longs========"+longs);
- List<CoursePackageScheduling> coursePackageSchedulings = coursePackageSchedulingService.list(new QueryWrapper<CoursePackageScheduling>().in("id",longs).isNotNull("courseId"));
+// List<CoursePackageScheduling> coursePackageSchedulings = coursePackageSchedulingService.list(new QueryWrapper<CoursePackageScheduling>().in("id",longs).isNotNull("courseId"));
List<AppUserVideoResponse> coursePackageSchedulings1 = coursePackageSchedulingService.queryAll(longs);
+
+ if (coursePackageSchedulings1!=null){
for (AppUserVideoResponse appUserVideoResponse : coursePackageSchedulings1) {
ExerciseVideo exerciseVideo = new ExerciseVideo();
exerciseVideo.setVideoId(appUserVideoResponse.getVideoId());
@@ -76,7 +78,7 @@
}
-
+}
// return pcvService.queryCourseOfVideos(coursePackIds);
return exerciseVideoList;
diff --git a/cloud-server-course/src/main/java/com/dsh/course/service/impl/CoursePackageSchedulingServiceImpl.java b/cloud-server-course/src/main/java/com/dsh/course/service/impl/CoursePackageSchedulingServiceImpl.java
index bc1287d..9d43184 100644
--- a/cloud-server-course/src/main/java/com/dsh/course/service/impl/CoursePackageSchedulingServiceImpl.java
+++ b/cloud-server-course/src/main/java/com/dsh/course/service/impl/CoursePackageSchedulingServiceImpl.java
@@ -139,21 +139,23 @@
@Override
public List<AppUserVideoResponse> queryAll(List<Long> longs) {
- List<AppUserVideoResponse> appUserVideoResponses = this.baseMapper.queryAll(longs);
- for (AppUserVideoResponse appUserVideoRespon : appUserVideoResponses) {
- if (appUserVideoRespon.getVideoId() != null) {
- if (this.baseMapper.isHave(appUserVideoRespon.getVideoId()) > 0) {
- appUserVideoRespon.setStudyStatus(1);
- } else {
- appUserVideoRespon.setStudyStatus(0);
+ if (longs.size()>0) {
+ List<AppUserVideoResponse> appUserVideoResponses = this.baseMapper.queryAll(longs);
+
+ for (AppUserVideoResponse appUserVideoRespon : appUserVideoResponses) {
+ if (appUserVideoRespon.getVideoId() != null) {
+ if (this.baseMapper.isHave(appUserVideoRespon.getVideoId()) > 0) {
+ appUserVideoRespon.setStudyStatus(1);
+ } else {
+ appUserVideoRespon.setStudyStatus(0);
+ }
}
}
- }
-
+
return appUserVideoResponses;
-
-
+
+ }else return null;
}
}
diff --git a/cloud-server-course/src/main/resources/mapper/CoursePackageSchedulingMapper.xml b/cloud-server-course/src/main/resources/mapper/CoursePackageSchedulingMapper.xml
index fba850a..b8daa9b 100644
--- a/cloud-server-course/src/main/resources/mapper/CoursePackageSchedulingMapper.xml
+++ b/cloud-server-course/src/main/resources/mapper/CoursePackageSchedulingMapper.xml
@@ -34,10 +34,13 @@
SELECT cs.courseId as videoId,cs.coursePackageId as coursePackageId,tc.coverDrawing,tc.name as videoName,tc.introduce as synopsis,cs.integral,tc.courseVideo as courseVideo
FROM t_course_package_scheduling cs
LEFT JOIN t_course tc ON cs.courseId = tc.id
- WHERE cs.courseId IS NOT NULL and cs.id in
- <foreach collection="longs" item="item" open="(" close=")" separator=",">
- #{item}
- </foreach>
+ WHERE cs.courseId IS NOT NULL
+ <if test="longs != null">
+ AND cs.id IN
+ <foreach collection="longs" item="item" open="(" close=")" separator=",">
+ #{item}
+ </foreach>
+ </if>
</select>
<select id="isHave" resultType="int">
diff --git a/cloud-server-management/src/main/webapp/WEB-INF/view/system/ball/registerList.html b/cloud-server-management/src/main/webapp/WEB-INF/view/system/ball/registerList.html
new file mode 100644
index 0000000..27227f7
--- /dev/null
+++ b/cloud-server-management/src/main/webapp/WEB-INF/view/system/ball/registerList.html
@@ -0,0 +1,507 @@
+<!DOCTYPE html>
+<html lang="zh">
+<head>
+ <meta charset="UTF-8" />
+ <title>amis demo</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <meta
+ name="viewport"
+ content="width=device-width, initial-scale=1, maximum-scale=1"
+ />
+ <meta http-equiv="X-UA-Compatible" content="IE=Edge" />
+ <link rel="stylesheet" href="${ctxPath}/sdk/sdk.css" />
+ <link rel="stylesheet" href="${ctxPath}/sdk/helper.css" />
+ <link rel="stylesheet" href="${ctxPath}/sdk/iconfont.css" />
+ <!-- 这是默认主题所需的,如果是其他主题则不需要 -->
+ <!-- 从 1.1.0 开始 sdk.css 将不支持 IE 11,如果要支持 IE11 请引用这个 css,并把前面那个删了 -->
+ <!-- <link rel="stylesheet" href="sdk-ie11.css" /> -->
+ <!-- 不过 amis 开发团队几乎没测试过 IE 11 下的效果,所以可能有细节功能用不了,如果发现请报 issue -->
+ <style>
+ html,
+ body,
+ .app-wrapper {
+ position: relative;
+ width: 100%;
+ height: 100%;
+ margin: 0;
+ padding: 0;
+ }
+ </style>
+</head>
+<body>
+<div id="root" class="app-wrapper"></div>
+<script src="${ctxPath}/sdk/sdk.js"></script>
+<script type="text/javascript">
+ (function () {
+ let amis = amisRequire('amis/embed');
+ // 通过替换下面这个配置来生成不同页面
+ let amisJSON = {
+ "type": "page",
+ "title": "",
+ "regions": [
+ "body",
+ "toolbar",
+ "header"
+ ],
+ "body": [
+ {
+ "type": "crud",
+ "id": "u:e103c7434df8",
+ "syncLocation": false,
+ "api": {
+ "method": "post",
+ "url": "/ball/getRegisterList",
+ "messages": {
+ }
+ },
+ "columns": [
+ {
+ "label": "所在市",
+ "type": "text",
+ "name": "city",
+ "id": "u:71aded278293"
+ },
+ {
+ "label": "管理员姓名",
+ "type": "text",
+ "name": "adminName",
+ "id": "u:22cab5368b85",
+ "classNameExpr": "<%= data.courseName === '总计' ? 'bg-danger' : '' %>",
+ "placeholder": "-"
+ },
+ {
+ "label": "管理员手机号",
+ "type": "text",
+ "name": "adminPhone",
+ "id": "u:100d93c3a7af",
+ "classNameExpr": "<%= data.courseName === '总计' ? 'bg-danger' : '' %>",
+ "placeholder": "-"
+ },
+ {
+ "label": "认证平台",
+ "type": "mapping",
+ "name": "ptType",
+ "id": "u:0529135bd40c",
+ "placeholder": "-",
+ "map": {
+ "1": "支付宝",
+ "2": "微信"
+ }
+ },
+ {
+ "label": "认证类型",
+ "type": "mapping",
+ "name": "regisType",
+ "id": "u:89e54c565da1",
+ "placeholder": "-",
+ "map": {
+ "1": "法人",
+ "2": "个人"
+ }
+ },
+ {
+ "label": "分账比例",
+ "type": "text",
+ "name": "percent",
+ "id": "u:9f3c838b4dce",
+ "placeholder": "-",
+ "classNameExpr": "<%= data.courseName === '总计' ? 'bg-danger' : '' %>"
+ },
+ {
+ "type": "mapping",
+ "name": "isPass",
+ "label": "审核状态",
+ "id": "u:89e54c565da1",
+ "placeholder": "-",
+ "map": {
+ "1": "待审核",
+ "2": "审核中",
+ "3": "已通过",
+ "4": "已拒绝"
+ }
+ },
+ {
+ "type": "operation",
+ "id": "u:d69a8d60da29",
+ "buttons": [
+ {
+ "type": "button",
+ "label": "详情",
+ "onEvent": {
+ "click": {
+ "actions": [
+ {
+ "args": {
+ "options": {
+ "silent": false
+ },
+ "api": {
+ "url": "/ball/toRegister/$id",
+ "method": "get"
+ }
+ },
+ "actionType": "ajax"
+ }
+ ]
+ }
+ },
+ "id": "u:ed2016be790a",
+ "class": "link",
+ "level": "link"
+ }
+ ]
+ }
+ ],
+ "bulkActions": [
+ {
+ "type": "button",
+ "level": "danger",
+ "label": "批量删除",
+ "actionType": "ajax",
+ "confirmText": "确定要删除?",
+ "api": "/xxx/batch-delete",
+ "id": "u:e179a3daeee8"
+ },
+ {
+ "type": "button",
+ "label": "批量编辑",
+ "actionType": "dialog",
+ "dialog": {
+ "title": "批量编辑",
+ "size": "md",
+ "body": {
+ "type": "form",
+ "api": "/xxx/bacth-edit",
+ "body": [
+ {
+ "label": "字段1",
+ "text": "字段1",
+ "type": "input-text"
+ }
+ ]
+ }
+ },
+ "id": "u:4bbe1e5df5ed"
+ }
+ ],
+ "itemActions": [
+ {
+ "label": "分账比例",
+ "type": "button",
+ "id": "u:0120816fbcb0",
+ "level": "info",
+ "onEvent": {
+ "click": {
+ "actions": [
+ {
+ "args": {
+ },
+ "dialog": {
+ "type": "dialog",
+ "title": "弹框标题",
+ "body": [
+ {
+ "type": "form",
+ "title": "表单",
+ "body": [
+ {
+ "label": "测试分账id",
+ "type": "input-text",
+ "name": "id",
+ "id": "u:64ad701b83c3"
+ },
+ {
+ "label": "支付宝分账比例",
+ "type": "input-text",
+ "name": "ali",
+ "id": "u:91534896ba54"
+ },
+ {
+ "label": "微信分账比例",
+ "type": "input-text",
+ "name": "text",
+ "id": "u:4649d90555b1"
+ }
+ ],
+ "api": {
+ "url": "/ball/resSet",
+ "method": "get"
+ },
+ "id": "u:01f28ccf4fb8"
+ }
+ ],
+ "showCloseButton": true,
+ "showErrorMsg": true,
+ "showLoading": true,
+ "id": "u:073191c211be"
+ },
+ "actionType": "dialog"
+ }
+ ],
+ "weight": 0
+ }
+ }
+ }
+ ],
+ "filterSettingSource": [
+ "id",
+ "customerName",
+ "simName",
+ "address",
+ "industryId",
+ "email",
+ "createBy",
+ "updateBy",
+ "remark",
+ "customerCode"
+ ],
+ "features": [
+ "create",
+ "filter",
+ "bulkDelete",
+ "view",
+ "delete",
+ "update",
+ "bulkUpdate"
+ ],
+ "filterColumnCount": 3,
+ "filterEnabledList": [
+ ],
+ "headerToolbar": [
+ {
+ "label": "新增",
+ "type": "button",
+ "actionType": "dialog",
+ "level": "primary",
+ "dialog": {
+ "title": "新增",
+ "body": {
+ "type": "form",
+ "api": {
+ "method": "post",
+ "url": "/ball/getRegisterList",
+ "messages": {
+ }
+ },
+ "body": [
+ {
+ "type": "input-text",
+ "name": "city",
+ "label": "所在市"
+ },
+ {
+ "type": "input-text",
+ "name": "adminName",
+ "label": "管理员姓名"
+ },
+ {
+ "type": "input-text",
+ "name": "adminPhone",
+ "label": "管理员手机号"
+ },
+ {
+ "type": "select",
+ "name": "ptType",
+ "label": "认证平台"
+ },
+ {
+ "type": "select",
+ "name": "regisType",
+ "label": "认证类型"
+ },
+ {
+ "type": "input-text",
+ "name": "percent",
+ "label": "分账比例"
+ },
+ {
+ "type": "select",
+ "name": "isPass",
+ "label": "审核状态"
+ },
+ {
+ "type": "input-operation"
+ }
+ ]
+ }
+ },
+ "id": "u:7ab8ef9ba27f"
+ },
+ "bulkActions"
+ ],
+ "filter": {
+ "title": "查询条件",
+ "columnCount": 3,
+ "mode": "horizontal",
+ "body": [
+ {
+ "type": "input-city",
+ "label": "城市选择",
+ "name": "cityCode",
+ "allowDistrict": false,
+ "id": "u:16db9fd9fe42",
+ "mode": "horizontal",
+ "horizontal": {
+ "left": 3,
+ "right": 9
+ },
+ "className": ""
+ },
+ // {
+ // "type": "select",
+ // "label": "客户简称",
+ // "name": "simName",
+ // "id": "u:1942896a0f61",
+ // "multiple": false,
+ // "source": {
+ // "url": "/api/v1/rep/cus/getselect",
+ // "method": "get",
+ // "messages": {
+ // }
+ // },
+ // "labelField": "simName",
+ // "valueField": "simName",
+ // "searchable": true
+ // },
+ {
+ "type": "input-date-range",
+ "label": "日期范围",
+ "name": "times",
+ "id": "u:5ea0ab341c9e",
+ "embed": false,
+ "format": "YYYY-MM-DD",
+ "inputFormat": "YYYY-MM-DD"
+ },
+ {
+ "type": "input-text",
+ "label": "管理员姓名",
+ "name": "adminName",
+ "id": "u:528726820775"
+ },
+ {
+ "type": "select",
+ "label": "认证平台",
+ "name": "ptType",
+ "options": [
+ {
+ "label": "全部",
+ "value": ""
+ },
+ {
+ "label": "支付宝",
+ "value": "1"
+ },
+ {
+ "label": "微信",
+ "value": "2"
+ }
+ ],
+ "id": "u:3f0a0a09ae17",
+ "multiple": false
+ },
+ {
+ "type": "select",
+ "label": "认证类型",
+ "name": "regisType",
+ "options": [
+ {
+ "label": "全部",
+ "value": "全部"
+ },
+ {
+ "label": "法人",
+ "value": "1"
+ },
+ {
+ "label": "个人",
+ "value": "2"
+ }
+ ],
+ "id": "u:62ad230ae3e4",
+ "multiple": false
+ },
+ {
+ "type": "select",
+ "label": "审核状态",
+ "name": "isPass",
+ "options": [
+ {
+ "label": "全部",
+ "value": "全部"
+ },
+ {
+ "label": "待审核",
+ "value": "1"
+ },
+ {
+ "label": "审核中",
+ "value": "2"
+ },
+ {
+ "label": "已通过",
+ "value": "3"
+ },
+ {
+ "label": "已拒绝",
+ "value": "4"
+ }
+ ],
+ "id": "u:b5833dda16af",
+ "multiple": false
+ }
+ ],
+ "id": "u:2c92f31a25d0",
+ "name": "select1",
+ "rules": [
+ ]
+ },
+ "perPageAvailable": [
+ 10,
+ 20,
+ 50,
+ 100
+ ],
+ "messages": {
+ },
+ "footerToolbar": [
+ {
+ "type": "statistics",
+ "align": "left"
+ },
+ {
+ "type": "pagination",
+ "align": "left"
+ },
+ {
+ "type": "switch-per-page",
+ "tpl": "内容",
+ "align": "left"
+ }
+ ],
+ "columnsTogglable": "auto",
+ "pageField": "",
+ "perPageField": "",
+ "alwaysShowPagination": true,
+ "loadDataOnce": true,
+ "perPage": 5,
+ "combineNum": 3
+ }
+ ],
+ "id": "u:b14a93e2aeb3"
+ };
+
+ let amisScoped = amis.embed('#root', amisJSON);
+
+
+ })();
+
+ function test(){
+ console.log("测试成功")
+ }
+
+ var myButton = document.getElementById("ttt");
+ myButton.addEventListener("click",test);
+</script>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/cloud-server-other/src/main/java/com/dsh/other/controller/SiteController.java b/cloud-server-other/src/main/java/com/dsh/other/controller/SiteController.java
index a04ed24..19817df 100644
--- a/cloud-server-other/src/main/java/com/dsh/other/controller/SiteController.java
+++ b/cloud-server-other/src/main/java/com/dsh/other/controller/SiteController.java
@@ -35,6 +35,7 @@
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.PrintWriter;
+import java.text.SimpleDateFormat;
import java.util.*;
import java.util.stream.Collectors;
@@ -404,6 +405,20 @@
List<Integer> ids = getIds(byId.getSiteId());
byId.setStorePhone(byId1.getPhone());
+
+ //拼接开始结束时间
+ Date startTime = byId.getStartTime();
+ Date endTime = byId.getEndTime();
+ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm");
+
+ String startTimeString = sdf.format(startTime);
+ String endTimeString = sdf.format(endTime);
+
+ String result = startTimeString + "-" + endTimeString.substring(11);
+ byId.setTimes(result);
+
+
+
byId.setSid(Arrays.asList(storeId));
List<Site> list = siteService.list(new LambdaQueryWrapper<Site>().eq(Site::getStoreId, storeId).eq(Site::getSign, 1));
--
Gitblit v1.7.1