Commit 579b0182 by chongli

代金券后台查看详情时显示代金券是否只限本人使用

parent cce29e20
...@@ -21,6 +21,7 @@ import org.springframework.web.bind.annotation.RequestMethod; ...@@ -21,6 +21,7 @@ import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.mvc.support.RedirectAttributes; import org.springframework.web.servlet.mvc.support.RedirectAttributes;
import org.springframework.web.util.HtmlUtils; import org.springframework.web.util.HtmlUtils;
import com.alibaba.fastjson.JSONObject;
import com.ctrip.fun.admin.form.PaginationForm; import com.ctrip.fun.admin.form.PaginationForm;
import com.ctrip.fun.admin.service.basic.VoucherRuleService; import com.ctrip.fun.admin.service.basic.VoucherRuleService;
import com.ctrip.fun.admin.service.system.UserService; import com.ctrip.fun.admin.service.system.UserService;
...@@ -131,6 +132,12 @@ public class VoucherRuleController { ...@@ -131,6 +132,12 @@ public class VoucherRuleController {
VoucherRuleBean bean = voucherRuleService.getById(id); VoucherRuleBean bean = voucherRuleService.getById(id);
VoucherRuleDto dto = new VoucherRuleDto(); VoucherRuleDto dto = new VoucherRuleDto();
BeanConverter.copyProperties(dto, bean); BeanConverter.copyProperties(dto, bean);
JSONObject jsobj = JSONObject.parseObject(dto.getConditionJson());
if(jsobj.get("onlyMe")!=null&&(Integer)jsobj.get("onlyMe")==1){
dto.setOnlyMe(1);
}else{
dto.setOnlyMe(0);
}
if (dto.getVoucherType() != 0) { if (dto.getVoucherType() != 0) {
dto.setVoucherTypeMsg(VoucherTypeEnum.valueOf(dto.getVoucherType()).getMsg()); dto.setVoucherTypeMsg(VoucherTypeEnum.valueOf(dto.getVoucherType()).getMsg());
} }
......
...@@ -469,6 +469,16 @@ function getResourceList(page){ ...@@ -469,6 +469,16 @@ function getResourceList(page){
<td style="text-align:left">${dto.quantity!}</td> <td style="text-align:left">${dto.quantity!}</td>
</tr> </tr>
<tr> <tr>
<td style="text-align:left">本人使用</td>
<td style="text-align:left">
<#if dto.onlyMe == 1>
<#elseif dto.onlyMe == 0>
</#if>
</td>
</tr>
<tr>
<#if dto.sendToUserType == 1> <#if dto.sendToUserType == 1>
<td style="text-align:left">发放用户类型</td> <td style="text-align:left">发放用户类型</td>
<td style="text-align:left">${dto.sendToUserValueMsg!}</td> <td style="text-align:left">${dto.sendToUserValueMsg!}</td>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment