Ver Fonte

管乐迷12月20号需求变更

zouxuan há 1 ano atrás
pai
commit
b652817a77
22 ficheiros alterados com 449 adições e 248 exclusões
  1. 8 0
      mec-application/src/main/java/com/ym/mec/student/controller/StudentManageController.java
  2. 24 15
      mec-application/src/main/java/com/ym/mec/web/controller/SysSuggestionController.java
  3. 82 0
      mec-application/src/main/java/com/ym/mec/web/controller/SysSuggestionTypeController.java
  4. 3 10
      mec-auth/mec-auth-server/src/main/java/com/ym/mec/auth/web/controller/UserController.java
  5. 3 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/StudentDao.java
  6. 5 1
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/SysSuggestionDao.java
  7. 9 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/SysSuggestionTypeDao.java
  8. 6 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/dto/StudentLessonExaminationDetailDto.java
  9. 8 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/entity/StudentLessonExaminationDetail.java
  10. 29 80
      mec-biz/src/main/java/com/ym/mec/biz/dal/entity/SysSuggestion.java
  11. 48 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/entity/SysSuggestionType.java
  12. 4 88
      mec-biz/src/main/java/com/ym/mec/biz/dal/page/SysMusicCompareRecordQueryInfo.java
  13. 14 32
      mec-biz/src/main/java/com/ym/mec/biz/dal/page/SysSuggestionQueryInfo.java
  14. 3 0
      mec-biz/src/main/java/com/ym/mec/biz/service/SysSuggestionService.java
  15. 12 0
      mec-biz/src/main/java/com/ym/mec/biz/service/SysSuggestionTypeService.java
  16. 7 0
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/SysMusicCompareRecordServiceImpl.java
  17. 56 0
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/SysSuggesstionTypeServiceImpl.java
  18. 48 1
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/SysSuggestionServiceImpl.java
  19. 5 3
      mec-biz/src/main/resources/config/mybatis/StudentLessonExaminationDetailMapper.xml
  20. 14 0
      mec-biz/src/main/resources/config/mybatis/StudentMapper.xml
  21. 56 18
      mec-biz/src/main/resources/config/mybatis/SysSuggestionMapper.xml
  22. 5 0
      mec-biz/src/main/resources/config/mybatis/SysSuggestionTypeMapper.xml

+ 8 - 0
mec-application/src/main/java/com/ym/mec/student/controller/StudentManageController.java

@@ -25,6 +25,7 @@ import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.HttpStatus;
 import org.springframework.http.MediaType;
+import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.multipart.MultipartFile;
 
@@ -142,6 +143,13 @@ public class StudentManageController extends BaseController {
         return succeed();
     }
 
+    @ApiOperation(value = "获取详情")
+    @GetMapping("sysSuggestion/detail")
+    public HttpResponseResult<SysSuggestion> detail(Long id) {
+        return succeed(suggestionService.getDetail(id));
+    }
+
+
 
     @ApiOperation(value = "获取学员基本信息")
     @GetMapping("student/queryUserInfo")

+ 24 - 15
mec-application/src/main/java/com/ym/mec/web/controller/SysSuggestionController.java

@@ -1,18 +1,18 @@
 package com.ym.mec.web.controller;
 
-import com.ym.mec.auth.api.client.SysUserFeignService;
 import com.ym.mec.auth.api.entity.SysUser;
 import com.ym.mec.biz.dal.entity.SysSuggestion;
 import com.ym.mec.biz.dal.page.SysSuggestionQueryInfo;
 import com.ym.mec.biz.service.SysSuggestionService;
+import com.ym.mec.biz.service.SysUserService;
 import com.ym.mec.common.controller.BaseController;
+import com.ym.mec.common.entity.HttpResponseResult;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 
 @Api(tags = "意见反馈")
 @RestController
