{"action":"opened","issue":{"url":"https://api.github.com/repos/JeffreySu/WeiXinMPSDK/issues/1560","repository_url":"https://api.github.com/repos/JeffreySu/WeiXinMPSDK","labels_url":"https://api.github.com/repos/JeffreySu/WeiXinMPSDK/issues/1560/labels{/name}","comments_url":"https://api.github.com/repos/JeffreySu/WeiXinMPSDK/issues/1560/comments","events_url":"https://api.github.com/repos/JeffreySu/WeiXinMPSDK/issues/1560/events","html_url":"https://github.com/JeffreySu/WeiXinMPSDK/issues/1560","id":395792946,"node_id":"MDU6SXNzdWUzOTU3OTI5NDY=","number":1560,"title":"会员卡创建接口变动","user":{"login":"LGinC","id":15363011,"node_id":"MDQ6VXNlcjE1MzYzMDEx","avatar_url":"https://avatars2.githubusercontent.com/u/15363011?v=4","gravatar_id":"","url":"https://api.github.com/users/LGinC","html_url":"https://github.com/LGinC","followers_url":"https://api.github.com/users/LGinC/followers","following_url":"https://api.github.com/users/LGinC/following{/other_user}","gists_url":"https://api.github.com/users/LGinC/gists{/gist_id}","starred_url":"https://api.github.com/users/LGinC/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LGinC/subscriptions","organizations_url":"https://api.github.com/users/LGinC/orgs","repos_url":"https://api.github.com/users/LGinC/repos","events_url":"https://api.github.com/users/LGinC/events{/privacy}","received_events_url":"https://api.github.com/users/LGinC/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2019-01-04T02:48:22Z","updated_at":"2019-01-04T02:48:22Z","closed_at":null,"author_association":"NONE","body":"##### 问题描述\r\n会员卡创建时如果使用积分和使用余额字段设置为false,提交序列化时会忽略掉这两个字段，微信就会返回这两个字段未填写。\r\n查看源码可以看到这两个字段添加了为false时忽略\r\n![image](https://user-images.githubusercontent.com/15363011/50671608-e25ee580-100d-11e9-9231-68e6396ab0eb.png)\r\n这个是必填字段，不能忽略\r\n\r\n##### 重现问题步骤（如果可以）\r\n\r\n日志显示的提交json如下(图片url太长已省略)\r\n1.使用积分，不使用余额，此时缺少 \"supply_balance\":false\r\n{\"card\":{\"member_card\":{\"supply_bonus\":true,\"auto_activate\":true,\"balance_rules\":\"\",\"prerogative\":\"test\",\"bonus_rule\":{},\"base_info\":{\"logo_url\":\"\",\"code_type\":\"CODE_TYPE_BARCODE\",\"brand_name\":\"baiyun\",\"title\":\"VIP\",\"color\":\"Color040\",\"notice\":\"test\",\"description\":\"test\",\"use_limit\":0,\"get_limit\":0,\"use_custom_code\":false,\"bind_openid\":false,\"can_share\":false,\"can_give_friend\":false,\"date_info\":{\"type\":\"DATE_TYPE_PERMANENT\",\"begin_timestamp\":0,\"end_timestamp\":0,\"fixed_term\":0,\"fixed_begin_term\":0},\"sku\":{\"quantity\":100000000,\"total_quantity\":0},\"url_name_type\":0,\"use_all_locations\":false,\"need_push_on_view\":false}},\"card_type\":\"MEMBER_CARD\"}}\r\n2.都不使用\r\n{\"card\":{\"member_card\":{\"auto_activate\":true,\"balance_rules\":\"\",\"prerogative\":\"123\",\"bonus_rule\":{},\"base_info\":{\"logo_url\":\"\",\"code_type\":\"CODE_TYPE_BARCODE\",\"brand_name\":\"baiyu\",\"title\":\"vip\",\"color\":\"Color040\",\"notice\":\"123\",\"description\":\"123\",\"use_limit\":0,\"get_limit\":0,\"use_custom_code\":false,\"bind_openid\":false,\"can_share\":false,\"can_give_friend\":false,\"date_info\":{\"type\":\"DATE_TYPE_PERMANENT\",\"begin_timestamp\":0,\"end_timestamp\":0,\"fixed_term\":0,\"fixed_begin_term\":0},\"sku\":{\"quantity\":100000000,\"total_quantity\":0},\"url_name_type\":0,\"use_all_locations\":false,\"need_push_on_view\":false}},\"card_type\":\"MEMBER_CARD\"}}\r\n##### 微信官方文档 URL\r\nhttps://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1451025283\r\n\r\n##### 微信官方文档快照（直接复制关键内容到下方）\r\n\r\n\r\nsupply_bonus | 是 | bool | 显示积分，填写true或false，如填写true，积分相关字段均为必 填 若设置为true则后续不可以被关闭。\r\n-- | -- | -- | --\r\nsupply_balance | 是 | bool | 是否支持储值，填写true或false。如填写true，储值相关字段均为必 填 若设置为true则后续不可以被关闭。该字段须开通储值功能后方可使用， 详情见： 获取特殊权限\r\n\r\n\r\n\r\n##### 发现问题的模块\r\n\r\n- [ ] Senparc.Weixin 版本：\r\n- [x] Senparc.Weixin.MP 版本：\r\n- [ ] Senparc.Weixin.MP.MVC 版本：\r\n- [ ] Senparc.Weixin.Open 版本：\r\n~- [ ] Senparc.Weixin.QY 版本：~\r\n- [ ] Senparc.Weixin.Work 版本：\r\n- [ ] Senparc.Weixin.WxOpen 版本：\r\n- [ ] Senparc.Weixin.Cache.Redis 版本：\r\n- [ ] Senparc.Weixin.Cache.Memcached 版本：\r\n- [ ] 其他模块：\r\n\r\n\r\n##### 模块对应的 .net 版本\r\n\r\n- [ ] .net 3.5\r\n- [ ] .net 4.0\r\n- [ ] .net 4.5\r\n- [ ] .net standard 2.0\r\n- [ ] .net core 1.x\r\n- [x] .net core 2.x\r\n\r\n##### 开发环境\r\n\r\n- [ ] Visual Studio 2010\r\n- [ ] Visual Studio 2010 (SP1)\r\n- [ ] Visual Studio 2012\r\n- [ ] Visual Studio 2013\r\n- [ ] Visual Studio 2015\r\n- [x] Visual Studio 2017\r\n- [ ] 其他：\r\n\r\n##### 缓存环境\r\n\r\n- [ ] 服务器内存缓存（默认）\r\n- [x] Redis 版本：\r\n- [ ] Memcached 版本：\r\n- [ ] 其他\r\n\r\n##### 联系方式\r\nEmail：\r\nliguo1976@outlook.com\r\n\r\n> 发布问题后，请保持对 issue 的关注，有时会有需要进一步沟通的信息，很长时间内没有得到答复的 issue 将被关闭。\r\n"}}
{"actor":{"display_login":"LGinC"}}