| | |
| | | @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){ |
| | |
| | | } |
| | | } |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/student/queryStudentCom") |
| | | public List<Map<String, Object>> queryStudentCom(@RequestBody Integer id){ |
| | | |
| | | List<Map<String, Object>> list = studentService.queryCom(id); |
| | | return list; |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | @ResponseBody |
| | |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | |
| | | /** |
| | |
| | | |
| | | |
| | | Integer getGiftSelect(@Param("giftSearchDto")GiftSearchDto giftSearchDto); |
| | | |
| | | List<Map<String, Object>> queryCom(@Param("id") Integer id); |
| | | } |
| | |
| | | import com.dsh.account.util.ResultUtil; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | |
| | | |
| | | Integer getGiftSelect(GiftSearchDto giftSearchDto); |
| | | |
| | | List<Map<String, Object>> queryCom(Integer id); |
| | | } |
| | |
| | | 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; |
| | | } |
| | |
| | | return this.baseMapper.getGiftSelect(giftSearchDto); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> queryCom(Integer id) { |
| | | return this.baseMapper.queryCom(id); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | 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> |
| | |
| | | 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); |
New file |
| | |
| | | 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; |
| | | } |
| | | |
| | | } |
| | |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @FeignClient("mb-cloud-account") |
| | | public interface StudentClient { |
| | |
| | | */ |
| | | @RequestMapping("/base/student/addStudent") |
| | | Object addStudent(@RequestBody TStudent student); |
| | | |
| | | |
| | | @PostMapping("/student/queryStudentCom") |
| | | List<Map<String, Object>> listCom(@RequestBody Integer id); |
| | | } |
New file |
| | |
| | | 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> { |
| | | |
| | | } |
| | |
| | | |
| | | 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; |
| | |
| | | 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; |
| | |
| | | } |
| | | |
| | | |
| | | @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"; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | // |
| | |
| | | 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; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取列表 |
| | | */ |
New file |
| | |
| | | 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> { |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | 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"); |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | <#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"/> |
New file |
| | |
| | | @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> |
| | | @} |
| | |
| | | }; |
| | | |
| | | |
| | | /** |
| | | * 学员管理 |
| | | */ |
| | | 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; |
| | | } |
| | | }; |
| | | |
| | | |
| | | |
| | | /** |
| | | * 删除 |
New file |
| | |
| | | /** |
| | | * 管理初始化 |
| | | */ |
| | | 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(); |
| | | }); |