generated from root/miduo_server
礼包码流程简化
parent
e964b37af2
commit
b99960110d
|
|
@ -123,7 +123,7 @@ public class CdkInfoController {
|
|||
public String findCdkInfo (ModelMap map, HttpServletRequest request) throws Exception {
|
||||
String path;
|
||||
HashMap<String, String> parameterMap = JsonUtil.getInstence().getParameterMap(request);
|
||||
int type = Integer.valueOf(parameterMap.get("type"));
|
||||
int type = Integer.parseInt(parameterMap.get("type"));
|
||||
List<CdkUseInfo> cdkUseInfo;
|
||||
if (type == 1){
|
||||
path = "queryUserInfoByCdk";
|
||||
|
|
@ -133,7 +133,7 @@ public class CdkInfoController {
|
|||
else if (type == 2){
|
||||
path = "queryCdkInfoByUser";
|
||||
String userId = parameterMap.get("userId");
|
||||
cdkUseInfo = cdkInfoDao.findCdkUseInfoByUId(Integer.valueOf(userId));
|
||||
cdkUseInfo = cdkInfoDao.findCdkUseInfoByUId(Integer.parseInt(userId));
|
||||
}
|
||||
else {
|
||||
throw new Exception("type is error !!!");
|
||||
|
|
@ -145,8 +145,6 @@ public class CdkInfoController {
|
|||
|
||||
/**
|
||||
* 转vo对象
|
||||
* @param useInfos
|
||||
* @return
|
||||
*/
|
||||
private List<UseCDKInfoVo> voToCdk(List<CdkUseInfo> useInfos){
|
||||
List<UseCDKInfoVo> list = new ArrayList<>();
|
||||
|
|
@ -236,10 +234,10 @@ public class CdkInfoController {
|
|||
@RequestMapping(value = "/addCdkGoodsInfo", method = {RequestMethod.POST, RequestMethod.GET})
|
||||
public String addCdkGoodsInfo(HttpServletRequest request) throws Exception {
|
||||
HashMap<String, String> parameterMap = JsonUtil.getInstence().getParameterMap(request);
|
||||
String pid = parameterMap.get("pid");
|
||||
String roleUseNum = parameterMap.get("roleUseNum");
|
||||
String pid = "0";
|
||||
String roleUseNum = "1";
|
||||
String addType = "0";
|
||||
String goodsName = parameterMap.get("goodsName");
|
||||
String addType = parameterMap.get("addType");
|
||||
String goodsNum = parameterMap.get("goodsNum");
|
||||
String startTime = JsonUtil.date3TimeStamp(parameterMap.get("startTime"));
|
||||
String endTime = JsonUtil.date3TimeStamp(parameterMap.get("endTime"));
|
||||
|
|
|
|||
|
|
@ -73,36 +73,35 @@
|
|||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row cl">
|
||||
<label class="form-label col-xs-4 col-sm-2" title="不懂填0">
|
||||
<span class="c-red">*</span>
|
||||
渠道id:</label>
|
||||
<div class="formControls col-xs-8 col-sm-9">
|
||||
<input type="text" name="pid" placeholder="pid" value="" class="input-text"/>
|
||||
<span class="PID"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row cl">
|
||||
<label class="form-label col-xs-4 col-sm-2">
|
||||
<span class="c-red">*</span>
|
||||
使用属性:</label>
|
||||
<div class="formControls col-xs-8 col-sm-9">
|
||||
<select name="addType" class="input-text" id="contentType"><!--下拉列表-->
|
||||
<option value="0" selected = "selected">不可重复</option>
|
||||
<option value="1" >可重複使用</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row cl">
|
||||
<label class="form-label col-xs-4 col-sm-2">
|
||||
<span class="c-red">*</span>
|
||||
单角色使用数量:</label>
|
||||
<div class="formControls col-xs-8 col-sm-9">
|
||||
<input type="text" name="roleUseNum" placeholder="" value="" class="input-text"/>
|
||||
<span class="ROLEUSENUM"></span>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="row cl">-->
|
||||
<!-- <label class="form-label col-xs-4 col-sm-2" title="不懂填0">-->
|
||||
<!-- <span class="c-red">*</span>-->
|
||||
<!-- 渠道id:</label>-->
|
||||
<!-- <div class="formControls col-xs-8 col-sm-9">-->
|
||||
<!-- <input type="text" name="pid" placeholder="pid" value="" class="input-text"/>-->
|
||||
<!-- <span class="PID"></span>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="row cl">-->
|
||||
<!-- <label class="form-label col-xs-4 col-sm-2">-->
|
||||
<!-- <span class="c-red">*</span>-->
|
||||
<!-- 使用属性:</label>-->
|
||||
<!-- <div class="formControls col-xs-8 col-sm-9">-->
|
||||
<!-- <select name="addType" class="input-text" id="contentType"><!–下拉列表–>-->
|
||||
<!-- <option value="0" selected = "selected">不可重复</option>-->
|
||||
<!-- <option value="1" >可重複使用</option>-->
|
||||
<!-- </select>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="row cl">-->
|
||||
<!-- <label class="form-label col-xs-4 col-sm-2">-->
|
||||
<!-- <span class="c-red">*</span>-->
|
||||
<!-- 单角色使用数量:</label>-->
|
||||
<!-- <div class="formControls col-xs-8 col-sm-9">-->
|
||||
<!-- <input type="text" name="roleUseNum" placeholder="" value="" class="input-text"/>-->
|
||||
<!-- <span class="ROLEUSENUM"></span>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
|
||||
<div class="row cl">
|
||||
<label class="form-label col-xs-4 col-sm-2">
|
||||
|
|
@ -256,9 +255,9 @@ function toaddCDKInfo() {
|
|||
var startTime = $("input[name='startTime']").val();
|
||||
var endTime = $("input[name='endTime']").val();
|
||||
var goodsInfo = $("input[name='goodsInfo']").val();
|
||||
var pid = $("input[name='pid']").val();
|
||||
// var pid = $("input[name='pid']").val();
|
||||
var customGood = $("input[name='customGood']").val();
|
||||
var roleUseNum = $("input[name='roleUseNum']").val();
|
||||
// var roleUseNum = $("input[name='roleUseNum']").val();
|
||||
|
||||
if (customGood != "" && customGood.length < 5) {
|
||||
erroCode = $('.CUSTOMGOOD');
|
||||
|
|
@ -270,11 +269,11 @@ function toaddCDKInfo() {
|
|||
erroCode.html('<span style="color: red; ">创建自定义礼包码,礼包码数量之只能为1!</span>');
|
||||
return false;
|
||||
}
|
||||
if (customGood != "" && roleUseNum != 1) {
|
||||
erroCode = $('.CUSTOMGOOD');
|
||||
erroCode.html('<span style="color: red; ">创建自定义礼包码,单个玩家使用次数必须为1</span>');
|
||||
return false;
|
||||
}
|
||||
// if (customGood != "" && roleUseNum != 1) {
|
||||
// erroCode = $('.CUSTOMGOOD');
|
||||
// erroCode.html('<span style="color: red; ">创建自定义礼包码,单个玩家使用次数必须为1</span>');
|
||||
// return false;
|
||||
// }
|
||||
if (goodsName === '' || goodsName == null) {
|
||||
erroCode.html('<span style="color: red; ">商品名称不能为空!</span>');
|
||||
return false;
|
||||
|
|
@ -298,11 +297,11 @@ function toaddCDKInfo() {
|
|||
erroCode.html('<span style="color: red; ">商品信息不能为空!</span>');
|
||||
return false;
|
||||
}
|
||||
if (pid === '' || pid == null) {
|
||||
erroCode = $('.PID');
|
||||
erroCode.html('<span style="color: red; ">渠道id不能为空!</span>');
|
||||
return false;
|
||||
}
|
||||
// if (pid === '' || pid == null) {
|
||||
// erroCode = $('.PID');
|
||||
// erroCode.html('<span style="color: red; ">渠道id不能为空!</span>');
|
||||
// return false;
|
||||
// }
|
||||
return true;
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Reference in New Issue