zouxuan 4 years ago
parent
commit
46471b816c

+ 14 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/StudentRepair.java

@@ -142,6 +142,12 @@ public class StudentRepair {
     private String address;
 
     /**
+    * 所选商品
+    */
+    @ApiModelProperty(value = "商品", required = false)
+    private String goodsJson;
+
+    /**
     * 支付状态 0-未支付 1-支付中 2-已支付
     */
     @ApiModelProperty(value = "支付状态 0-未支付 1-支付中 2-已支付", required = false)
@@ -171,6 +177,14 @@ public class StudentRepair {
     @ApiModelProperty(value = "更新时间", required = false)
     private Date updateTime;
 
+    public String getGoodsJson() {
+        return goodsJson;
+    }
+
+    public void setGoodsJson(String goodsJson) {
+        this.goodsJson = goodsJson;
+    }
+
     public String getOrganName() {
         return organName;
     }

+ 13 - 2
mec-biz/src/main/java/com/ym/mec/biz/dal/page/GoodsQueryInfo.java

@@ -1,9 +1,9 @@
 package com.ym.mec.biz.dal.page;
 
-import io.swagger.annotations.ApiModelProperty;
-
+import com.ym.mec.biz.dal.enums.GoodsType;
 import com.ym.mec.biz.dal.enums.YesOrNoEnum;
 import com.ym.mec.common.page.QueryInfo;
+import io.swagger.annotations.ApiModelProperty;
 
 public class GoodsQueryInfo extends QueryInfo {
 
@@ -22,6 +22,17 @@ public class GoodsQueryInfo extends QueryInfo {
     @ApiModelProperty(value = "状态(1,上架  0,下架)",required = false)
     private YesOrNoEnum status;
 
+    @ApiModelProperty(value = "商品类型", required = false)
+    private GoodsType type;
+
+    public GoodsType getType() {
+        return type;
+    }
+
+    public void setType(GoodsType type) {
+        this.type = type;
+    }
+
     public Integer getGoodsCategoryId() {
         return goodsCategoryId;
     }

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

@@ -1,7 +1,6 @@
 package com.ym.mec.biz.service.impl;
 
 import com.alibaba.fastjson.JSONObject;
-import com.ym.mec.biz.dal.dao.GoodsCategoryDao;
 import com.ym.mec.biz.dal.dao.GoodsDao;
 import com.ym.mec.biz.dal.entity.Goods;
 import com.ym.mec.biz.dal.enums.GoodsType;
@@ -38,8 +37,6 @@ public class GoodsServiceImpl extends BaseServiceImpl<Integer, Goods>  implement
 	private GoodsDao goodsDao;
 	@Autowired
 	private UploadFileService uploadFileService;
-	@Autowired
-	private GoodsCategoryDao goodsCategoryDao;
 
 	@Override
 	public BaseDAO<Integer, Goods> getDAO() {

+ 3 - 0
mec-biz/src/main/resources/config/mybatis/GoodsMapper.xml

@@ -160,6 +160,9 @@
             <if test="goodsCategoryId != null">
                 g.goods_category_id_ = #{goodsCategoryId}
             </if>
+            <if test="type != null">
+                g.type_ = #{type,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
+            </if>
             <if test="isNew != null">
                 g.is_new_ = #{isNew,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
             </if>

+ 6 - 2
mec-biz/src/main/resources/config/mybatis/StudentRepairMapper.xml

@@ -30,6 +30,7 @@
         <result column="create_time_" jdbcType="TIMESTAMP" property="createTime"/>
         <result column="update_time_" jdbcType="TIMESTAMP" property="updateTime"/>
         <result column="username_" jdbcType="VARCHAR" property="studentName"/>
+        <result column="goods_json_" jdbcType="VARCHAR" property="goodsJson"/>
     </resultMap>
     <!-- 根据主键查询一条记录 -->
     <select id="get" resultMap="StudentRepair">
@@ -48,7 +49,7 @@
         description_, amount_, finish_time_,
         send_type_, contact_name_, contact_mobile_,
         address_, pay_status_, create_time_,
-        update_time_,repair_status_)
+        update_time_,repair_status_,goods_json_)
         values (#{id,jdbcType=INTEGER}, #{transNo,jdbcType=VARCHAR}, #{organId,jdbcType=INTEGER},
         #{studentId,jdbcType=INTEGER}, #{studentName,jdbcType=VARCHAR}, #{studentSchool,jdbcType=VARCHAR},
         #{employeeId,jdbcType=INTEGER}, #{employeeName,jdbcType=VARCHAR}, #{subjectId,jdbcType=INTEGER},
@@ -56,11 +57,14 @@
         #{feeList,jdbcType=VARCHAR},#{description,jdbcType=VARCHAR}, #{amount,jdbcType=DECIMAL},
         #{finishTime,jdbcType=TIMESTAMP},#{sendType,jdbcType=INTEGER}, #{contactName,jdbcType=VARCHAR},
         #{contactMobile,jdbcType=VARCHAR},#{address,jdbcType=VARCHAR}, #{payStatus,jdbcType=INTEGER},
-        #{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP},#{repairStatus})
+        #{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP},#{repairStatus},#{goodsJson})
     </insert>
     <update id="update" parameterType="com.ym.mec.biz.dal.entity.StudentRepair">
         UPDATE student_repair
         <set>
+            <if test="goodsJson != null">
+                goods_json_ = #{goodsJson},
+            </if>
             <if test="transNo != null">
                 trans_no_ = #{transNo},
             </if>

+ 0 - 3
mec-im/src/main/java/com/ym/service/Impl/RoomServiceImpl.java

@@ -165,9 +165,6 @@ public class RoomServiceImpl implements RoomService {
                 log.error("joinRoom IM error: roomId={}, {}", roomId, resultInfo.getErrorMessage());
                 throw new ApiException(ErrorEnum.ERR_CREATE_ROOM_ERROR, resultInfo.getErrorMessage());
             }
-//            else {
-//                scheduleManager.addExpiredTask(this, roomId);
-//            }
         } else {
             display = roomList.get(0).getDisplay();
         }

+ 6 - 2
mec-student/src/main/java/com/ym/mec/student/controller/RepairController.java

@@ -6,7 +6,9 @@ import com.ym.mec.auth.api.entity.SysUser;
 import com.ym.mec.biz.dal.dao.EmployeeDao;
 import com.ym.mec.biz.dal.entity.Employee;
 import com.ym.mec.biz.dal.entity.StudentRepair;
+import com.ym.mec.biz.dal.page.GoodsQueryInfo;
 import com.ym.mec.biz.dal.page.RepairStudentQueryInfo;
+import com.ym.mec.biz.service.GoodsService;
 import com.ym.mec.biz.service.StudentRepairService;
 import com.ym.mec.common.controller.BaseController;
 import com.ym.mec.common.entity.HttpResponseResult;
@@ -14,6 +16,7 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.HttpStatus;
+import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -32,6 +35,9 @@ public class RepairController extends BaseController {
     @Autowired
     private StudentRepairService studentRepairService;
 
+    @Autowired
+    private GoodsService goodsService;
+
     @ApiOperation("获取维修记录")
     @GetMapping(value = "/getStudentRepairList")
     public HttpResponseResult getStudentRepairList(RepairStudentQueryInfo queryInfo) {
@@ -80,6 +86,4 @@ public class RepairController extends BaseController {
         }
         return succeed(studentRepairService.getStudentRepairer(sysUser.getId(),sysUser.getOrganId()));
     }
-
-
 }

+ 10 - 5
mec-web/src/main/java/com/ym/mec/web/controller/education/EduRepairController.java

@@ -7,7 +7,9 @@ import com.ym.mec.biz.dal.dao.EmployeeDao;
 import com.ym.mec.biz.dal.dto.BasicUserDto;
 import com.ym.mec.biz.dal.entity.Employee;
 import com.ym.mec.biz.dal.entity.StudentRepair;
+import com.ym.mec.biz.dal.page.GoodsQueryInfo;
 import com.ym.mec.biz.dal.page.RepairStudentQueryInfo;
+import com.ym.mec.biz.service.GoodsService;
 import com.ym.mec.biz.service.StudentRepairService;
 import com.ym.mec.biz.service.SubjectService;
 import com.ym.mec.common.controller.BaseController;
@@ -16,19 +18,14 @@ import com.ym.mec.common.page.PageInfo;
 import com.ym.mec.util.date.DateUtil;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
-import org.apache.commons.lang3.StringUtils;
-import org.snaker.engine.access.Page;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.HttpStatus;
-import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
-import java.util.Arrays;
 import java.util.Date;
-import java.util.List;
 import java.util.Objects;
 
 @RequestMapping("eduRepair")
@@ -45,6 +42,8 @@ public class EduRepairController extends BaseController {
     private StudentRepairService studentRepairService;
     @Autowired
     private SubjectService subjectService;
+    @Autowired
+    private GoodsService goodsService;
 
     @ApiOperation("获取学生列表")
     @GetMapping(value = "/getStudents")
@@ -142,4 +141,10 @@ public class EduRepairController extends BaseController {
         return succeed();
     }
 
+    @ApiOperation(value = "分页查询商品(教材、辅件)列表")
+    @GetMapping("/queryGoodsPage")
+    public Object queryPage(GoodsQueryInfo queryInfo){
+        return succeed(goodsService.queryPage(queryInfo));
+    }
+
 }