nickchange
2023-10-13 c47638e00386a5a5d1f729aca4d5b0aad7f2678d
10.13bug
12个文件已修改
6个文件已添加
460 ■■■■■ 已修改文件
cloud-server-account/src/main/java/com/dsh/account/controller/AppUserController.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cloud-server-account/src/main/java/com/dsh/account/controller/StudentController.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cloud-server-account/src/main/java/com/dsh/account/mapper/TStudentMapper.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cloud-server-account/src/main/java/com/dsh/account/service/TStudentService.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cloud-server-account/src/main/java/com/dsh/account/service/impl/TAppUserServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
cloud-server-account/src/main/java/com/dsh/account/service/impl/TStudentServiceImpl.java 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cloud-server-account/src/main/resources/mapper/TStudentMapper.xml 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cloud-server-course/src/main/java/com/dsh/course/controller/CoursePackagePaymentController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
cloud-server-management/src/main/java/com/dsh/course/entity/EvaluateStudent.java 73 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cloud-server-management/src/main/java/com/dsh/course/feignClient/account/StudentClient.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cloud-server-management/src/main/java/com/dsh/course/mapper/EvaluateStudentMapper.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/system/TStudentController.java 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cloud-server-management/src/main/java/com/dsh/guns/modular/system/service/EvaluateStudentService.java 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cloud-server-management/src/main/java/com/dsh/guns/modular/system/service/impl/EvaluateStudentServiceImpl.java 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cloud-server-management/src/main/webapp/WEB-INF/view/system/tStudent/tStudent.html 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cloud-server-management/src/main/webapp/WEB-INF/view/system/tStudent/tStudent_commite.html 65 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cloud-server-management/src/main/webapp/static/modular/system/tStudent/tStudent.js 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cloud-server-management/src/main/webapp/static/modular/system/tStudent/tStudent_commite.js 144 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cloud-server-account/src/main/java/com/dsh/account/controller/AppUserController.java
@@ -282,6 +282,7 @@
            @ApiImplicitParam(name = "Authorization", value = "用户token(Bearer +token)", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....")
    })
    public ResultUtil<JoinPlayPaiVo> queryJoinPlayPai(String lon, String lat){
        try {
            Integer uid = tokenUtil.getUserIdFormRedis();
            if(null == uid){
cloud-server-account/src/main/java/com/dsh/account/controller/StudentController.java
@@ -81,6 +81,16 @@
        }
    }
    @ResponseBody
    @PostMapping("/student/queryStudentCom")
    public  List<Map<String, Object>> queryStudentCom(@RequestBody Integer id){
        List<Map<String, Object>> list = studentService.queryCom(id);
            return list;
    }
    @ResponseBody
cloud-server-account/src/main/java/com/dsh/account/mapper/TStudentMapper.java
@@ -8,6 +8,7 @@
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
/**
@@ -32,4 +33,6 @@
    Integer getGiftSelect(@Param("giftSearchDto")GiftSearchDto giftSearchDto);
    List<Map<String, Object>> queryCom(@Param("id") Integer id);
}
cloud-server-account/src/main/java/com/dsh/account/service/TStudentService.java
@@ -23,6 +23,7 @@
import com.dsh.account.util.ResultUtil;
import java.util.List;
import java.util.Map;
/**
 * <p>
@@ -113,4 +114,6 @@
    Integer getGiftSelect(GiftSearchDto giftSearchDto);
    List<Map<String, Object>> queryCom(Integer id);
}
cloud-server-account/src/main/java/com/dsh/account/service/impl/TAppUserServiceImpl.java
@@ -616,7 +616,7 @@
            for (Store store : stores) {
                Map<String, Double> distance = GeodesyUtil.getDistance(lon + "," + lat, store.getLon() + "," + store.getLat());
                Double wgs84 = distance.get("WGS84");
                if(s == null || d.compareTo(wgs84) < 0){
                if(s == null || d>wgs84){
                    s = store;
                    d = wgs84;
                }
cloud-server-account/src/main/java/com/dsh/account/service/impl/TStudentServiceImpl.java
@@ -844,7 +844,10 @@
        return this.baseMapper.getGiftSelect(giftSearchDto);
    }
    @Override
    public List<Map<String, Object>> queryCom(Integer id) {
        return this.baseMapper.queryCom(id);
    }
}
cloud-server-account/src/main/resources/mapper/TStudentMapper.xml
@@ -77,4 +77,22 @@
            WHERE name = #{giftSearchDto.name}
              AND phone = #{giftSearchDto.phone}
    </select>
    <select id="queryCom" resultType="java.util.Map">
        SELECT
            es.id as id ,tc.name,es.content,es.insertTime
        FROM
            t_evaluate_student es
                left JOIN t_student ts on es.studentId = ts.id
                LEFT JOIN t_coach tc on es.coachId = tc.id
        where es.studentId = #{id}
    </select>
</mapper>
cloud-server-course/src/main/java/com/dsh/course/controller/CoursePackagePaymentController.java
@@ -1472,7 +1472,7 @@
            String time1 = courseDetailReq.getTime();
            // 找出门店的所有课程 排出体验
            List<TCoursePackage> list = tcpService.list(new LambdaQueryWrapper<TCoursePackage>().eq(TCoursePackage::getStoreId, courseDetailReq.getStoreId()).ne(TCoursePackage::getType, 3).like(TCoursePackage::getClassWeeks,week));
            List<TCoursePackage> list = tcpService.list(new LambdaQueryWrapper<TCoursePackage>().eq(TCoursePackage::getStoreId, courseDetailReq.getStoreId()).ne(TCoursePackage::getType, 3).eq(TCoursePackage::getState,1).like(TCoursePackage::getClassWeeks,week));
            List<Integer> collect = list.stream().map(TCoursePackage::getId).collect(Collectors.toList());
            if(collect.size()==0){
                collect.add(-1);
cloud-server-management/src/main/java/com/dsh/course/entity/EvaluateStudent.java
New file
@@ -0,0 +1,73 @@
package com.dsh.course.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.util.Date;
import java.io.Serializable;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
 * <p>
 * 评价学员记录
 * </p>
 *
 * @author jqs
 * @since 2023-07-03
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_evaluate_student")
public class EvaluateStudent extends Model<EvaluateStudent> {
    private static final long serialVersionUID = 1L;
    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    /**
     * 教练id
     */
    @TableField("coachId")
    private Integer coachId;
    /**
     * 学员id
     */
    @TableField("studentId")
    private Integer studentId;
    /**
     * 评语
     */
    @TableField("content")
    private String content;
    /**
     * 图片
     */
    @TableField("imgs")
    private String imgs;
    /**
     * 状态(1=正常,2=冻结,3=删除)
     */
    @TableField("state")
    private Integer state;
    /**
     * 添加时间
     */
    @TableField("insertTime")
    private Date insertTime;
    @Override
    protected Serializable pkVal() {
        return this.id;
    }
}
cloud-server-management/src/main/java/com/dsh/course/feignClient/account/StudentClient.java
@@ -15,6 +15,7 @@
import org.springframework.web.bind.annotation.*;
import java.util.List;
import java.util.Map;
@FeignClient("mb-cloud-account")
public interface StudentClient {
@@ -33,4 +34,8 @@
     */
    @RequestMapping("/base/student/addStudent")
    Object addStudent(@RequestBody TStudent student);
    @PostMapping("/student/queryStudentCom")
    List<Map<String, Object>> listCom(@RequestBody Integer id);
}
cloud-server-management/src/main/java/com/dsh/course/mapper/EvaluateStudentMapper.java
New file
@@ -0,0 +1,16 @@
package com.dsh.course.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dsh.course.entity.EvaluateStudent;
/**
 * <p>
 * 评价学员记录 Mapper 接口
 * </p>
 *
 * @author jqs
 * @since 2023-07-03
 */