@@ -22,16 +22,13 @@ public class SysSuggestionController extends BaseController {
     @Autowired
     private SysSuggestionService sysSuggestionService;
     @Autowired
-    private SysUserFeignService sysUserFeignService;
+    private SysUserService sysUserService;
 
     @ApiOperation(value = "新增")
     @RequestMapping("sysSuggestion/add")
     @PreAuthorize("@pcs.hasPermissions('sysSuggestion/add')")
     public Object add(SysSuggestion sysSuggestion) {
-        SysUser sysUser = sysUserFeignService.queryUserInfo();
-        if (sysUser == null) {
-            return failed("用户信息获取失败");
-        }
+        SysUser sysUser = sysUserService.getUser();
         sysSuggestion.setUserId(sysUser.getId().longValue());
         sysSuggestion.setClientType("TEACHER");
         if(StringUtils.isEmpty(sysSuggestion.getMobileNo())){
@@ -44,10 +41,7 @@ public class SysSuggestionController extends BaseController {
     @ApiOperation(value = "新增")
     @RequestMapping("suggestion/add")
     public Object suggestionAdd(SysSuggestion sysSuggestion) {
-        SysUser sysUser = sysUserFeignService.queryUserInfo();
-        if (sysUser == null) {
-            return failed("用户信息获取失败");
-        }
+        SysUser sysUser = sysUserService.getUser();
         sysSuggestion.setUserId(sysUser.getId().longValue());
         sysSuggestion.setClientType("EDUCATION");
         if(StringUtils.isEmpty(sysSuggestion.getMobileNo())){
@@ -57,8 +51,23 @@ public class SysSuggestionController extends BaseController {
         return succeed();
     }
 
+    @ApiOperation(value = "获取详情")
+    @GetMapping("sysSuggestion/detail")
+    @PreAuthorize("@pcs.hasPermissions('sysSuggestion/detail')")
+    public HttpResponseResult<SysSuggestion> detail(Long id) {
+        return succeed(sysSuggestionService.getDetail(id));
+    }
+
+    @ApiOperation(value = "处理")
+    @PostMapping("sysSuggestion/dispose")
+    @PreAuthorize("@pcs.hasPermissions('sysSuggestion/dispose')")
+    public HttpResponseResult<Object> dispose(@RequestBody SysSuggestion sysSuggestion) {
+        sysSuggestionService.dispose(sysSuggestion);
+        return succeed();
+    }
+
     @ApiOperation(value = "删除")
-    @RequestMapping("sysSuggestion/del")
+    @GetMapping("sysSuggestion/del")
     @PreAuthorize("@pcs.hasPermissions('sysSuggestion/del')")
     public Object del(Long id) {
         sysSuggestionService.delete(id);
@@ -66,9 +75,9 @@ public class SysSuggestionController extends BaseController {
     }
 
     @ApiOperation(value = "分页查询")
-    @RequestMapping("sysSuggestion/queryPage")
+    @PostMapping("sysSuggestion/queryPage")
     @PreAuthorize("@pcs.hasPermissions('sysSuggestion/queryPage')")
-    public Object queryPage(SysSuggestionQueryInfo queryInfo) {
+    public Object queryPage(@RequestBody SysSuggestionQueryInfo queryInfo) {
         return succeed(sysSuggestionService.queryPage(queryInfo));
     }
 

+ 82 - 0
mec-application/src/main/java/com/ym/mec/web/controller/SysSuggestionTypeController.java

@@ -0,0 +1,82 @@
+package com.ym.mec.web.controller;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.microsvc.toolkit.common.webportal.exception.BizException;
+import com.ym.mec.auth.api.entity.SysUser;
+import com.ym.mec.biz.dal.dao.SysSuggestionDao;
+import com.ym.mec.biz.dal.entity.SysSuggestion;
+import com.ym.mec.biz.dal.entity.SysSuggestionType;
+import com.ym.mec.biz.dal.entity.TempLittleArtistTrainingCamp;
+import com.ym.mec.biz.dal.page.SysSuggestionQueryInfo;
+import com.ym.mec.biz.service.SysSuggestionService;
+import com.ym.mec.biz.service.SysSuggestionTypeService;
+import com.ym.mec.biz.service.SysUserService;
+import com.ym.mec.common.controller.BaseController;
+import com.ym.mec.common.entity.HttpResponseResult;
+import com.ym.mec.common.page.PageInfo;
+import com.ym.mec.common.page.PageUtil;
+import com.ym.mec.common.page.QueryInfo;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+@Api(tags = "意见反馈类型")
+@RestController
+@RequestMapping("${app-config.url.web:}/sysSuggestionType/")
+public class SysSuggestionTypeController extends BaseController {
+
+    @Autowired
+    private SysSuggestionTypeService sysSuggestionTypeService;
+    @Autowired
+    private SysSuggestionDao sysSuggestionDao;
+    @Autowired
+    private SysUserService sysUserService;
+
+    @ApiOperation(value = "新增")
+    @RequestMapping("add")
+    @PreAuthorize("@pcs.hasPermissions('sysSuggestionType/add')")
+    public Object add(SysSuggestionType suggestionType) {
+        if(StringUtils.isEmpty(suggestionType.getType())){
+            return failed("反馈类型不能为空");
+        }
+        SysSuggestionType one = sysSuggestionTypeService.lambdaQuery().eq(SysSuggestionType::getType, suggestionType.getType()).one();
+        if(one != null){
+            return failed("反馈类型已存在");
+        }
+        SysUser sysUser = sysUserService.getUser();
+        suggestionType.setOperatorId(sysUser.getId());
+        suggestionType.setOperatorName(sysUser.getRealName());
+        sysSuggestionTypeService.save(suggestionType);
+        return succeed();
+    }
+
+    @ApiOperation(value = "删除")
+    @GetMapping("del")
+    @PreAuthorize("@pcs.hasPermissions('sysSuggestionType/del')")
+    public Object del(Long id) {
+        //是否被使用
+        Integer num = sysSuggestionDao.countByTypeId(id);
+        if(num != null && num > 0){
+            throw new BizException("反馈类型已被使用");
+        }
+        sysSuggestionTypeService.removeById(id);
+        return succeed();
+    }
+
+    @ApiOperation(value = "分页查询")
+    @PostMapping("queryPage")
+    @PreAuthorize("@pcs.hasPermissions('sysSuggestionType/queryPage')")
+    public HttpResponseResult<PageInfo<SysSuggestionType>> queryPage(@RequestBody QueryInfo queryInfo) {
+        Page<SysSuggestionType> page = PageUtil.getPage(queryInfo.getPage(), queryInfo.getRows());
+        IPage<SysSuggestionType> iPage = sysSuggestionTypeService.page(page, Wrappers.<SysSuggestionType>lambdaQuery()
+                .eq(StringUtils.isNotBlank(queryInfo.getSearch()), SysSuggestionType::getType, queryInfo.getSearch())
+                .orderByDesc(SysSuggestionType::getId));
+        return succeed(PageUtil.pageInfo(iPage));
+    }
+
+}

+ 3 - 10
mec-auth/mec-auth-server/src/main/java/com/ym/mec/auth/web/controller/UserController.java

@@ -1,15 +1,14 @@
 package com.ym.mec.auth.web.controller;
 
 import com.alibaba.fastjson.JSON;
-import com.alibaba.fastjson.JSONObject;
 import com.huifu.adapay.core.util.StringUtil;
 import com.ym.mec.auth.api.dto.SysUserInfo;
+import com.ym.mec.auth.api.dto.SysUserQueryInfo;
 import com.ym.mec.auth.api.entity.SysUser;
 import com.ym.mec.auth.service.SysRoleService;
 import com.ym.mec.auth.service.SysUserRoleService;
 import com.ym.mec.auth.service.SysUserService;
 import com.ym.mec.auth.service.TenantInfoService;
-import com.ym.mec.auth.api.dto.SysUserQueryInfo;
 import com.ym.mec.auth.web.controller.queryInfo.QRLoginDto;
 import com.ym.mec.common.controller.BaseController;
 import com.ym.mec.common.entity.HttpResponseResult;
@@ -26,24 +25,18 @@ import com.ym.mec.im.ImFeignService;
 import com.ym.mec.thirdparty.user.realname.RealnameAuthenticationPluginContext;
 import com.ym.mec.thirdparty.user.realname.provider.LinkfaceRealnameAuthenticationPlugin;
 import com.ym.mec.util.date.DateUtil;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiImplicitParam;
-import io.swagger.annotations.ApiImplicitParams;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
+import io.swagger.annotations.*;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
-import org.springframework.http.*;
+import org.springframework.http.MediaType;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
-import org.springframework.util.LinkedMultiValueMap;
 import org.springframework.web.bind.annotation.*;
 
 import javax.servlet.http.HttpServletRequest;
 import java.io.IOException;
 import java.util.*;
-import java.util.concurrent.TimeUnit;
 
 @RestController()
 @RequestMapping("user")

+ 3 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/StudentDao.java

@@ -385,4 +385,7 @@ public interface StudentDao extends com.ym.mec.common.dal.BaseDAO<Integer, Stude
     int queryBaseInfoCount(Map<String, Object> params);
 
     List<SysUser> listUserByIds(@Param("userIds") List<Integer> userIds);
+
+    //查询会员学员
+    List<Integer> queryMemberStudent(@Param("memberFlag") Boolean memberFlag, @Param("studentIdList") List<Integer> studentIdList);
 }

+ 5 - 1
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/SysSuggestionDao.java

@@ -2,8 +2,12 @@ package com.ym.mec.biz.dal.dao;
 
 import com.ym.mec.biz.dal.entity.SysSuggestion;
 import com.ym.mec.common.dal.BaseDAO;
+import org.apache.ibatis.annotations.Param;
 
 public interface SysSuggestionDao extends BaseDAO<Long, SysSuggestion> {
 
-	
+
+    SysSuggestion getDetail(@Param("id") Long id);
+
+    Integer countByTypeId(@Param("suggestionTypeId") Long suggestionTypeId);
 }

+ 9 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/SysSuggestionTypeDao.java

@@ -0,0 +1,9 @@
+package com.ym.mec.biz.dal.dao;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.ym.mec.biz.dal.entity.SysSuggestionType;
+
+public interface SysSuggestionTypeDao extends BaseMapper<SysSuggestionType> {
+
+}
+

+ 6 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dto/StudentLessonExaminationDetailDto.java

@@ -27,6 +27,12 @@ public class StudentLessonExaminationDetailDto {
     @ApiModelProperty(value = "曲谱")
     private Integer musicScoreId;
 
+    @ApiModelProperty(value = "开始小节")
+    private Integer start;
+
+    @ApiModelProperty(value = "截止小节")
+    private Integer end;
+
     @ApiModelProperty(value = "评测难度")
     private HardLevelEnum heardLevel;
 

+ 8 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/StudentLessonExaminationDetail.java

@@ -38,6 +38,14 @@ public class StudentLessonExaminationDetail implements Serializable {
     @ApiModelProperty(value = "曲目id")
     private Long musicScoreId;
 
+    @TableField("start_")
+    @ApiModelProperty(value = "开始小节")
+    private Integer start;
+
+    @TableField("end_")
+    @ApiModelProperty(value = "截止小节")
+    private Integer end;
+
     @ApiModelProperty("作业分组")
     @TableField(value = "group_")
     private Integer group;

+ 29 - 80
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/SysSuggestion.java

@@ -2,14 +2,16 @@ package com.ym.mec.biz.dal.entity;
 
 import com.ym.mec.biz.dal.enums.SuggestionType;
 import com.ym.mec.common.entity.BaseEntity;
-
 import io.swagger.annotations.ApiModelProperty;
-
+import lombok.Data;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 
+import java.util.Date;
+
 /**
  * 对应数据库表(sys_suggestion):
  */
+@Data
 public class SysSuggestion extends BaseEntity {
 
 	/** 编号 */
@@ -27,6 +29,9 @@ public class SysSuggestion extends BaseEntity {
 	@ApiModelProperty(value = "内容",required = false)
 	private String content;
 
+	@ApiModelProperty(value = "设备号")
+	private String deviceNo;
+
 	/** 媒体 */
 	@ApiModelProperty(value = "媒体",required = false)
 	private String url;
@@ -34,98 +39,42 @@ public class SysSuggestion extends BaseEntity {
 	/** 用户编号 */
 	@ApiModelProperty(value = "用户编号",required = false)
 	private Long userId;
-	
+
+	@ApiModelProperty(value = "用户名",required = false)
+	private String username;
+
 	@ApiModelProperty(value = "客户端类型",required = false)
 	private String clientType;
 
 	@ApiModelProperty(value = "建议类型")
 	private SuggestionType type = SuggestionType.APP;
 
-	@ApiModelProperty(value = "用户名",required = false)
-	private String username;
-	
-	/** 提交时间 */
-	private java.util.Date createTime;
-
-	public String getUrl() {
-		return url;
-	}
-
-	public void setUrl(String url) {
-		this.url = url;
-	}
+	@ApiModelProperty(value = "反馈类型")
+	private Integer suggestionType;
 
-	public String getUsername() {
-		return username;
-	}
+	@ApiModelProperty(value = "反馈类型编号")
+	private String suggestionTypeName;
 
-	public void setUsername(String username) {
-		this.username = username;
-	}
+	@ApiModelProperty(value = "处理人")
+	private Integer operatorId;
 
-	public void setId(Long id){
-		this.id = id;
-	}
-	
-	public Long getId(){
-		return this.id;
-	}
-			
-	public void setMobileNo(String mobileNo){
-		this.mobileNo = mobileNo;
-	}
-	
-	public String getMobileNo(){
-		return this.mobileNo;
-	}
-			
-	public void setTitle(String title){
-		this.title = title;
-	}
-	
-	public String getTitle(){
-		return this.title;
-	}
-			
-	public void setContent(String content){
-		this.content = content;
-	}
-	
-	public String getContent(){
-		return this.content;
-	}
-			
-	public void setUserId(Long userId){
-		this.userId = userId;
-	}
-	
-	public Long getUserId(){
-		return this.userId;
-	}
-			
-	public String getClientType() {
-		return clientType;
-	}
+	@ApiModelProperty(value = "处理人")
+	private String operatorName;
 
-	public void setClientType(String clientType) {
-		this.clientType = clientType;
-	}
+	@ApiModelProperty(value = "处理时间",required = false)
+	private Date operatorTime;
 
-	public SuggestionType getType() {
-		return type;
-	}
+	@ApiModelProperty(value = "处理备注")
+	private String operatorMemo;
 
-	public void setType(SuggestionType type) {
-		this.type = type;
-	}
+	@ApiModelProperty(value = "是否需要反馈用户")
+	private Boolean feedbackFlag;
 
-	public void setCreateTime(java.util.Date createTime){
-		this.createTime = createTime;
-	}
+	@ApiModelProperty(value = "是否需要处理")
+	private Boolean handleFlag;
 	
-	public java.util.Date getCreateTime(){
-		return this.createTime;
-	}
+	/** 提交时间 */
+	private java.util.Date createTime;
 			
 	@Override
 	public String toString() {

+ 48 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/SysSuggestionType.java

@@ -0,0 +1,48 @@
+package com.ym.mec.biz.dal.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.ym.mec.biz.dal.enums.SuggestionType;
+import com.ym.mec.common.entity.BaseEntity;
+import com.ym.mec.common.tenant.TenantContextHolder;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+
+import java.util.Date;
+
+/**
+ * 对应数据库表(sys_suggestion_type):
+ */
+@Data
+public class SysSuggestionType{
+
+	@ApiModelProperty(value = "id")
+	@TableId(value = "id_", type = IdType.AUTO)
+	private Integer id;
+
+	@ApiModelProperty(value = "反馈类型")
+	@TableField("type_")
+	private String type;
+
+	@ApiModelProperty(value = "操作人")
+	@TableField("operator_id_")
+	private Integer operatorId;
+
+	@ApiModelProperty(value = "操作人名称")
+	@TableField("operator_name_")
+	private String operatorName;
+
+	@ApiModelProperty(value = "创建时间")
+	@TableField("create_time_")
+	private Date createTime;
+
+	@ApiModelProperty(value = "更新时间")
+	@TableField("update_time_")
+	private Date updateTime;
+
+	@ApiModelProperty(value = "机构编号")
+	@TableField("tenant_id_")
+	private Integer tenantId = TenantContextHolder.getTenantId();
+}

+ 4 - 88
mec-biz/src/main/java/com/ym/mec/biz/dal/page/SysMusicCompareRecordQueryInfo.java

@@ -4,12 +4,14 @@ import com.ym.mec.biz.dal.enums.FeatureType;
 import com.ym.mec.biz.dal.enums.HeardLevelEnum;
 import com.ym.mec.common.page.QueryInfo;
 import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
 import org.apache.ibatis.annotations.Param;
 
 /**
  * @Author Joburgess
  * @Date 2021/8/11 0011
  */
+@Data
 public class SysMusicCompareRecordQueryInfo extends QueryInfo {
 
     private Integer userId;
@@ -24,6 +26,8 @@ public class SysMusicCompareRecordQueryInfo extends QueryInfo {
 
     private int orderType;
 
+    private Boolean memberFlag;
+
     @ApiModelProperty("排序字段:TRAINDAYS(训练天数);TRAINTIME(训练时长);TRAINNUM(训练次数)")
     private String sortField = "TRAINDAYS";
 
@@ -34,92 +38,4 @@ public class SysMusicCompareRecordQueryInfo extends QueryInfo {
     private Boolean visitFlag;
 
     private Integer organId;
-
-    public Integer getOrganId() {
-        return organId;
-    }
-
-    public void setOrganId(Integer organId) {
-        this.organId = organId;
-    }
-
-    public Boolean getVisitFlag() {
-        return visitFlag;
-    }
-
-    public void setVisitFlag(Boolean visitFlag) {
-        this.visitFlag = visitFlag;
-    }
-
-    public FeatureType getFeatureType() {
-        return featureType;
-    }
-
-    public void setFeatureType(FeatureType featureType) {
-        this.featureType = featureType;
-    }
-
-    public Integer getTeacherId() {
-        return teacherId;
-    }
-
-    public void setTeacherId(Integer teacherId) {
-        this.teacherId = teacherId;
-    }
-
-    public int getOrderType() {
-        return orderType;
-    }
-
-    public void setOrderType(int orderType) {
-        this.orderType = orderType;
-    }
-
-    public Integer getUserId() {
-        return userId;
-    }
-
-    public void setUserId(Integer userId) {
-        this.userId = userId;
-    }
-
-    public String getStartTime() {
-        return startTime;
-    }
-
-    public void setStartTime(String startTime) {
-        this.startTime = startTime;
-    }
-
-    public String getEndTime() {
-        return endTime;
-    }
-
-    public void setEndTime(String endTime) {
-        this.endTime = endTime;
-    }
-
-    public String getMusicGroupId() {
-        return musicGroupId;
-    }
-
-    public void setMusicGroupId(String musicGroupId) {
-        this.musicGroupId = musicGroupId;
-    }
-
-    public String getSortField() {
-        return sortField;
-    }
-
-    public void setSortField(String sortField) {
-        this.sortField = sortField;
-    }
-
-    public HeardLevelEnum getHeardLevel() {
-        return heardLevel;
-    }
-
-    public void setHeardLevel(HeardLevelEnum heardLevel) {
-        this.heardLevel = heardLevel;
-    }
 }

+ 14 - 32
mec-biz/src/main/java/com/ym/mec/biz/dal/page/SysSuggestionQueryInfo.java

@@ -3,52 +3,34 @@ package com.ym.mec.biz.dal.page;
 import com.ym.mec.biz.dal.enums.SuggestionType;
 import com.ym.mec.common.page.QueryInfo;
 import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
 
 /**
  * @Author Joburgess
  * @Date 2021/8/10 0010
  */
+@Data
 public class SysSuggestionQueryInfo extends QueryInfo {
 
+    @ApiModelProperty(value = "id")
+    private Long id;
+
     @ApiModelProperty(value = "建议类型")
     private SuggestionType type;
 
+    @ApiModelProperty(value = "反馈类型")
+    private String suggestionType;
+
+    @ApiModelProperty(value = "处理状态")
+    private Boolean handleFlag;
+
+    @ApiModelProperty(value = "是否需要反馈")
+    private Boolean feedbackFlag;
+
     private String startTime;
 
     private String endTime;
 
     @ApiModelProperty(value = "客户端类型",required = false)
     private String clientType;
-
-    public SuggestionType getType() {
-        return type;
-    }
-
-    public void setType(SuggestionType type) {
-        this.type = type;
-    }
-
-    public String getStartTime() {
-        return startTime;
-    }
-
-    public void setStartTime(String startTime) {
-        this.startTime = startTime;
-    }
-
-    public String getEndTime() {
-        return endTime;
-    }
-
-    public void setEndTime(String endTime) {
-        this.endTime = endTime;
-    }
-
-    public String getClientType() {
-        return clientType;
-    }
-
-    public void setClientType(String clientType) {
-        this.clientType = clientType;
-    }
 }

+ 3 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/SysSuggestionService.java

@@ -5,4 +5,7 @@ import com.ym.mec.common.service.BaseService;
 
 public interface SysSuggestionService extends BaseService<Long, SysSuggestion> {
 
+    SysSuggestion getDetail(Long id);
+
+    void dispose(SysSuggestion sysSuggestion);
 }

+ 12 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/SysSuggestionTypeService.java

@@ -0,0 +1,12 @@
+package com.ym.mec.biz.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.ym.mec.biz.dal.dao.SysSuggestionTypeDao;
+import com.ym.mec.biz.dal.entity.SysSuggestionType;
+
+public interface SysSuggestionTypeService extends IService<SysSuggestionType> {
+
+    SysSuggestionTypeDao getDao();
+}
+
+

+ 7 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/SysMusicCompareRecordServiceImpl.java

@@ -465,6 +465,13 @@ public class SysMusicCompareRecordServiceImpl extends BaseServiceImpl<Long, SysM
 		if(CollectionUtils.isEmpty(studentIdList)){
 			return pageInfo;
 		}
+		if (queryInfo.getMemberFlag() != null){
+			//筛选vip学员
+			studentIdList = studentDao.queryMemberStudent(queryInfo.getMemberFlag(),studentIdList);
+		}
+		if(CollectionUtils.isEmpty(studentIdList)){
+			return pageInfo;
+		}
 		params.put("studentIdList",studentIdList);
 		int count = sysMusicCompareRecordDao.countStudentTrain(params);
 		List<CountStudentTrainDataDto> dataList = new ArrayList<>();

+ 56 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/SysSuggesstionTypeServiceImpl.java

@@ -0,0 +1,56 @@
+package com.ym.mec.biz.service.impl;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.google.common.collect.Lists;
+import com.ym.mec.auth.api.client.SysUserFeignService;
+import com.ym.mec.auth.api.entity.SysUser;
+import com.ym.mec.biz.dal.dao.*;
+import com.ym.mec.biz.dal.dto.ImGroupDto;
+import com.ym.mec.biz.dal.dto.TempLittleArtistTrainingCampDto;
+import com.ym.mec.biz.dal.entity.*;
+import com.ym.mec.biz.dal.enums.MessageTypeEnum;
+import com.ym.mec.biz.dal.vo.*;
+import com.ym.mec.biz.service.*;
+import com.ym.mec.common.exception.BizException;
+import com.ym.mec.common.page.PageInfo;
+import com.ym.mec.common.page.PageUtil;
+import com.ym.mec.common.page.WrapperUtil;
+import com.ym.mec.common.tenant.TenantContextHolder;
+import com.ym.mec.thirdparty.message.MessageSenderPluginContext;
+import com.ym.mec.util.collection.MapUtil;
+import com.ym.mec.util.date.DateUtil;
+import com.ym.mec.util.excel.POIUtil;
+import org.apache.commons.collections.CollectionUtils;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.poi.hssf.usermodel.HSSFWorkbook;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.math.BigDecimal;
+import java.math.RoundingMode;
+import java.time.LocalDate;
+import java.util.*;
+import java.util.concurrent.atomic.AtomicInteger;
+import java.util.function.BiConsumer;
+import java.util.function.Function;
+import java.util.stream.Collectors;
+
+@Service
+public class SysSuggesstionTypeServiceImpl extends ServiceImpl<SysSuggestionTypeDao, SysSuggestionType> implements SysSuggestionTypeService {
+
+    @Override
+    public SysSuggestionTypeDao getDao() {
+        return this.baseMapper;
+    }
+}
+

+ 48 - 1
mec-biz/src/main/java/com/ym/mec/biz/service/impl/SysSuggestionServiceImpl.java

@@ -1,5 +1,15 @@
 package com.ym.mec.biz.service.impl;
 
+import com.microsvc.toolkit.common.webportal.exception.BizException;
+import com.ym.mec.auth.api.entity.SysUser;
+import com.ym.mec.biz.dal.dao.SysConfigDao;
+import com.ym.mec.biz.dal.entity.SysMessage;
+import com.ym.mec.biz.dal.enums.MessageTypeEnum;
+import com.ym.mec.biz.service.SysConfigService;
+import com.ym.mec.biz.service.SysMessageService;
+import com.ym.mec.biz.service.SysUserService;
+import com.ym.mec.thirdparty.message.MessageSenderPluginContext;
+import com.ym.mec.util.date.DateUtil;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
@@ -9,15 +19,52 @@ import com.ym.mec.biz.service.SysSuggestionService;
 import com.ym.mec.common.dal.BaseDAO;
 import com.ym.mec.common.service.impl.BaseServiceImpl;
 
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
+
 @Service
 public class SysSuggestionServiceImpl extends BaseServiceImpl<Long, SysSuggestion>  implements SysSuggestionService {
 	
 	@Autowired
 	private SysSuggestionDao sysSuggestionDao;
+	@Autowired
+	private SysUserService sysUserService;
+	@Autowired
+	private SysConfigDao sysConfigDao;
+	@Autowired
+	private SysMessageService sysMessageService;
 
 	@Override
 	public BaseDAO<Long, SysSuggestion> getDAO() {
 		return sysSuggestionDao;
 	}
-	
+
+	@Override
+	public SysSuggestion getDetail(Long id) {
+		return sysSuggestionDao.getDetail(id);
+	}
+
+	@Override
+	public void dispose(SysSuggestion sysSuggestion) {
+		SysSuggestion suggestion = sysSuggestionDao.getDetail(sysSuggestion.getId());
+		if (suggestion == null) {
+			throw new BizException("数据不存在");
+		}
+		if (suggestion.getOperatorId() != null) {
+			throw new BizException("数据已处理");
+		}
+		SysUser sysUser = sysUserService.getUser();
+		sysSuggestion.setOperatorId(sysUser.getId());
+		sysSuggestion.setOperatorTime(new Date());
+		sysSuggestionDao.update(sysSuggestion);
+		if (sysSuggestion.getFeedbackFlag()) {
+			// TODO 发送
+			String content = sysConfigDao.findConfigValue("suggestion_feedback_content");
+			StringBuffer sb = new StringBuffer("[");
+			sb.append(suggestion.getSuggestionTypeName()).append("]").append(DateUtil.format(suggestion.getCreateTime(),DateUtil.DEFAULT_PATTERN));
+			sysMessageService.sendMessage(MessageSenderPluginContext.MessageSender.JIGUANG,suggestion.getUserId().intValue(),
+					sb.toString(),content,suggestion.getUserId().toString(),null,0,"2","SYSTEM","STUDENT");
+		}
+	}
 }

+ 5 - 3
mec-biz/src/main/resources/config/mybatis/StudentLessonExaminationDetailMapper.xml

@@ -6,6 +6,8 @@
         <result column="user_id_" property="userId"/>
         <result column="lesson_examination_id_" property="lessonExaminationId"/>
         <result column="music_score_id_" property="musicScoreId"/>
+        <result column="start_" property="start"/>
+        <result column="end_" property="end"/>
         <result column="heard_level_" property="heardLevel" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
         <result column="standard_flag_" property="standardFlag"/>
         <result column="training_score_" property="trainingScore"/>
@@ -21,16 +23,16 @@
     <insert id="insertBatch" keyColumn="id_" keyProperty="id" useGeneratedKeys="true"
             parameterType="com.ym.mec.biz.dal.entity.StudentLessonExaminationDetail">
         insert into student_lesson_examination_detail(user_id_, lesson_examination_id_, music_score_id_, heard_level_,standard_score_,
-                                                      avg_score_, part_index_)
+                                                      avg_score_, part_index_,start_,end_)
         values
         <foreach collection="entities" item="entity" separator=",">
             (#{entity.userId}, #{entity.lessonExaminationId},#{entity.musicScoreId}, #{entity.heardLevel,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
-             #{entity.standardScore}, #{entity.avgScore},#{entity.partIndex})
+             #{entity.standardScore}, #{entity.avgScore},#{entity.partIndex},#{entity.start},#{entity.end})
         </foreach>
     </insert>
     <select id="queryAll" resultType="com.ym.mec.biz.dal.dto.StudentLessonExaminationDetailDto">
         select sms.name_ musicScoreName,sled.id_ studentLessonExaminationDetailId, sled.user_id_ userId, sled.lesson_examination_id_ lessonExaminationId, sled.music_score_id_ musicScoreId,
-               sled.heard_level_ heardLevel, sled.training_score_ trainingScore,sled.avg_score_ avgScore, sled.actual_avg_score_ actualAvgScore,
+               sled.heard_level_ heardLevel, sled.training_score_ trainingScore,sled.avg_score_ avgScore, sled.actual_avg_score_ actualAvgScore, sled.start_ start, sled.end_ end,
                sled.standard_score_ standardScore, sled.part_index_ partIndex,CASE WHEN sled.training_time_ IS NULL THEN 0 ELSE 1 END trainingFlag
         from student_lesson_examination_detail sled
         left join sys_music_score sms ON sms.id_ = sled.music_score_id_

+ 14 - 0
mec-biz/src/main/resources/config/mybatis/StudentMapper.xml

@@ -1464,4 +1464,18 @@
             #{id}
         </foreach>
     </select>
+    <select id="queryMemberStudent" resultType="java.lang.Integer">
+        select user_id_ from student
+        where user_id_ IN
+        <foreach collection="studentIdList" item="studentId" open="(" close=")" separator=",">
+            #{studentId}
+        </foreach>
+        <if test="memberFlag == true">
+            AND member_rank_setting_id_ = 1 and membership_end_time_ >= NOW()
+        </if>
+        <if test="memberFlag == false">
+            AND (membership_end_time_ IS NULL OR membership_end_time_ &lt; NOW())
+        </if>
+
+    </select>
 </mapper>

+ 56 - 18
mec-biz/src/main/resources/config/mybatis/SysSuggestionMapper.xml

@@ -11,6 +11,7 @@
         <result column="mobile_no_" property="mobileNo"/>
         <result column="title_" property="title"/>
         <result column="content_" property="content"/>
+        <result column="device_no_" property="deviceNo"/>
         <result column="url_" property="url"/>
         <result column="user_id_" property="userId"/>
         <result column="username_" property="username"/>
@@ -18,6 +19,13 @@
         <result column="client_type_" property="clientType"/>
         <result column="type_" property="type" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
         <result column="tenant_id_" property="tenantId"/>
+        <result column="suggestion_type_" property="suggestionType"/>
+        <result column="suggestionTypeName" property="suggestionTypeName"/>
+        <result column="operator_id_" property="operatorId"/>
+        <result column="operator_time_" property="operatorTime"/>
+        <result column="operator_memo_" property="operatorMemo"/>
+        <result column="feedback_flag_" property="feedbackFlag"/>
+        <result column="handle_flag_" property="handleFlag"/>
     </resultMap>
 
     <!-- 根据主键查询一条记录 -->
@@ -33,35 +41,36 @@
     <!-- 向数据库增加一条记录 -->
     <insert id="insert" parameterType="com.ym.mec.biz.dal.entity.SysSuggestion" useGeneratedKeys="true" keyColumn="id"
             keyProperty="id">
-        INSERT INTO sys_suggestion (mobile_no_,title_,content_,user_id_,create_time_,client_type_,type_,url_,tenant_id_)
-        VALUES(#{mobileNo},#{title},#{content},#{userId},now(),#{clientType},#{type, typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{url},#{tenantId})
+        INSERT INTO sys_suggestion (mobile_no_,title_,content_,user_id_,create_time_,client_type_,type_,url_,tenant_id_,
+                                    suggestion_type_,device_no_)
+        VALUES(#{mobileNo},#{title},#{content},#{userId},now(),#{clientType},
+               #{type, typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{url},#{tenantId},
+               #{suggestionType},#{deviceNo})
     </insert>
 
     <!-- 根据主键查询一条记录 -->
     <update id="update" parameterType="com.ym.mec.biz.dal.entity.SysSuggestion">
         UPDATE sys_suggestion
         <set>
-            <if test="url != null">
-                url_ = #{url},
+            <if test="operatorId != null">
+                operator_id_ = #{operatorId},
             </if>
-            <if test="clientType != null">
-                client_type_ = #{clientType},
+            <if test="operatorTime != null">
+                operator_time_ = #{operatorTime},
             </if>
-            <if test="userId != null">
-                user_id_ = #{userId},
+            <if test="operatorMemo != null">
+                operator_memo_ = #{operatorMemo},
             </if>
-            <if test="title != null">
-                title_ = #{title},
+            <if test="feedbackFlag != null">
+                feedback_flag_ = #{feedbackFlag},
             </if>
-            <if test="content != null">
-                content_ = #{content},
+            <if test="handleFlag != null">
+                handle_flag_ = #{handleFlag},
             </if>
-            <if test="mobileNo != null">
-                mobile_no_ = #{mobileNo},
-            </if>
-            <if test="type != null">
-                type_ = #{type, typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
+            <if test="deviceNo != null">
+                device_no_ = #{deviceNo},
             </if>
+
         </set>
         WHERE id_ = #{id} ans tenant_id_ = #{tenantId}
     </update>
@@ -89,13 +98,31 @@
             <if test="search!=null and search!=''">
                 AND (su.real_name_ LIKE CONCAT('%', #{search}, '%') OR su.username_ LIKE CONCAT('%', #{search}, '%') OR ss.user_id_=#{search} OR su.phone_=#{search})
             </if>
+            <if test="suggestionType != null and suggestionType != ''">
+                AND sut.type_ = #{suggestionType}
+            </if>
+            <if test="handleFlag != null">
+                AND ss.handle_flag_ = #{handleFlag}
+            </if>
+            <if test="feedbackFlag != null">
+                AND ss.feedback_flag_ = #{feedbackFlag}
+            </if>
+            <if test="operatorId != null">
+                AND ss.operator_id_ = #{operatorId}
+            </if>
+            <if test="id != null">
+                AND ss.id_ = #{id}
+            </if>
         </where>
     </sql>
 
     <!-- 分页查询 -->
     <select id="queryPage" resultMap="SysSuggestion" parameterType="map">
-        SELECT ss.*,CASE WHEN ss.client_type_='STUDENT' THEN su.username_ ELSE su.real_name_ END username_ FROM sys_suggestion ss
+        SELECT ss.*,CASE WHEN ss.client_type_='STUDENT' THEN su.username_ ELSE su.real_name_ END username_,
+        sut.type_ suggestionTypeName
+        FROM sys_suggestion ss
         LEFT JOIN sys_user su ON su.id_ = ss.user_id_
+        left join sys_suggestion_type sut ON sut.id_ = ss.suggestion_type_
         <include refid="queryCondition" />
         ORDER BY ss.id_ DESC
         <include refid="global.limit"/>
@@ -107,4 +134,15 @@
         LEFT JOIN sys_user su ON su.id_ = ss.user_id_
         <include refid="queryCondition" />
 	</select>
+    <select id="getDetail" resultMap="SysSuggestion">
+        SELECT ss.*,CASE WHEN ss.client_type_='STUDENT' THEN su.username_ ELSE su.real_name_ END username_,
+        sut.type_ suggestionTypeName
+        FROM sys_suggestion ss
+        LEFT JOIN sys_user su ON su.id_ = ss.user_id_
+        left join sys_suggestion_type sut ON sut.id_ = ss.suggestion_type_
+        WHERE ss.id_ = #{id}
+    </select>
+    <select id="countByTypeId" resultType="java.lang.Integer">
+        select COUNT(0) from sys_suggestion where suggestion_type_ = #{suggestionTypeId}
+    </select>
 </mapper>

+ 5 - 0
mec-biz/src/main/resources/config/mybatis/SysSuggestionTypeMapper.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ym.mec.biz.dal.dao.SysSuggestionTypeDao">
+
+</mapper>