소스 검색

Merge branch 'master' of http://git.dayaedu.com/yonge/collect_fee

周箭河 5 년 전
부모
커밋
e639a619ad

+ 3 - 5
src/main/java/com/ym/mec/collectfee/controller/UserController.java

@@ -1,6 +1,7 @@
 package com.ym.mec.collectfee.controller;
 
 
+import com.sun.tracing.dtrace.Attributes;
 import com.ym.mec.collectfee.common.web.BaseController;
 import com.ym.mec.collectfee.entity.*;
 import com.ym.mec.collectfee.service.ApplyInfoService;
@@ -15,10 +16,7 @@ import io.swagger.annotations.ApiOperation;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.dao.DuplicateKeyException;
-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 org.springframework.web.bind.annotation.*;
 
 import java.util.Date;
 import java.util.List;
@@ -193,7 +191,7 @@ public class UserController extends BaseController {
      */
     @ApiOperation(value = "修改学生信息")
     @PostMapping("/updateUser")
-    public Object updateUser(ApplyInfo applyInfo){
+    public Object updateUser(@ModelAttribute ApplyInfo applyInfo){
         applyInfo.setUpdateTime(new Date());
         applyInfoService.update(applyInfo);
         return succeed("修改成功");

+ 2 - 1
src/main/java/com/ym/mec/collectfee/dao/ApplyInfoDao.java

@@ -5,6 +5,7 @@ import com.ym.mec.collectfee.entity.*;
 import org.apache.ibatis.annotations.Param;
 import org.springframework.stereotype.Component;
 
+import java.util.Date;
 import java.util.List;
 import java.util.Map;
 
@@ -42,5 +43,5 @@ public interface ApplyInfoDao extends BaseDAO<Integer, ApplyInfo> {
      * @param userId
      * @param subId
      */
-    void updateUserSub(@Param("userId") Integer userId, @Param("subId")Integer subId,@Param("courseId")Integer courseId);
+    void updateUserSub(@Param("userId") Integer userId, @Param("subId")Integer subId, @Param("courseId")Integer courseId, @Param("updateTime") Date updateTime);
 }

+ 2 - 1
src/main/java/com/ym/mec/collectfee/service/ApplyInfoService.java

@@ -4,6 +4,7 @@ import com.ym.mec.collectfee.common.page.PageInfo;
 import com.ym.mec.collectfee.common.service.BaseService;
 import com.ym.mec.collectfee.entity.*;
 
+import java.util.Date;
 import java.util.List;
 import java.util.Map;
 
@@ -75,5 +76,5 @@ public interface ApplyInfoService extends BaseService<Integer, ApplyInfo> {
      * @param userId
      * @param subId
      */
-    void updateUserSub(String userId, Integer subId,Integer courseId);
+    void updateUserSub(String userId, Integer subId, Integer courseId);
 }

+ 1 - 1
src/main/java/com/ym/mec/collectfee/service/impl/ApplyInfoServiceImpl.java

@@ -305,7 +305,7 @@ public class ApplyInfoServiceImpl extends BaseServiceImpl<Integer, ApplyInfo> im
 	public void updateUserSub(String userId, Integer subId,Integer courseId) {
 		String[] userIds = userId.split(",");
 		for (String string:userIds) {
-			applyInfoDao.updateUserSub(Integer.parseInt(string),subId,courseId);
+			applyInfoDao.updateUserSub(Integer.parseInt(string),subId,courseId,new Date());
 		}
 	}