public interface EvaluateStudentMapper extends BaseMapper<EvaluateStudent> {
}
cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/system/TStudentController.java
@@ -3,6 +3,7 @@
import com.dsh.course.dto.*;
import com.dsh.course.feignClient.account.AppUserClient;
import com.dsh.course.feignClient.account.StudentClient;
import com.dsh.course.feignClient.account.model.TAppUser;
import com.dsh.course.feignClient.course.CoursePackageClient;
import com.dsh.course.feignClient.course.CourseStuddentClient;
@@ -20,6 +21,7 @@
import com.dsh.guns.modular.system.model.TStudent;
import com.dsh.guns.modular.system.model.User;
import com.dsh.guns.modular.system.model.dto.*;
import com.dsh.guns.modular.system.service.EvaluateStudentService;
import com.dsh.guns.modular.system.service.ITStudentService;
import com.dsh.guns.modular.system.util.BigDecimalToChineseAmountUtil;
import com.dsh.guns.modular.system.util.ResultUtil;
@@ -302,6 +304,18 @@
    }
    @Autowired
    private EvaluateStudentService evalstuService;
    @RequestMapping("/tStudent_commite/{tStudentId}")
    public String tStudent_commite(@PathVariable("tStudentId") Integer tStudentId, Model model) {
        model.addAttribute("id",tStudentId);
        return PREFIX + "tStudent_commite.html";
    }
