|
@@ -6,6 +6,7 @@ import java.util.stream.Collectors;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
import javax.validation.ValidationException;
|
|
import javax.validation.ValidationException;
|
|
|
|
|
|
|
|
|
|
+import com.alibaba.fastjson2.JSONObject;
|
|
|
import com.ruoyi.common.core.domain.entity.SysUser;
|
|
import com.ruoyi.common.core.domain.entity.SysUser;
|
|
|
import com.ruoyi.common.enums.ExamType;
|
|
import com.ruoyi.common.enums.ExamType;
|
|
|
import com.ruoyi.common.enums.UserRegStatus;
|
|
import com.ruoyi.common.enums.UserRegStatus;
|
|
@@ -18,8 +19,10 @@ import com.ruoyi.enums.CardAction;
|
|
|
import com.ruoyi.enums.CardType;
|
|
import com.ruoyi.enums.CardType;
|
|
|
import com.ruoyi.enums.UserTypeEnum;
|
|
import com.ruoyi.enums.UserTypeEnum;
|
|
|
import com.ruoyi.system.service.ISysUserService;
|
|
import com.ruoyi.system.service.ISysUserService;
|
|
|
|
|
+import com.ruoyi.web.domain.CardUserBody;
|
|
|
import com.ruoyi.web.domain.DzCardExport;
|
|
import com.ruoyi.web.domain.DzCardExport;
|
|
|
import com.ruoyi.web.service.SysLoginService;
|
|
import com.ruoyi.web.service.SysLoginService;
|
|
|
|
|
+import com.ruoyi.web.service.SysRegisterService;
|
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import io.swagger.annotations.ApiParam;
|
|
import io.swagger.annotations.ApiParam;
|
|
@@ -56,6 +59,8 @@ public class DzCardsController extends BaseController
|
|
|
private ISysUserService sysUserService;
|
|
private ISysUserService sysUserService;
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private SysLoginService sysLoginService;
|
|
private SysLoginService sysLoginService;
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private SysRegisterService sysRegisterService;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* 查询学习卡列表
|
|
* 查询学习卡列表
|
|
@@ -166,9 +171,9 @@ public class DzCardsController extends BaseController
|
|
|
return AjaxResult.success();
|
|
return AjaxResult.success();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- @Log(title = "分配卡", businessType = BusinessType.INSERT)
|
|
|
|
|
|
|
+ @Log(title = "分配开卡", businessType = BusinessType.INSERT)
|
|
|
@PostMapping("/assignCard")
|
|
@PostMapping("/assignCard")
|
|
|
- @ApiOperation("分配卡")
|
|
|
|
|
|
|
+ @ApiOperation("分配即开卡")
|
|
|
public AjaxResult assignCard(@ApiParam("代理商") @RequestParam Long agentId, @ApiParam("卡类型") String type, @ApiParam(value = "卡类型") Integer cardType,
|
|
public AjaxResult assignCard(@ApiParam("代理商") @RequestParam Long agentId, @ApiParam("卡类型") String type, @ApiParam(value = "卡类型") Integer cardType,
|
|
|
@ApiParam("开始号") @RequestParam String begin, @ApiParam("结束号") @RequestParam String end,
|
|
@ApiParam("开始号") @RequestParam String begin, @ApiParam("结束号") @RequestParam String end,
|
|
|
@ApiParam("省份") @RequestParam(required = false) String location,
|
|
@ApiParam("省份") @RequestParam(required = false) String location,
|
|
@@ -201,7 +206,7 @@ public class DzCardsController extends BaseController
|
|
|
public AjaxResult openCard(@ApiParam("代理商") Long agentId, @ApiParam("省份") String location, @ApiParam("学校") Long schoolId, @ApiParam("开始号") String begin, @ApiParam("结束号") String end,
|
|
public AjaxResult openCard(@ApiParam("代理商") Long agentId, @ApiParam("省份") String location, @ApiParam("学校") Long schoolId, @ApiParam("开始号") String begin, @ApiParam("结束号") String end,
|
|
|
@ApiParam("有效天数") @RequestParam(required = false) Integer days)
|
|
@ApiParam("有效天数") @RequestParam(required = false) Integer days)
|
|
|
{
|
|
{
|
|
|
- return AjaxResult.success(dzCardsService.openCard(agentId, location, schoolId, begin, end, days));
|
|
|
|
|
|
|
+ return AjaxResult.error("暂不支持,现在分配即开卡"); // success(dzCardsService.openCard(agentId, location, schoolId, begin, end, days));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Log(title = "分配校区", businessType = BusinessType.INSERT)
|
|
@Log(title = "分配校区", businessType = BusinessType.INSERT)
|
|
@@ -214,7 +219,7 @@ public class DzCardsController extends BaseController
|
|
|
|
|
|
|
|
@Log(title = "修改卡", businessType = BusinessType.UPDATE)
|
|
@Log(title = "修改卡", businessType = BusinessType.UPDATE)
|
|
|
@PostMapping("/changeCard")
|
|
@PostMapping("/changeCard")
|
|
|
- @ApiOperation("修改卡 重卡/关卡/支付")
|
|
|
|
|
|
|
+ @ApiOperation("修改卡 重卡/关卡/支付/续费/结算")
|
|
|
public AjaxResult changeCard(@ApiParam("操作") @RequestParam CardAction action, @ApiParam("卡ID") @RequestParam Long[] cardIds)
|
|
public AjaxResult changeCard(@ApiParam("操作") @RequestParam CardAction action, @ApiParam("卡ID") @RequestParam Long[] cardIds)
|
|
|
{
|
|
{
|
|
|
dzCardsService.changeCard(action, cardIds);
|
|
dzCardsService.changeCard(action, cardIds);
|
|
@@ -235,6 +240,14 @@ public class DzCardsController extends BaseController
|
|
|
return AjaxResult.success();
|
|
return AjaxResult.success();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ @Log(title = "修改卡用户信息", businessType = BusinessType.UPDATE)
|
|
|
|
|
+ @PostMapping("/updateCardUser")
|
|
|
|
|
+ @ApiOperation("修改卡用户信息")
|
|
|
|
|
+ public AjaxResult updateCardUser(@RequestBody CardUserBody cardUserBody) {
|
|
|
|
|
+ sysRegisterService.improve(cardUserBody);
|
|
|
|
|
+ return AjaxResult.success();
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
|
|
|
private CardType getCardType(Long institutionId, String type) {
|
|
private CardType getCardType(Long institutionId, String type) {
|
|
|
if(!NumberUtils.isNumeric(type)) {
|
|
if(!NumberUtils.isNumeric(type)) {
|