Bläddra i källkod

Merge branch 'zx_saas_director_0927' into dev

刘俊驰 11 månader sedan
förälder
incheckning
771f900ca7

+ 1 - 1
mec-application/src/main/java/com/ym/mec/config/ResourceServerConfig.java

@@ -37,7 +37,7 @@ public class ResourceServerConfig extends ResourceServerConfigurerAdapter {
                         "/*/v2/api-docs", "/*/code/*",
 
                 //student
-                        "/api-student/wechat/*","/api-student/area/*","/api-student/tempDirectorTrainingCamp/*", "/api-student/student/registering", "/api-student/register/*", "/api-student/studentOrder/**", "/api-student/musicGroup/getSubjectGoodsAndInfo",
+                        "/api-student/wechat/*","/api-student/tempDirectorTrainingCamp/*", "/api-student/student/registering", "/api-student/register/*", "/api-student/studentOrder/**", "/api-student/musicGroup/getSubjectGoodsAndInfo",
                         "/api-student/musicGroup/getMusicGroupStatus", "/api-student/musicGroup/getOrderStatus","/api-student/sysCouponCode/queryPage",
                         "/api-student/musicGroup/pay", "/api-student/musicGroup/rePay", "/api-student/studentManage/queryStudentPer",
                         "/api-student/sporadicChargeInfo/get", "/api-student/sporadicChargeInfo/sporadicPay", "/api-student/repair/getRepairInfo", "/api-student/repair/payRepair",

+ 0 - 42
mec-application/src/main/java/com/ym/mec/student/controller/SysAreaController.java

@@ -1,42 +0,0 @@
-package com.ym.mec.student.controller;
-
-import com.ym.mec.biz.dal.dto.TreeDto;
-import com.ym.mec.biz.service.SysAreaService;
-import com.ym.mec.common.controller.BaseController;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-import javax.annotation.Resource;
-
-@RequestMapping("${app-config.url.student:}/area")
-@Api(tags = "区域服务")
-@RestController
-public class SysAreaController extends BaseController {
-
-    @Resource
-    private SysAreaService sysAreaService;
-
-    @ApiOperation(value = "根据父节点查询区域树状列表(递归)")
-    @GetMapping("/queryTree")
-    public Object queryPage(TreeDto treeDto){
-        return succeed(sysAreaService.queryTreePage(treeDto));
-    }
-
-    @ApiOperation(value = "根据父节点查询下一级子节点列表(不递归)")
-    @GetMapping("/queryChild")
-    public Object queryChild(TreeDto treeDto){
-        return succeed(sysAreaService.queryChild(treeDto));
-    }
-
-    @ApiOperation(value = "根据子级区域获取父级节点")
-    @GetMapping("/getParentArea/{id}")
-    @ApiParam(value = "区域编号", required = true)
-    public Object getParentArea( @PathVariable("id") Integer id){
-        return succeed(sysAreaService.getParentArea(id));
-    }
-}

+ 1 - 0
mec-application/src/main/java/com/ym/mec/web/controller/TempDirectorTrainingCampController.java

@@ -54,6 +54,7 @@ public class TempDirectorTrainingCampController extends BaseController {
         if (sysUser == null) {
             return failed(HttpStatus.FORBIDDEN, "请登录");
         }
+        dto.setUpdateBy(sysUser.getId());
         tempDirectorTrainingCampService.modify(dto);
         return succeed();
     }

+ 5 - 0
mec-application/src/main/java/com/ym/mec/web/controller/TempDirectorTrainingCampDetailController.java

@@ -16,6 +16,7 @@ import com.ym.mec.biz.service.TempDirectorTrainingCampDetailService;
 import com.ym.mec.biz.service.TempDirectorTrainingCampService;
 import com.ym.mec.common.controller.BaseController;
 import com.ym.mec.common.entity.HttpResponseResult;
+import com.ym.mec.util.date.DateUtil;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
@@ -30,6 +31,7 @@ import org.springframework.web.bind.annotation.RestController;
 import javax.annotation.Resource;
 import java.io.File;
 import java.text.MessageFormat;
+import java.util.Date;
 import java.util.List;
 
 @Api(tags = "乐队指导训练营活动")
@@ -90,6 +92,9 @@ public class TempDirectorTrainingCampDetailController extends BaseController {
                     record.setPaymentStatusName("已退费");
                 }
             }
+            if (record.getPaymentDate() !=null) {
+                record.setPaymentDateStr(DateUtil.format(record.getPaymentDate(),DateUtil.EXPANDED_DATE_TIME_FORMAT));
+            }
         }
         TempDirectorTrainingCampDetailWrapper.DownloadInfo downloadInfo = generateExportExcelFile(records, TempDirectorTrainingCampDetailWrapper.TempDirectorTrainingCampDetail.class, trainingCamp.getName()+"导出", trainingCamp.getName()+"导出");
         return succeed(downloadInfo);

+ 5 - 1
mec-biz/src/main/java/com/ym/mec/biz/dal/wrapper/TempDirectorTrainingCampDetailWrapper.java

@@ -226,8 +226,12 @@ public class TempDirectorTrainingCampDetailWrapper {
         private Boolean birdFlag = false;
 
         @ApiModelProperty(value = "缴费时间")
+        @ExcelIgnore
+        private Date paymentDate;
+
+        @ApiModelProperty(value = "缴费时间")
         @ExcelProperty(value = "缴费时间",order = 12)
-        private String paymentDate;
+        private String paymentDateStr;
 
         @ApiModelProperty(value = "职业")
         @ExcelProperty(value = "目前从事职业",order = 5)

+ 17 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/TempDirectorTrainingCampServiceImpl.java

@@ -96,6 +96,9 @@ public class TempDirectorTrainingCampServiceImpl extends ServiceImpl<TempDirecto
             }
             if (o.getBirdPrice() !=null && o.getBirdPriceEndDate() != null) {
                 o.setHasBirdPrice(true);
+            } else {
+                o.setHasBirdPrice(false);
+                o.setBirdPrice(null);
             }
             Date date = new Date();
             if (o.getApplyStartDate().after(date)) {
@@ -105,6 +108,20 @@ public class TempDirectorTrainingCampServiceImpl extends ServiceImpl<TempDirecto
             } else {
                 o.setStatus("APPLY");
             }
+
+            // 价格设置两位小数
+            if (o.getBirdPrice() !=null) {
+                o.setBirdPrice(o.getBirdPrice().setScale(2, RoundingMode.HALF_UP));
+            }
+            if (o.getCurrentPrice() !=null) {
+                o.setCurrentPrice(o.getCurrentPrice().setScale(2, RoundingMode.HALF_UP));
+            }
+            if (o.getOriginalPrice() !=null) {
+                o.setOriginalPrice(o.getOriginalPrice().setScale(2, RoundingMode.HALF_UP));
+            }
+            if (o.getPayAmount() !=null) {
+                o.setPayAmount(o.getPayAmount().setScale(2, RoundingMode.HALF_UP));
+            }
         });
 
         // 报名人数,缴费人数 搜款金额