|
@@ -44,11 +44,11 @@ public class WishInfoUserRecordController {
|
|
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private DataDictionaryService dataDictionaryService;
|
|
private DataDictionaryService dataDictionaryService;
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- @ApiOperation(value="创建空记录")
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ @ApiOperation(value = "创建空记录")
|
|
|
@GetMapping("create")
|
|
@GetMapping("create")
|
|
|
- public MessageResult<WishInfoUserRecord> create(){
|
|
|
|
|
|
|
+ public MessageResult<WishInfoUserRecord> create() {
|
|
|
MessageResult<WishInfoUserRecord> msgResult = new MessageResult<>();
|
|
MessageResult<WishInfoUserRecord> msgResult = new MessageResult<>();
|
|
|
|
|
|
|
|
WishInfoUserRecord wishInfoUserRecord = new WishInfoUserRecord();
|
|
WishInfoUserRecord wishInfoUserRecord = new WishInfoUserRecord();
|
|
@@ -59,14 +59,14 @@ public class WishInfoUserRecordController {
|
|
|
return msgResult;
|
|
return msgResult;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- @ApiOperation(value="添加信息")
|
|
|
|
|
|
|
+ @ApiOperation(value = "添加信息")
|
|
|
@PostMapping("add")
|
|
@PostMapping("add")
|
|
|
- public MessageResult<WishInfoUserRecord> add(@RequestBody WishInfoUserRecord wishInfoUserRecord,@RequestAttribute String subject){
|
|
|
|
|
|
|
+ public MessageResult<WishInfoUserRecord> add(@RequestBody WishInfoUserRecord wishInfoUserRecord, @RequestAttribute String subject) {
|
|
|
MessageResult<WishInfoUserRecord> msgResult = new MessageResult<>();
|
|
MessageResult<WishInfoUserRecord> msgResult = new MessageResult<>();
|
|
|
|
|
|
|
|
try {
|
|
try {
|
|
|
wishInfoUserRecord.setId(UUID.randomUUID().toString());
|
|
wishInfoUserRecord.setId(UUID.randomUUID().toString());
|
|
|
- wishInfoUserRecord.setDelFlag(false);
|
|
|
|
|
|
|
+ wishInfoUserRecord.setDelFlag(false);
|
|
|
wishInfoUserRecord.setCreateBy(subject);
|
|
wishInfoUserRecord.setCreateBy(subject);
|
|
|
wishInfoUserRecord.setCreateTime(new Date());
|
|
wishInfoUserRecord.setCreateTime(new Date());
|
|
|
|
|
|
|
@@ -79,9 +79,8 @@ public class WishInfoUserRecordController {
|
|
|
msgResult.setResult(false);
|
|
msgResult.setResult(false);
|
|
|
msgResult.setMessage("数据库添加失败");
|
|
msgResult.setMessage("数据库添加失败");
|
|
|
}
|
|
}
|
|
|
- }
|
|
|
|
|
- catch(Exception ex){
|
|
|
|
|
- logger.error(ex.getMessage(),ex);
|
|
|
|
|
|
|
+ } catch (Exception ex) {
|
|
|
|
|
+ logger.error(ex.getMessage(), ex);
|
|
|
|
|
|
|
|
msgResult.setResult(false);
|
|
msgResult.setResult(false);
|
|
|
msgResult.setMessage(ex.getMessage());
|
|
msgResult.setMessage(ex.getMessage());
|
|
@@ -90,9 +89,9 @@ public class WishInfoUserRecordController {
|
|
|
return msgResult;
|
|
return msgResult;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- @ApiOperation(value="获取信息")
|
|
|
|
|
|
|
+ @ApiOperation(value = "获取信息")
|
|
|
@GetMapping("edit/{id}")
|
|
@GetMapping("edit/{id}")
|
|
|
- public MessageResult<WishInfoUserRecordDTO> edit(@PathVariable("id") String id){
|
|
|
|
|
|
|
+ public MessageResult<WishInfoUserRecordDTO> edit(@PathVariable("id") String id) {
|
|
|
MessageResult<WishInfoUserRecordDTO> msgResult = new MessageResult<>();
|
|
MessageResult<WishInfoUserRecordDTO> msgResult = new MessageResult<>();
|
|
|
|
|
|
|
|
try {
|
|
try {
|
|
@@ -101,11 +100,10 @@ public class WishInfoUserRecordController {
|
|
|
WishInfoUserRecord wishInfoUserRecord = wishInfoUserRecordService.get(id);
|
|
WishInfoUserRecord wishInfoUserRecord = wishInfoUserRecordService.get(id);
|
|
|
|
|
|
|
|
if (wishInfoUserRecord != null) {
|
|
if (wishInfoUserRecord != null) {
|
|
|
- if(StringUtils.isNotEmpty(wishInfoUserRecord.getStatus())){
|
|
|
|
|
- if(wishInfoUserRecord.getStatus().equals("0")){
|
|
|
|
|
|
|
+ if (StringUtils.isNotEmpty(wishInfoUserRecord.getStatus())) {
|
|
|
|
|
+ if (wishInfoUserRecord.getStatus().equals("0")) {
|
|
|
wishInfoUserRecord.setStatusN("互换中");
|
|
wishInfoUserRecord.setStatusN("互换中");
|
|
|
- }
|
|
|
|
|
- else if(wishInfoUserRecord.getStatus().equals("1")){
|
|
|
|
|
|
|
+ } else if (wishInfoUserRecord.getStatus().equals("1")) {
|
|
|
wishInfoUserRecord.setStatusN("已完成");
|
|
wishInfoUserRecord.setStatusN("已完成");
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -115,14 +113,14 @@ public class WishInfoUserRecordController {
|
|
|
|
|
|
|
|
RegUser regUser = regUserService.get(wishInfoUserRecord.getRegUserId());
|
|
RegUser regUser = regUserService.get(wishInfoUserRecord.getRegUserId());
|
|
|
|
|
|
|
|
- if(regUser!=null){
|
|
|
|
|
|
|
+ if (regUser != null) {
|
|
|
wishInfoUserRecord.setRegUserName(regUser.getRealName());
|
|
wishInfoUserRecord.setRegUserName(regUser.getRealName());
|
|
|
wishInfoUserRecord.setRegUserPhone(regUser.getPhone());
|
|
wishInfoUserRecord.setRegUserPhone(regUser.getPhone());
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- if(StringUtils.isNotEmpty(wishInfoUserRecord.getStudentAspirationsId())){
|
|
|
|
|
|
|
+ if (StringUtils.isNotEmpty(wishInfoUserRecord.getStudentAspirationsId())) {
|
|
|
StudentAspirations studentAspirations = studentAspirationsService.get(wishInfoUserRecord.getStudentAspirationsId());
|
|
StudentAspirations studentAspirations = studentAspirationsService.get(wishInfoUserRecord.getStudentAspirationsId());
|
|
|
- if(studentAspirations!=null){
|
|
|
|
|
|
|
+ if (studentAspirations != null) {
|
|
|
wishInfoUserRecord.setAspirationsName(studentAspirations.getName());
|
|
wishInfoUserRecord.setAspirationsName(studentAspirations.getName());
|
|
|
wishInfoUserRecord.setStudentName(studentAspirations.getStudentName());
|
|
wishInfoUserRecord.setStudentName(studentAspirations.getStudentName());
|
|
|
}
|
|
}
|
|
@@ -136,9 +134,8 @@ public class WishInfoUserRecordController {
|
|
|
msgResult.setResult(false);
|
|
msgResult.setResult(false);
|
|
|
msgResult.setMessage("数据库不存在该记录!");
|
|
msgResult.setMessage("数据库不存在该记录!");
|
|
|
}
|
|
}
|
|
|
- }
|
|
|
|
|
- catch(Exception ex){
|
|
|
|
|
- logger.error(ex.getMessage(),ex);
|
|
|
|
|
|
|
+ } catch (Exception ex) {
|
|
|
|
|
+ logger.error(ex.getMessage(), ex);
|
|
|
|
|
|
|
|
msgResult.setResult(false);
|
|
msgResult.setResult(false);
|
|
|
msgResult.setMessage(ex.getMessage());
|
|
msgResult.setMessage(ex.getMessage());
|
|
@@ -147,15 +144,15 @@ public class WishInfoUserRecordController {
|
|
|
return msgResult;
|
|
return msgResult;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- @ApiOperation(value="更新用户")
|
|
|
|
|
|
|
+ @ApiOperation(value = "更新用户")
|
|
|
@PostMapping("update")
|
|
@PostMapping("update")
|
|
|
- public MessageResult<WishInfoUserRecord> update(@RequestBody WishInfoUserRecord wishInfoUserRecord,@RequestAttribute String subject){
|
|
|
|
|
|
|
+ public MessageResult<WishInfoUserRecord> update(@RequestBody WishInfoUserRecord wishInfoUserRecord, @RequestAttribute String subject) {
|
|
|
MessageResult<WishInfoUserRecord> msgResult = new MessageResult<>();
|
|
MessageResult<WishInfoUserRecord> msgResult = new MessageResult<>();
|
|
|
|
|
|
|
|
try {
|
|
try {
|
|
|
- wishInfoUserRecord.setUpdateBy(subject);
|
|
|
|
|
|
|
+ wishInfoUserRecord.setUpdateBy(subject);
|
|
|
wishInfoUserRecord.setUpdateTime(new Date());
|
|
wishInfoUserRecord.setUpdateTime(new Date());
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
int affectCount = wishInfoUserRecordService.update(wishInfoUserRecord);
|
|
int affectCount = wishInfoUserRecordService.update(wishInfoUserRecord);
|
|
|
|
|
|
|
|
if (affectCount > 0) {
|
|
if (affectCount > 0) {
|
|
@@ -165,9 +162,8 @@ public class WishInfoUserRecordController {
|
|
|
msgResult.setResult(false);
|
|
msgResult.setResult(false);
|
|
|
msgResult.setMessage("数据库更新失败");
|
|
msgResult.setMessage("数据库更新失败");
|
|
|
}
|
|
}
|
|
|
- }
|
|
|
|
|
- catch(Exception ex){
|
|
|
|
|
- logger.error(ex.getMessage(),ex);
|
|
|
|
|
|
|
+ } catch (Exception ex) {
|
|
|
|
|
+ logger.error(ex.getMessage(), ex);
|
|
|
|
|
|
|
|
msgResult.setResult(false);
|
|
msgResult.setResult(false);
|
|
|
msgResult.setMessage(ex.getMessage());
|
|
msgResult.setMessage(ex.getMessage());
|
|
@@ -176,19 +172,19 @@ public class WishInfoUserRecordController {
|
|
|
return msgResult;
|
|
return msgResult;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- @ApiOperation(value="删除用户")
|
|
|
|
|
|
|
+ @ApiOperation(value = "删除用户")
|
|
|
@PostMapping("delete/{id}")
|
|
@PostMapping("delete/{id}")
|
|
|
- public MessageResult<WishInfoUserRecord> delete(@PathVariable("id") String id,@RequestAttribute String subject){
|
|
|
|
|
|
|
+ public MessageResult<WishInfoUserRecord> delete(@PathVariable("id") String id, @RequestAttribute String subject) {
|
|
|
MessageResult<WishInfoUserRecord> msgResult = new MessageResult<>();
|
|
MessageResult<WishInfoUserRecord> msgResult = new MessageResult<>();
|
|
|
|
|
|
|
|
try {
|
|
try {
|
|
|
-
|
|
|
|
|
- WishInfoUserRecord wishInfoUserRecord = wishInfoUserRecordService.get(id);
|
|
|
|
|
|
|
+
|
|
|
|
|
+ WishInfoUserRecord wishInfoUserRecord = wishInfoUserRecordService.get(id);
|
|
|
wishInfoUserRecord.setDelFlag(true);
|
|
wishInfoUserRecord.setDelFlag(true);
|
|
|
wishInfoUserRecord.setUpdateBy(subject);
|
|
wishInfoUserRecord.setUpdateBy(subject);
|
|
|
wishInfoUserRecord.setUpdateTime(new Date());
|
|
wishInfoUserRecord.setUpdateTime(new Date());
|
|
|
-
|
|
|
|
|
- int affectCount = wishInfoUserRecordService.update(wishInfoUserRecord);
|
|
|
|
|
|
|
+
|
|
|
|
|
+ int affectCount = wishInfoUserRecordService.update(wishInfoUserRecord);
|
|
|
|
|
|
|
|
if (affectCount > 0) {
|
|
if (affectCount > 0) {
|
|
|
msgResult.setResult(true);
|
|
msgResult.setResult(true);
|
|
@@ -196,9 +192,8 @@ public class WishInfoUserRecordController {
|
|
|
msgResult.setResult(false);
|
|
msgResult.setResult(false);
|
|
|
msgResult.setMessage("数据库删除失败");
|
|
msgResult.setMessage("数据库删除失败");
|
|
|
}
|
|
}
|
|
|
- }
|
|
|
|
|
- catch(Exception ex){
|
|
|
|
|
- logger.error(ex.getMessage(),ex);
|
|
|
|
|
|
|
+ } catch (Exception ex) {
|
|
|
|
|
+ logger.error(ex.getMessage(), ex);
|
|
|
|
|
|
|
|
msgResult.setResult(false);
|
|
msgResult.setResult(false);
|
|
|
msgResult.setMessage(ex.getMessage());
|
|
msgResult.setMessage(ex.getMessage());
|
|
@@ -207,19 +202,18 @@ public class WishInfoUserRecordController {
|
|
|
return msgResult;
|
|
return msgResult;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- @ApiOperation(value="更改状态")
|
|
|
|
|
|
|
+ @ApiOperation(value = "更改状态")
|
|
|
@PostMapping("changeStatus")
|
|
@PostMapping("changeStatus")
|
|
|
- public MessageResult<WishInfoUserRecord> changeStatus(String id,String status,@RequestAttribute String subject){
|
|
|
|
|
|
|
+ public MessageResult<WishInfoUserRecord> changeStatus(String id, String status, @RequestAttribute String subject) {
|
|
|
MessageResult<WishInfoUserRecord> msgResult = new MessageResult<>();
|
|
MessageResult<WishInfoUserRecord> msgResult = new MessageResult<>();
|
|
|
|
|
|
|
|
try {
|
|
try {
|
|
|
Date now = new Date();
|
|
Date now = new Date();
|
|
|
WishInfoUserRecord wishInfoUserRecord = wishInfoUserRecordService.get(id);
|
|
WishInfoUserRecord wishInfoUserRecord = wishInfoUserRecordService.get(id);
|
|
|
wishInfoUserRecord.setStatus(status);
|
|
wishInfoUserRecord.setStatus(status);
|
|
|
- if(status.equals("1")){
|
|
|
|
|
|
|
+ if (status.equals("1")) {
|
|
|
wishInfoUserRecord.setCompletionTime(now);
|
|
wishInfoUserRecord.setCompletionTime(now);
|
|
|
- }
|
|
|
|
|
- else{
|
|
|
|
|
|
|
+ } else {
|
|
|
wishInfoUserRecord.setCompletionTime(null);
|
|
wishInfoUserRecord.setCompletionTime(null);
|
|
|
}
|
|
}
|
|
|
wishInfoUserRecord.setUpdateBy(subject);
|
|
wishInfoUserRecord.setUpdateBy(subject);
|
|
@@ -228,10 +222,10 @@ public class WishInfoUserRecordController {
|
|
|
int affectCount = wishInfoUserRecordService.update(wishInfoUserRecord);
|
|
int affectCount = wishInfoUserRecordService.update(wishInfoUserRecord);
|
|
|
|
|
|
|
|
if (affectCount > 0) {
|
|
if (affectCount > 0) {
|
|
|
- if(status.equals("2")){
|
|
|
|
|
|
|
+ if (status.equals("2")) {
|
|
|
//如果更改为取消状态,需要修改心愿数量和已兑换数量
|
|
//如果更改为取消状态,需要修改心愿数量和已兑换数量
|
|
|
WishInfo wishInfo = wishInfoService.get(wishInfoUserRecord.getWishInfoId());
|
|
WishInfo wishInfo = wishInfoService.get(wishInfoUserRecord.getWishInfoId());
|
|
|
- if(wishInfo!=null){
|
|
|
|
|
|
|
+ if (wishInfo != null) {
|
|
|
int amount = wishInfo.getRemainingAmount() + 1;
|
|
int amount = wishInfo.getRemainingAmount() + 1;
|
|
|
wishInfo.setRemainingAmount(amount);
|
|
wishInfo.setRemainingAmount(amount);
|
|
|
wishInfo.setUpdateBy(subject);
|
|
wishInfo.setUpdateBy(subject);
|
|
@@ -244,9 +238,8 @@ public class WishInfoUserRecordController {
|
|
|
msgResult.setResult(false);
|
|
msgResult.setResult(false);
|
|
|
msgResult.setMessage("数据库删除失败");
|
|
msgResult.setMessage("数据库删除失败");
|
|
|
}
|
|
}
|
|
|
- }
|
|
|
|
|
- catch(Exception ex){
|
|
|
|
|
- logger.error(ex.getMessage(),ex);
|
|
|
|
|
|
|
+ } catch (Exception ex) {
|
|
|
|
|
+ logger.error(ex.getMessage(), ex);
|
|
|
|
|
|
|
|
msgResult.setResult(false);
|
|
msgResult.setResult(false);
|
|
|
msgResult.setMessage(ex.getMessage());
|
|
msgResult.setMessage(ex.getMessage());
|
|
@@ -256,10 +249,9 @@ public class WishInfoUserRecordController {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
|
- @ApiOperation(value="批量删除")
|
|
|
|
|
|
|
+ @ApiOperation(value = "批量删除")
|
|
|
@PostMapping("batchDelete")
|
|
@PostMapping("batchDelete")
|
|
|
- public MessageResult<Integer> batchDelete(@RequestBody List<String> idList,@RequestAttribute String subject){
|
|
|
|
|
|
|
+ public MessageResult<Integer> batchDelete(@RequestBody List<String> idList, @RequestAttribute String subject) {
|
|
|
MessageResult<Integer> msgResult = new MessageResult<>();
|
|
MessageResult<Integer> msgResult = new MessageResult<>();
|
|
|
|
|
|
|
|
try {
|
|
try {
|
|
@@ -281,9 +273,8 @@ public class WishInfoUserRecordController {
|
|
|
msgResult.setResult(false);
|
|
msgResult.setResult(false);
|
|
|
msgResult.setMessage("删除失败");
|
|
msgResult.setMessage("删除失败");
|
|
|
}
|
|
}
|
|
|
- }
|
|
|
|
|
- catch(Exception ex){
|
|
|
|
|
- logger.error(ex.getMessage(),ex);
|
|
|
|
|
|
|
+ } catch (Exception ex) {
|
|
|
|
|
+ logger.error(ex.getMessage(), ex);
|
|
|
|
|
|
|
|
msgResult.setResult(false);
|
|
msgResult.setResult(false);
|
|
|
msgResult.setMessage(ex.getMessage());
|
|
msgResult.setMessage(ex.getMessage());
|
|
@@ -292,76 +283,76 @@ public class WishInfoUserRecordController {
|
|
|
return msgResult;
|
|
return msgResult;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- @ApiOperation(value="列表")
|
|
|
|
|
- @RequestMapping(value = "pageList",method = RequestMethod.POST)
|
|
|
|
|
|
|
+ @ApiOperation(value = "列表")
|
|
|
|
|
+ @RequestMapping(value = "pageList", method = RequestMethod.POST)
|
|
|
public MessageResult<Map> pageList(
|
|
public MessageResult<Map> pageList(
|
|
|
- String wishInfoId,String status,String num,String wishInfoTitle,
|
|
|
|
|
- String category,String phone,
|
|
|
|
|
- @RequestParam(value="pageIndex",defaultValue="1") int pageIndex,
|
|
|
|
|
- @RequestParam(value="pageSize",defaultValue="20") int pageSize,
|
|
|
|
|
- HttpServletRequest request){
|
|
|
|
|
- String subject = (String)request.getAttribute("subject");
|
|
|
|
|
|
|
+ String wishInfoId, String status, String num, String wishInfoTitle,
|
|
|
|
|
+ String category, String phone,
|
|
|
|
|
+ @RequestParam(value = "pageIndex", defaultValue = "1") int pageIndex,
|
|
|
|
|
+ @RequestParam(value = "pageSize", defaultValue = "20") int pageSize,
|
|
|
|
|
+ HttpServletRequest request) {
|
|
|
|
|
+ String subject = (String) request.getAttribute("subject");
|
|
|
|
|
|
|
|
//当前用户ID
|
|
//当前用户ID
|
|
|
System.out.println(subject);
|
|
System.out.println(subject);
|
|
|
|
|
|
|
|
MessageResult<Map> msgResult = new MessageResult<>();
|
|
MessageResult<Map> msgResult = new MessageResult<>();
|
|
|
|
|
|
|
|
- Map<String,Object> searchParams = new HashMap<>();
|
|
|
|
|
|
|
+ Map<String, Object> searchParams = new HashMap<>();
|
|
|
|
|
|
|
|
List<Sort> sortList = new ArrayList<>();
|
|
List<Sort> sortList = new ArrayList<>();
|
|
|
- sortList.add(new Sort("a.create_time","desc"));
|
|
|
|
|
|
|
+ sortList.add(new Sort("a.create_time", "desc"));
|
|
|
|
|
|
|
|
if (StringUtils.isNotEmpty(wishInfoId)) {
|
|
if (StringUtils.isNotEmpty(wishInfoId)) {
|
|
|
- searchParams.put("wishInfoId",wishInfoId);
|
|
|
|
|
|
|
+ searchParams.put("wishInfoId", wishInfoId);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if (StringUtils.isNotEmpty(status)) {
|
|
if (StringUtils.isNotEmpty(status)) {
|
|
|
- searchParams.put("status",status);
|
|
|
|
|
|
|
+ searchParams.put("status", status);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if (StringUtils.isNotEmpty(num)) {
|
|
if (StringUtils.isNotEmpty(num)) {
|
|
|
- searchParams.put("num",num+"%");
|
|
|
|
|
|
|
+ searchParams.put("num", "%" + num + "%");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if (StringUtils.isNotEmpty(wishInfoTitle)) {
|
|
if (StringUtils.isNotEmpty(wishInfoTitle)) {
|
|
|
- searchParams.put("wishInfoTitle",wishInfoTitle);
|
|
|
|
|
|
|
+ searchParams.put("wishInfoTitle", "%" + wishInfoTitle + "%");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if (StringUtils.isNotEmpty(category)) {
|
|
if (StringUtils.isNotEmpty(category)) {
|
|
|
- searchParams.put("category",category);
|
|
|
|
|
|
|
+ searchParams.put("category", category);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if (StringUtils.isNotEmpty(phone)) {
|
|
if (StringUtils.isNotEmpty(phone)) {
|
|
|
- searchParams.put("phone",phone);
|
|
|
|
|
|
|
+ searchParams.put("phone", phone);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
- Page<WishInfoUserRecord> page = wishInfoUserRecordService.pageSearch(searchParams,pageIndex,pageSize,true,sortList);
|
|
|
|
|
|
|
+ Page<WishInfoUserRecord> page = wishInfoUserRecordService.pageSearch(searchParams, pageIndex, pageSize, true, sortList);
|
|
|
|
|
|
|
|
- for (WishInfoUserRecord wishInfoUserRecord:page) {
|
|
|
|
|
|
|
+ for (WishInfoUserRecord wishInfoUserRecord : page) {
|
|
|
RegUser regUser = regUserService.get(wishInfoUserRecord.getRegUserId());
|
|
RegUser regUser = regUserService.get(wishInfoUserRecord.getRegUserId());
|
|
|
- if(regUser!=null){
|
|
|
|
|
|
|
+ if (regUser != null) {
|
|
|
wishInfoUserRecord.setRegUserName(regUser.getRealName());
|
|
wishInfoUserRecord.setRegUserName(regUser.getRealName());
|
|
|
wishInfoUserRecord.setRegUserPhone(regUser.getPhone());
|
|
wishInfoUserRecord.setRegUserPhone(regUser.getPhone());
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
WishInfo wishInfo = wishInfoService.get(wishInfoUserRecord.getWishInfoId());
|
|
WishInfo wishInfo = wishInfoService.get(wishInfoUserRecord.getWishInfoId());
|
|
|
- if(wishInfo!=null){
|
|
|
|
|
|
|
+ if (wishInfo != null) {
|
|
|
|
|
|
|
|
wishInfoUserRecord.setStudentType(wishInfo.getStudentType());
|
|
wishInfoUserRecord.setStudentType(wishInfo.getStudentType());
|
|
|
wishInfoUserRecord.setWishInfoTitle(wishInfo.getTitle());
|
|
wishInfoUserRecord.setWishInfoTitle(wishInfo.getTitle());
|
|
|
|
|
|
|
|
- String categoryN = dataDictionaryService.findNameByCatalogNameAndValue("心愿类型",wishInfo.getCategory());
|
|
|
|
|
- if(StringUtils.isNotEmpty(categoryN)){
|
|
|
|
|
|
|
+ String categoryN = dataDictionaryService.findNameByCatalogNameAndValue("心愿类型", wishInfo.getCategory());
|
|
|
|
|
+ if (StringUtils.isNotEmpty(categoryN)) {
|
|
|
wishInfoUserRecord.setCategoryN(categoryN);
|
|
wishInfoUserRecord.setCategoryN(categoryN);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- if(StringUtils.isNotEmpty(wishInfoUserRecord.getStudentAspirationsId())){
|
|
|
|
|
|
|
+ if (StringUtils.isNotEmpty(wishInfoUserRecord.getStudentAspirationsId())) {
|
|
|
StudentAspirations studentAspirations = studentAspirationsService.get(wishInfoUserRecord.getStudentAspirationsId());
|
|
StudentAspirations studentAspirations = studentAspirationsService.get(wishInfoUserRecord.getStudentAspirationsId());
|
|
|
- if(studentAspirations!=null){
|
|
|
|
|
|
|
+ if (studentAspirations != null) {
|
|
|
wishInfoUserRecord.setAspirationsName(studentAspirations.getName());
|
|
wishInfoUserRecord.setAspirationsName(studentAspirations.getName());
|
|
|
wishInfoUserRecord.setStudentName(studentAspirations.getStudentName());
|
|
wishInfoUserRecord.setStudentName(studentAspirations.getStudentName());
|
|
|
}
|
|
}
|
|
@@ -377,11 +368,10 @@ public class WishInfoUserRecordController {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
|
- @ApiOperation(value="保存发货时间")
|
|
|
|
|
- @RequestMapping(value = "updateDeliveryTime",method = RequestMethod.POST)
|
|
|
|
|
- public MessageResult<Map> updateDeliveryTime(String id,String deliveryTime, HttpServletRequest request){
|
|
|
|
|
- String subject = (String)request.getAttribute("subject");
|
|
|
|
|
|
|
+ @ApiOperation(value = "保存发货时间")
|
|
|
|
|
+ @RequestMapping(value = "updateDeliveryTime", method = RequestMethod.POST)
|
|
|
|
|
+ public MessageResult<Map> updateDeliveryTime(String id, String deliveryTime, HttpServletRequest request) {
|
|
|
|
|
+ String subject = (String) request.getAttribute("subject");
|
|
|
|
|
|
|
|
//当前用户ID
|
|
//当前用户ID
|
|
|
System.out.println(subject);
|
|
System.out.println(subject);
|
|
@@ -392,8 +382,8 @@ public class WishInfoUserRecordController {
|
|
|
Date now = new Date();
|
|
Date now = new Date();
|
|
|
WishInfoUserRecord wishInfoUserRecord = wishInfoUserRecordService.get(id);
|
|
WishInfoUserRecord wishInfoUserRecord = wishInfoUserRecordService.get(id);
|
|
|
|
|
|
|
|
- if(StringUtils.isNotEmpty(deliveryTime)){
|
|
|
|
|
- SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd");
|
|
|
|
|
|
|
+ if (StringUtils.isNotEmpty(deliveryTime)) {
|
|
|
|
|
+ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
wishInfoUserRecord.setDeliveryTime(sdf.parse(deliveryTime));
|
|
wishInfoUserRecord.setDeliveryTime(sdf.parse(deliveryTime));
|
|
|
wishInfoUserRecord.setUpdateBy(subject);
|
|
wishInfoUserRecord.setUpdateBy(subject);
|
|
|
wishInfoUserRecord.setUpdateTime(new Date());
|
|
wishInfoUserRecord.setUpdateTime(new Date());
|
|
@@ -407,9 +397,8 @@ public class WishInfoUserRecordController {
|
|
|
msgResult.setResult(false);
|
|
msgResult.setResult(false);
|
|
|
msgResult.setMessage("数据库删除失败");
|
|
msgResult.setMessage("数据库删除失败");
|
|
|
}
|
|
}
|
|
|
- }
|
|
|
|
|
- catch(Exception ex){
|
|
|
|
|
- logger.error(ex.getMessage(),ex);
|
|
|
|
|
|
|
+ } catch (Exception ex) {
|
|
|
|
|
+ logger.error(ex.getMessage(), ex);
|
|
|
|
|
|
|
|
msgResult.setResult(false);
|
|
msgResult.setResult(false);
|
|
|
msgResult.setMessage(ex.getMessage());
|
|
msgResult.setMessage(ex.getMessage());
|