//
@@ -330,6 +344,29 @@
        return itStudentService.listAll(search);
    }
    @Autowired
    private  EvaluateStudentService evaluateStudentService;
    @Resource
    private StudentClient studentClient;
    /**
     * 获取列表
     */
    @RequestMapping("/listcom/{id}")
    @ResponseBody
    public List<Map<String,Object>> listcom(@PathVariable("id") Integer id) {
        List<Map<String,Object>> maps =   studentClient.listCom(id);
        return maps;
    }
    /**
     * 获取列表
     */
cloud-server-management/src/main/java/com/dsh/guns/modular/system/service/EvaluateStudentService.java
New file
@@ -0,0 +1,22 @@
package com.dsh.guns.modular.system.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.dsh.course.entity.EvaluateStudent;
import java.util.List;
import java.util.Map;
/**
 * <p>
 * 评价学员记录 服务类
 * </p>
 *
 * @author jqs
 * @since 2023-07-03
 */
public interface EvaluateStudentService extends IService<EvaluateStudent> {
}
cloud-server-management/src/main/java/com/dsh/guns/modular/system/service/impl/EvaluateStudentServiceImpl.java
New file
@@ -0,0 +1,35 @@
package com.dsh.guns.modular.system.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.dsh.course.entity.EvaluateStudent;
import com.dsh.course.mapper.EvaluateStudentMapper;
import com.dsh.course.mapper.TStudentMapper;
import com.dsh.guns.modular.system.service.EvaluateStudentService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
/**
 * <p>
 * 评价学员记录 服务实现类
 * </p>
 *
 * @author jqs
 * @since 2023-07-03
 */
@Service
public class EvaluateStudentServiceImpl extends ServiceImpl<EvaluateStudentMapper, EvaluateStudent> implements EvaluateStudentService {
    @Resource
    private TStudentMapper tstuMapper;
    private final SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm");
}
cloud-server-management/src/main/webapp/WEB-INF/view/system/tStudent/tStudent.html
@@ -35,6 +35,7 @@
                                <#button name="修改" icon="fa-edit" clickFun="TStudent.openTStudentDetail()" space="true"/>
                            <#button name="查看详情" icon="fa-edit" clickFun="TStudent.openTStudentDetail1()" space="true"/>
                            <#button name="学员评语" icon="fa-edit" clickFun="TStudent.openTStudentDetail2()" space="true"/>
                            @if(shiro.hasPermission("/tStudent/delete")){
                                <#button name="删除" icon="fa-remove" clickFun="TStudent.delete()" space="true"/>
cloud-server-management/src/main/webapp/WEB-INF/view/system/tStudent/tStudent_commite.html
New file
@@ -0,0 +1,65 @@
@layout("/common/_container.html"){
<div class="row" id = "ttt">
    <div class="col-sm-12">
        <div class="ibox float-e-margins">
            <div class="ibox-title">
                <h5>管理</h5>
            </div>
            <div class="ibox-content">
                <input type="hidden" id="id" value="${id}">
                <div class="row row-lg">
                    <div class="col-sm-12">
                        <div class="row">
                            <div class="col-sm-3">
                                <#NameCon id="province" name="省份" />
                            </div>
                            <div class="col-sm-3">
                                <#NameCon id="city" name="城市" />
                            </div>
                            <div class="col-sm-3">
                                <#NameCon id="name" name="姓名" />
                            </div>
                            <div class="col-sm-3">
                                <#NameCon id="phone" name="联系电话" />
                            </div>
                            <div class="col-sm-3">
                                <#NameCon id="userName" name="所属用户" />
                            </div>
                            <div class="col-sm-3">
                                <#button name="搜索" icon="fa-search" clickFun="TStudent.search()"/>
                            </div>
                        </div>
                        <div class="hidden-xs" id="TStudentTableToolbar" role="group">
                            @if(shiro.hasPermission("/tStudent/add")){
                                <#button name="添加" icon="fa-plus" clickFun="TStudent.openAddTStudent()"/>
                            @}
                                <#button name="修改" icon="fa-edit" clickFun="TStudent.openTStudentDetail()" space="true"/>
                            <#button name="查看详情" icon="fa-edit" clickFun="TStudent.openTStudentDetail1()" space="true"/>
                            <#button name="查看详情" icon="fa-edit" clickFun="TStudent.openTStudentDetail2()" space="true"/>
                            @if(shiro.hasPermission("/tStudent/delete")){
                                <#button name="删除" icon="fa-remove" clickFun="TStudent.delete()" space="true"/>
                            @}
<!--                            <button id="exportButton">TTTTTTTTTT</button>-->
                        </div>
                        <#table id="TStudentTable"/>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script src="${ctxPath}/modular/system/tStudent/tStudent_commite.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/2.4.0/jspdf.umd.min.js">
</script>
<script>
    document.getElementById('exportButton').addEventListener('click', function() {
        console.log("==============>")
        var doc = new jsPDF();
        var content = document.getElementById('ttt').innerHTML;
        doc.text(content, 10, 10);
        doc.save('export.pdf');
    });
</script>
@}
cloud-server-management/src/main/webapp/static/modular/system/tStudent/tStudent.js
@@ -129,6 +129,24 @@
};
/**
 * 学员管理
 */
TStudent.openTStudentDetail2 = function () {
    if (this.check()) {
        var index = layer.open({
            type: 2,
            title: '详情',
            area: ['100%', '100%'],  //宽高
            fix: false, //不固定
            maxmin: true,
            content: Feng.ctxPath + '/tStudent/tStudent_commite/' + TStudent.seItem.id
        });
        this.layerIndex = index;
    }
};
/**
 * 删除
cloud-server-management/src/main/webapp/static/modular/system/tStudent/tStudent_commite.js
New file
@@ -0,0 +1,144 @@
/**
 * 管理初始化
 */
var TStudent = {
    id: "TStudentTable",    //表格id
    seItem: null,        //选中的条目
    table: null,
    layerIndex: -1
};
/**
 * 初始化表格的列
 */
TStudent.initColumn = function () {
    return [
        {field: 'selectItem', radio: true},
            {title: '主键', field: 'id', visible: false, align: 'center', valign: 'middle'},
            {title: '添加时间', field: 'insertTime', visible: true, align: 'center', valign: 'middle'},
            {title: '评论老师', field: 'name', visible: true, align: 'center', valign: 'middle'},
            {title: '评价内容', field: 'content', visible: true, align: 'center', valign: 'middle'}
    ];
};
/**
 * 检查是否选中
 */
TStudent.check = function () {
    var selected = $('#' + this.id).bootstrapTable('getSelections');
    if(selected.length == 0){
        Feng.info("请先选中表格中的某一记录!");
        return false;
    }else{
        TStudent.seItem = selected[0];
        return true;
    }
};
/**
 * 点击添加
 */
TStudent.openAddTStudent = function () {
    var index = layer.open({
        type: 2,
        title: '添加',
        area: ['800px', '420px'], //宽高
        fix: false, //不固定
        maxmin: true,
        content: Feng.ctxPath + '/tStudent/tStudent_add'
    });
    this.layerIndex = index;
};
/**
 * 打开修改
 */
TStudent.openTStudentDetail = function () {
    if (this.check()) {
        var index = layer.open({
            type: 2,
            title: '详情',
            area: ['100%', '100%'],  //宽高
            fix: false, //不固定
            maxmin: true,
            content: Feng.ctxPath + '/tStudent/tStudent_update/' + TStudent.seItem.id
        });
        this.layerIndex = index;
    }
};
/**
 * 打开详情
 */
TStudent.openTStudentDetail1 = function () {
    if (this.check()) {
        var index = layer.open({
            type: 2,
            title: '详情',
            area: ['100%', '100%'],  //宽高
            fix: false, //不固定
            maxmin: true,
            content: Feng.ctxPath + '/tStudent/tStudent_info/' + TStudent.seItem.id
        });
        this.layerIndex = index;
    }
};
/**
 * 学员管理
 */
TStudent.openTStudentDetail2 = function () {
    if (this.check()) {
        var index = layer.open({
            type: 2,
            title: '详情',
            area: ['100%', '100%'],  //宽高
            fix: false, //不固定
            maxmin: true,
            content: Feng.ctxPath + '/tStudent/tStudent_commite/' + TStudent.seItem.id
        });
        this.layerIndex = index;
    }
};
/**
 * 删除
 */
TStudent.delete = function () {
    if (this.check()) {
        var ajax = new $ax(Feng.ctxPath + "/tStudent/delete", function (data) {
            Feng.success("删除成功!");
            TStudent.table.refresh();
        }, function (data) {
            Feng.error("删除失败!" + data.responseJSON.message + "!");
        });
        ajax.set("tStudentId",this.seItem.id);
        ajax.start();
    }
};
/**
 * 查询列表
 */
TStudent.search = function () {
    var queryData = {};
    queryData['province'] = $("#province").val();
    queryData['city'] = $("#city").val();
    queryData['name'] = $("#name").val();
    queryData['userName'] = $("#userName").val();
    queryData['phone'] = $("#phone").val();
    TStudent.table.refresh({query: queryData});
};
$(function () {
    var defaultColunms = TStudent.initColumn();
    var table = new BSTable(TStudent.id, "/tStudent/listcom/"+$("#id").val(), defaultColunms);
    table.setPaginationType("client");
    TStudent.table = table.init();
});