master
luoyang 5 years ago
parent 8ecc9344d0
commit 998a18761d

@ -3,16 +3,22 @@ package au.com.royalpay.payment.manage.product.core;
import au.com.royalpay.payment.manage.product.beans.ProductBean; import au.com.royalpay.payment.manage.product.beans.ProductBean;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import java.util.List;
/** /**
* Created by yuan on 2017/11/24. * Created by yuan on 2017/11/24.
*/ */
public interface ClientProduct { public interface ClientProduct {
JSONObject listAllProduct(JSONObject manager, ProductBean productBean); JSONObject listAllProduct(JSONObject manager, ProductBean productBean);
List<JSONObject> listClientMcc(JSONObject manager, String clientMoniker);
void saveProduct(JSONObject manager, ProductBean productBean); void saveProduct(JSONObject manager, ProductBean productBean);
void updateProduct(JSONObject manager, ProductBean productBean); void updateProduct(JSONObject manager, ProductBean productBean);
void updateMerchantMccInfo(JSONObject manager, JSONObject mccInfo);
void deleteProduct(JSONObject manager, String commodity_id); void deleteProduct(JSONObject manager, String commodity_id);
void importExcelToDb(String client_id, JSONObject manager, String sourceFile); void importExcelToDb(String client_id, JSONObject manager, String sourceFile);

@ -1,5 +1,6 @@
package au.com.royalpay.payment.manage.product.core.impls; package au.com.royalpay.payment.manage.product.core.impls;
import au.com.royalpay.payment.channels.wechat.runtime.mappers.PaymentChannelMccGoodMapper;
import au.com.royalpay.payment.manage.mappers.system.ClientMapper; import au.com.royalpay.payment.manage.mappers.system.ClientMapper;
import au.com.royalpay.payment.manage.mappers.system.CommoditiesMapper; import au.com.royalpay.payment.manage.mappers.system.CommoditiesMapper;
import au.com.royalpay.payment.manage.product.beans.ProductBean; import au.com.royalpay.payment.manage.product.beans.ProductBean;
@ -23,6 +24,7 @@ import java.io.InputStream;
import java.net.URL; import java.net.URL;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.Date; import java.util.Date;
import java.util.List;
import static au.com.royalpay.payment.manage.permission.utils.OrgCheckUtils.checkOrgPermission; import static au.com.royalpay.payment.manage.permission.utils.OrgCheckUtils.checkOrgPermission;
@ -37,6 +39,8 @@ public class ClientProductImpl implements ClientProduct {
private static final String EXCEL_XLSX = "xlsx"; private static final String EXCEL_XLSX = "xlsx";
@Resource @Resource
private CommoditiesMapper commoditiesMapper; private CommoditiesMapper commoditiesMapper;
@Resource
private PaymentChannelMccGoodMapper paymentChannelMccGoodMapper;
@Resource @Resource
private ClientMapper clientMapper; private ClientMapper clientMapper;
@ -50,6 +54,14 @@ public class ClientProductImpl implements ClientProduct {
return PageListUtils.buildPageListResult(listProducts); return PageListUtils.buildPageListResult(listProducts);
} }
@Override
public List<JSONObject> listClientMcc(JSONObject manager, String clientMoniker) {
JSONObject client = clientMapper.findClientByMoniker(clientMoniker);
Assert.notNull(client);
checkOrgPermission(manager, client);
return paymentChannelMccGoodMapper.findPaymentChannelMccByClientId(client.getIntValue("client_id"));
}
@Override @Override
public void saveProduct(JSONObject manager,ProductBean productBean) { public void saveProduct(JSONObject manager,ProductBean productBean) {
JSONObject param = productBean.toJsonParam(); JSONObject param = productBean.toJsonParam();
@ -69,6 +81,17 @@ public class ClientProductImpl implements ClientProduct {
commoditiesMapper.updateProduct(param); commoditiesMapper.updateProduct(param);
} }
@Override
public void updateMerchantMccInfo(JSONObject manager, JSONObject mccInfo) {
JSONObject client = clientMapper.findClientByMoniker(mccInfo.getString("client_moniker"));
Assert.notNull(client);
checkOrgPermission(manager, client);
mccInfo.put("client_id", client.getIntValue("client_id"));
mccInfo.put("creation_date", new Date());
mccInfo.put("creation_by", manager.getString("display_name"));
paymentChannelMccGoodMapper.update(mccInfo);
}
@Override @Override
public void deleteProduct(JSONObject manager,String commodity_id) { public void deleteProduct(JSONObject manager,String commodity_id) {
JSONObject param = new JSONObject(); JSONObject param = new JSONObject();

@ -12,6 +12,7 @@ import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource; import javax.annotation.Resource;
import javax.validation.Valid; import javax.validation.Valid;
import java.util.List;
/** /**
* Created by yuan on 2017/11/24. * Created by yuan on 2017/11/24.
@ -23,8 +24,13 @@ public class ManagerProductController {
@Resource @Resource
private ClientProduct clientProduct; private ClientProduct clientProduct;
@ManagerMapping(value = "/{clientMoniker}/list", method = RequestMethod.GET, role = ManagerRole.ADMIN)
public List<JSONObject> listProducts(@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager, @PathVariable String clientMoniker) {
return clientProduct.listClientMcc(manager, clientMoniker);
}
@ManagerMapping(value = "/list",method = RequestMethod.GET,role = ManagerRole.ADMIN) @ManagerMapping(value = "/list",method = RequestMethod.GET,role = ManagerRole.ADMIN)
public JSONObject listProducts(@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager, ProductBean productBean){ public JSONObject listSysProducts(@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager, ProductBean productBean){
return clientProduct.listAllProduct(manager,productBean); return clientProduct.listAllProduct(manager,productBean);
} }
@ -34,11 +40,12 @@ public class ManagerProductController {
clientProduct.saveProduct(manager,productBean); clientProduct.saveProduct(manager,productBean);
} }
@ManagerMapping(value = "",method = RequestMethod.PUT,role = ManagerRole.ADMIN) @ManagerMapping(value = "/update", method = RequestMethod.PUT, role = ManagerRole.ADMIN)
public void updateProduct(@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager, @RequestBody @Valid ProductBean productBean, Errors errors){ public void updateProduct(@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager, @RequestBody JSONObject mccInfo, Errors errors) {
HttpUtils.handleValidErrors(errors); HttpUtils.handleValidErrors(errors);
clientProduct.updateProduct(manager,productBean); clientProduct.updateMerchantMccInfo(manager, mccInfo);
} }
@ManagerMapping(value = "/{commodity_id}/delete",method = RequestMethod.POST,role = ManagerRole.ADMIN) @ManagerMapping(value = "/{commodity_id}/delete",method = RequestMethod.POST,role = ManagerRole.ADMIN)
public void deleteProduct(@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager, @PathVariable String commodity_id){ public void deleteProduct(@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager, @PathVariable String commodity_id){
clientProduct.deleteProduct(manager,commodity_id); clientProduct.deleteProduct(manager,commodity_id);

@ -13,6 +13,7 @@ define(['./app',
'./services/yeepayIndustryMap', './services/yeepayIndustryMap',
'./services/stateMap', './services/stateMap',
'./services/industryMap', './services/industryMap',
'./services/wechatGoodMcc',
'./services/sectorMap', './services/sectorMap',
'./services/countryMap', './services/countryMap',
'./services/clearingDetailService', './services/clearingDetailService',

@ -116,6 +116,17 @@ define(['../app', 'jquery'], function (app, $) {
return industryLabel; return industryLabel;
} }
}]); }]);
app.filter('wechat_mcc', ['wechatGoodMcc', function (wechatGoodMcc) {
return function (industryCode) {
var industryLabel = '';
angular.forEach(wechatGoodMcc.configs(), function (industry) {
if (industry.value == industryCode) {
industryLabel = industry.label;
}
});
return industryLabel;
}
}]);
app.filter('partner_alipay_industry', ['$http', function ($http) { app.filter('partner_alipay_industry', ['$http', function ($http) {

@ -0,0 +1,582 @@
define(["../app"], function (app) {
"use strict";
var wechatGoodMcc = [
{
"label": "Duty-free shops 免税店",
"value": 5309
}, {
"label": "Department stores 百货商店",
"value": 5311
}, {
"label": "Discount shops 折扣商店",
"value": 5310
}, {
"label": "Auto and home supply outlets 汽车商店、家庭用品商店",
"value": 5531
}, {
"label": "Mens and boys clothing and accessory shops 男子和男童服装及用品商店",
"value": 5611
}, {
"label": "Womens ready-to-wear shops 妇女成衣商店",
"value": 5621
}, {
"label": "Womens accessory and speciality shops 女性用品商店",
"value": 5631
}, {
"label": "Childrens and infants wear shops 婴儿、儿童服装店",
"value": 5641
}, {
"label": "Family clothing shops 家庭服装商店",
"value": 5651
}, {
"label": "Sports and riding apparel shops 运动服饰商店",
"value": 5655
}, {
"label": "Shoe shops 鞋店",
"value": 5661
}, {
"label": "Furriers and fur shops 皮货店",
"value": 5681
}, {
"label": "Mens and womens clothing shops 成人成衣店",
"value": 5691
}, {
"label": "Miscellaneous apparel and accessory shops 各类服装及饰物店",
"value": 5699
}, {
"label": "Furniture, home furnishings and equipment shops and manufacturers, except appliances 家具、家庭摆品、家用设备零售商",
"value": 5712
}, {
"label": "Household appliance shops 家用电器商店",
"value": 5722
}, {
"label": "Jewellery, watch, clock and silverware shops 珠宝、钟表、银器店",
"value": 5944
}, {
"label": "Luggage and leather goods shops 箱包、皮具店",
"value": 5948
}, {
"label": "Precious stones and metals, watches and jewellery 宝石和金属、手表和珠宝",
"value": 5094
}, {
"label": "Variety stores 各类杂货店、便利店",
"value": 5331
}, {
"label": "Groceries and supermarkets 大型仓储式超级市场",
"value": 5411
}, {
"label": "Home supply warehouse outlets 大型仓储式家庭用品卖场",
"value": 5200
}, {
"label": "Tailors, seamstresses, mending and alterations 裁缝、修补、改衣店",
"value": 5697
}, {
"label": "Wig and toupee shops 假发商店",
"value": 5698
}, {
"label": "Floor covering services 地板商店",
"value": 5713
}, {
"label": "Drapery, window covering and upholstery shops 帏帐、窗帘、室内装潢商店",
"value": 5714
}, {
"label": "Alcoholic beverage wholesalers 酒精饮料",
"value": 5715
}, {
"label": "Fireplaces, fireplace screens and accessories shops 壁炉、壁炉防护网及配件商店",
"value": 5718
}, {
"label": "Miscellaneous home furnishing speciality shops 各种家庭装饰专营店",
"value": 5719
}, {
"label": "Electronics shops 电子设备商店",
"value": 5732
}, {
"label": "Music shops - musical instruments, pianos and sheet music 音乐商店-乐器、钢琴、乐谱",
"value": 5733
}, {
"label": "Computer software outlets 计算机软件商店",
"value": 5734
}, {
"label": "Record shops 音像制品商店",
"value": 5735
}, {
"label": "Package shops - beer, wine and liquor 瓶装酒零售店",
"value": 5921
}, {
"label": "Used merchandise and second-hand shops 旧商品店、二手商品店",
"value": 5931
}, {
"label": "Antique shop - sale, repair and restoration 古玩店-出售、维修及还原",
"value": 5932
}, {
"label": "Antique reproduction shops 古玩复制店",
"value": 5937
}, {
"label": "Bicycle shops - sales and service 自行车商店",
"value": 5940
}, {
"label": "Sporting goods shops 体育用品店",
"value": 5941
}, {
"label": "Bookshops 书店",
"value": 5942
}, {
"label": "Stationery, office and school supply shops 文具用品商店、各类办公用品商店",
"value": 5943
}, {
"label": "Hobby, toy and game shops 玩具、游戏店",
"value": 5945
}, {
"label": "Camera and photographic supply shops 照相器材商店",
"value": 5946
}, {
"label": "Gift, card, novelty and souvenir shops 礼品、卡片、装饰品、纪念品商店",
"value": 5947
}, {
"label": "Sewing, needlework, fabric and piece goods shops 纺织品及针织品零售",
"value": 5949
}, {
"label": "Glassware and crystal shops 玻璃器皿和水晶饰品店",
"value": 5950
}, {
"label": "Artist supply and craft shops 工艺美术商店",
"value": 5970
}, {
"label": "Art dealers and galleries 艺术商和画廊",
"value": 5971
}, {
"label": "Stamp and coin shops 邮票和纪念币商店",
"value": 5972
}, {
"label": "Religious goods and shops 宗教品商店",
"value": 5973
}, {
"label": "Cosmetic shops 化妆品商店",
"value": 5977
}, {
"label": "Typewriter outlets - sales, service and rentals 打字机商店-销售、服务和出租",
"value": 5978
}, {
"label": "Florists 花店",
"value": 5992
}, {
"label": "Cigar shops and stands 香烟、雪茄专卖店",
"value": 5993
}, {
"label": "Newsagents and news-stands 报亭、报摊",
"value": 5994
}, {
"label": "Pet shops, pet food and supplies 宠物商店、宠物食品及用品",
"value": 5995
}, {
"label": "Electric razor shops - sales and service 电动剃刀商店-销售和服务",
"value": 5997
}, {
"label": "Miscellaneous and speciality retail outlets 其他专门零售店",
"value": 5999
}, {
"label": "Office, photographic, photocopy and microfilm equipment 办公、影印及微缩摄影器材",
"value": 5044
}, {
"label": "Computers, computer peripheral equipment - not elsewhere classified 计算机、计算机外围设备",
"value": 5045
}, {
"label": "Piece goods, notions and other dry goods 布料、缝纫用品和其他纺织品",
"value": 5131
}, {
"label": "Books, periodicals and newspapers 书、期刊和报纸",
"value": 5192
}, {
"label": "Glass, paint and wallpaper shops 玻璃、油漆涂料、墙纸零售",
"value": 5231
}, {
"label": "Hardware shops 五金商店",
"value": 5251
}, {
"label": "Lawn and garden supplies outlets, including nurseries 草坪、花园用品商店",
"value": 5261
}, {
"label": "Freezer and locker meat provisioners 各类肉类零售商",
"value": 5422
}, {
"label": "Candy, nut and confectionery shops 糖果及坚果商店",
"value": 5441
}, {
"label": "Dairies 乳制品店、冷饮店",
"value": 5451
}, {
"label": "Bakeries 面包房、糕点商店",
"value": 5462
}, {
"label": "Miscellaneous food shops - convenience and speciality retail outlets 各类食品店及专门食品零售店",
"value": 5499
}, {
"label": "Automotive tyre outlets 汽车轮胎经销商",
"value": 5532
}, {
"label": "Automotive parts and accessories outlets 汽车零配件商店",
"value": 5533
}, {
"label": "Motorcycle shops and dealers 摩托车商店和经销商",
"value": 5571
}, {
"label": "Lodging - hotels, motels and resorts 住宿服务(旅馆、酒店、汽车旅馆、度假村等)",
"value": 7011
}, {
"label": "Time-sharing villa or holiday home 分时使用的别墅或度假用房",
"value": 7012
}, {
"label": "Sporting and recreational camps 运动和娱乐露营地",
"value": 7032
}, {
"label": "Trailer parks and camp-sites 活动房车场及露营场所",
"value": 7033
}, {
"label": "Caterers 包办伙食,宴会承包商",
"value": 5811
}, {
"label": "Eating places and restaurants 就餐场所和餐馆",
"value": 5812
}, {
"label": "Fast food restaurants 快餐店",
"value": 5814
}, {
"label": "Railroads 铁路运输",
"value": 4011
}, {
"label": "Local and suburban commuter passenger transportation, including ferries 本市和市郊通勤旅客运输(包括轮渡)",
"value": 4111
}, {
"label": "Passenger railways 铁路客运",
"value": 4112
}, {
"label": "Ambulance services 救护车服务",
"value": 4119
}, {
"label": "Taxi-cabs and limousines 出租车服务",
"value": 4121
}, {
"label": "Bus lines 公路客运",
"value": 4131
}, {
"label": "Motor freight carriers and trucking - local and long distance, moving and storage companies and local delivery 货物搬运和托运—当地和长途,移动和存储公司,以及当地递送服务",
"value": 4214
}, {
"label": "Courier services - air and ground and freight forwarders 快递服务(空运、地面运输或海运)",
"value": 4215
}, {
"label": "Steamships and cruise lines 轮船及巡游航线服务",
"value": 4411
}, {
"label": "Boat rentals and leasing 出租船只",
"value": 4457
}, {
"label": "Marinas, marine service and supplies 船舶、海运服务提供商",
"value": 4468
}, {
"label": "Airlines and air carriers 航空公司",
"value": 4511
}, {
"label": "Tolls and bridge fees 路桥通行费",
"value": 4784
}, {
"label": "Laundry, cleaning and garment services 洗衣店",
"value": 7210
}, {
"label": "Laundry services - family and commercial 洗熨服务(自助洗衣服务)",
"value": 7211
}, {
"label": "Dry cleaners 干洗店",
"value": 7216
}, {
"label": "Carpet and upholstery cleaning 室内清洁服务(地毯、沙发、家具表面的清洁服务)",
"value": 7217
}, {
"label": "Photographic studios 摄影工作室",
"value": 7221
}, {
"label": "Beauty and barber shops 美容理发店",
"value": 7230
}, {
"label": "Shoe repair shops, shoe shine parlours and hat cleaning shops 修鞋店、擦鞋店、帽子清洗店",
"value": 7251
}, {
"label": "Funeral services and crematoriums 殡葬服务",
"value": 7261
}, {
"label": "Dating and escort services 婚姻介绍及陪同服务",
"value": 7273
}, {
"label": "Advertising services 广告服务",
"value": 7311
}, {
"label": "Commercial photography, art and graphics 商业摄影、工艺、绘图服务",
"value": 7333
}, {
"label": "Quick copy, reproduction and blueprinting services 复印及绘图服务",
"value": 7338
}, {
"label": "Stenographic and secretarial support services 速记、秘书服务(包括各类办公服务)",
"value": 7339
}, {
"label": "Exterminating and disinfecting services 灭虫及消毒服务",
"value": 7342
}, {
"label": "Cleaning, maintenance and janitorial services 清洁、保养及门卫服务",
"value": 7349
}, {
"label": "Employment agencies and temporary help services 职业中介、临时工",
"value": 7361
}, {
"label": "Computer programming, data processing and integrated systems design services 计算机编程、数据处理和系统集成设计服务",
"value": 7372
}, {
"label": "Information retrieval services 信息检索服务",
"value": 7375
}, {
"label": "Detective agencies, protective agencies and security services, including armoured cars and guard dogs 侦探、保安、安全服务",
"value": 7393
}, {
"label": "Equipment, tool, furniture and appliance rentals and leasing 设备、工具、家具和电器出租",
"value": 7394
}, {
"label": "Photofinishing laboratories and photo developing 照相洗印服务",
"value": 7395
}, {
"label": "Automobile rentals 汽车出租",
"value": 7512
}, {
"label": "Truck and utility trailer rentals 卡车及拖车出租",
"value": 7513
}, {
"label": "Motor home and recreational vehicle rentals 房车和娱乐车辆出租",
"value": 7519
}, {
"label": "Parking lots and garages 停车场",
"value": 7523
}, {
"label": "Automotive body repair shops 车体维修店",
"value": 7531
}, {
"label": "Tyre retreading and repair shops 轮胎翻新、维修店",
"value": 7534
}, {
"label": "Automotive paint shops 汽车喷漆店",
"value": 7535
}, {
"label": "Automotive service shops (non-dealer) 汽车服务商店(非经销商)",
"value": 7538
}, {
"label": "Car washes 洗车",
"value": 7542
}, {
"label": "Towing services 拖车服务",
"value": 7549
}, {
"label": "Electronics repair shops 电器设备维修",
"value": 7622
}, {
"label": "Air conditioning and refrigeration repair shops 空调、制冷设备维修",
"value": 7623
}, {
"label": "Electrical and small appliance repair shops 电器设备、小家电维修",
"value": 7629
}, {
"label": "Watch, clock and jewellery repair shops 手表、钟表和首饰维修店",
"value": 7631
}, {
"label": "Furniture reupholstery, repair and refinishing 家具维修、翻新",
"value": 7641
}, {
"label": "Welding services 焊接维修服务",
"value": 7692
}, {
"label": "Miscellaneous repair shops and related services 各类维修店及相关服务",
"value": 7699
}, {
"label": "Babysitting and housekeeping services 家政服务",
"value": 7295
}, {
"label": "Clothing rentals - costumes, uniforms and formal wear 出租衣物-服装、制服和正式场合服装",
"value": 7296
}, {
"label": "Utilities - electric, gas, water and sanitary 公共事业(电力、煤气、自来水、清洁服务)",
"value": 4900
}, {
"label": "Service stations (with or without ancillary services) 加油站、服务站",
"value": 5541
}, {
"label": "Automated fuel dispensers 自助加油站",
"value": 5542
}, {
"label": "Airports, flying fields and airport terminals 机场服务",
"value": 4582
}, {
"label": "Car and truck dealers (new and used) sales, services, repairs, parts and leasing 汽车货车经销商-新旧车的销售、服务、维修、零件及出租",
"value": 5511
}, {
"label": "Car and truck dealers (used only) sales, service, repairs, parts and leasing 汽车货车经销商-专门从事旧车的销售、服务、维修、零件及出租",
"value": 5521
}, {
"label": "Embassy and consulate fees 使领馆收费",
"value": 9400
}, {
"label": " Postal Services - Government Only 国家邮政服务",
"value": 9402
}, {
"label": "Ticketing 票务",
"value": 4733
}, {
"label": "Travel agencies and tour operators 旅行社",
"value": 4722
}, {
"label": "Motion picture and video tape production and distribution 电影和录像创作、发行",
"value": 7829
}, {
"label": "Motion picture theatres 电影院",
"value": 7832
}, {
"label": "Video tape rentals 音像制品出租商店",
"value": 7841
}, {
"label": "Dance halls, studios and schools 歌舞厅",
"value": 7911
}, {
"label": "Theatrical producers (except motion pictures) and ticket agencies 戏剧制片(不含电影)、演出和票务",
"value": 7922
}, {
"label": "Billiard and pool establishments 台球、撞球场所",
"value": 7932
}, {
"label": "Bowling alleys 保龄球馆",
"value": 7933
}, {
"label": "Commercial sports, professional sports clubs, athletic fields and sports promoters 商业运动",
"value": 7941
}, {
"label": "Tourist attractions and exhibits 景点、展览",
"value": 7991
}, {
"label": "Public golf courses 公开高尔夫球赛",
"value": 7992
}, {
"label": "Video amusement game supplies 电子游戏等",
"value": 7993
}, {
"label": "Video game arcades and establishments 大型游戏机和游戏场所",
"value": 7994
}, {
"label": "Amusement parks, circuses, carnivals and fortune tellers 游乐园、马戏团、嘉年华、占卜",
"value": 7996
}, {
"label": "Membership clubs (sports, recreation, athletic), country clubs and private golf courses 会员俱乐部(体育、娱乐、运动等)、乡村俱乐部以及私人高尔夫课程班",
"value": 7997
}, {
"label": "Aquariums, seaquariums and dolphinariums 水族馆、海洋馆和海豚馆",
"value": 7998
}, {
"label": "Drinking places (alcoholic beverages) - bars, taverns, night-clubs, cocktail lounges and discothèques 饮酒场所(酒吧、酒馆、夜总会、鸡尾酒大厅、迪斯科舞厅)",
"value": 5813
}, {
"label": "Massage parlours 按摩店",
"value": 7297
}, {
"label": "Health and beauty spas 保健及美容SPA",
"value": 7298
}, {
"label": "Telecommunication equipment and telephone sales 电信设备和销售",
"value": 4812
}, {
"label": "Telecommunication services 电信服务,包括本地和长途电话、信用卡电话、磁卡电话和传真",
"value": 4814
}, {
"label": "Monthly summary telephone charges 月结电话服务",
"value": 4815
}, {
"label": "Computer network information services 计算机网络/信息服务",
"value": 4816
}, {
"label": "Cable and other pay television services 有线和其他付费电视服务",
"value": 4899
}, {
"label": "private hospital 私人医院",
"value": 7280
}, {
"label": "Doctors and physicians - not elsewhere classified 其他医疗卫生活动",
"value": 8011
}, {
"label": "Dentists and orthodontists 牙科医生",
"value": 8021
}, {
"label": "Osteopaths 正骨医生",
"value": 8031
}, {
"label": "Chiropractors 按摩医生",
"value": 8041
}, {
"label": "Optometrists and ophthalmologists 眼科医生",
"value": 8042
}, {
"label": "Opticians, optical goods and eyeglasses 光学产品、眼镜店",
"value": 8043
}, {
"label": "Podiatrists and chiropodists 手足病医生",
"value": 8049
}, {
"label": "Nursing and personal care facilities 护理和照料服务",
"value": 8050
}, {
"label": "Hospitals 公立医院",
"value": 8062
}, {
"label": "Medical and dental laboratories 医学及牙科实验室",
"value": 8071
}, {
"label": "Medical services and health practitioners - not elsewhere classified 其他医疗保健服务",
"value": 8099
}, {
"label": "Drug stores and pharmacies 药店、药房",
"value": 5912
}, {
"label": "Hearing aids - sales, service and supplies 助听器-销售、服务和用品",
"value": 5975
}, {
"label": "Orthopaedic goods and prosthetic devices 假肢店(整形外科用品、辅助设备)",
"value": 5976
}, {
"label": "Dental laboratory medical ophthalmic hospital equipment and supplies 牙科/实验室/医疗/眼科医院器材和用品",
"value": 5047
}, {
"label": "Elementary and secondary schools 中小学校(公立)",
"value": 8211
}, {
"label": "Colleges, universities, professional schools and junior colleges 普通高校(公立)",
"value": 8220
}, {
"label": "Correspondence schools 函授学校(成人教育)",
"value": 8241
}, {
"label": "Business and secretarial schools 商业和文秘学校(中等专业学校)",
"value": 8244
}, {
"label": "Trade and vocational schools 贸易和职业学校(职业技能培训)",
"value": 8249
}, {
"label": "Schools and educational services - not elsewhere classified 其他学校和教育服务",
"value": 8299
}, {
"label": "Child care services 儿童保育服务(含学前教育)",
"value": 8351
}
];
app.factory("wechatGoodMcc", function () {
return {
configs: function () {
return wechatGoodMcc;
}
}
});
})
;

@ -174,7 +174,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
} }
}).state('partners.detail.product', { }).state('partners.detail.product', {
url: '/partner_product', url: '/partner_product',
templateUrl: 'static/payment/product/templates/product.html', templateUrl: 'static/payment/product/templates/partner_product.html',
controller: 'productCtrl' controller: 'productCtrl'
}).state('partners.detail.sub_merchant_applicaitons', { }).state('partners.detail.sub_merchant_applicaitons', {
url: '/sub_merchant_applicaitons', url: '/sub_merchant_applicaitons',
@ -3726,24 +3726,23 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
}; };
$scope.channelAndDayOfAnalysis(1); $scope.channelAndDayOfAnalysis(1);
}]); }]);
app.controller('productCtrl', ['$scope', '$http', '$uibModal', 'commonDialog', '$state', 'Upload', 'industryMap', function ($scope, $http, $uibModal, commonDialog, $state, Upload, industryMap) { app.controller('productCtrl', ['$scope', '$http', '$uibModal', 'commonDialog', '$state', 'Upload', 'wechatGoodMcc', function ($scope, $http, $uibModal, commonDialog, $state, Upload, wechatGoodMcc) {
$scope.importShow = 0; $scope.importShow = 0;
$scope.pagination = {}; $scope.pagination = {};
$scope.params = {text_type: 'all', search_text: null}; $scope.params = {text_type: 'all', search_text: null};
$scope.industries = industryMap.configs(); $scope.wechatMccIndustries = wechatGoodMcc.configs();
$scope.loadProducts = function (page) { $scope.loadProducts = function () {
var params = angular.copy($scope.params); $http.get('/sys/product/' + $scope.partner.client_moniker + '/list').then(function (resp) {
if ($scope.params.industry == null || angular.equals({}, $scope.params.industry)) { $scope.mcc_goods = resp.data;
params.industry = '';
} else {
params.industry = $scope.params.industry.value;
}
params.page = page || $scope.pagination.page || 1;
$http.get('/client/product/' + $scope.partner.client_moniker + '/list', {params: params}).then(function (resp) {
$scope.products = resp.data.data;
$scope.pagination = resp.data.pagination;
}); });
}; };
$scope.updateMccInfo = function (mccInfo) {
mccInfo.client_moniker = $scope.partner.client_moniker;
$http.put('/sys/product/update', mccInfo).then(function (resp) {
$state.reload();
});
};
$scope.loadProducts();
/*$scope.importExcel = function (file) { /*$scope.importExcel = function (file) {
if (file != null) { if (file != null) {
Upload.upload({ Upload.upload({
@ -3766,51 +3765,6 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
}) })
} }
}*/ }*/
$scope.deleteProduct = function (product) {
$scope.product = angular.copy(product);
commonDialog.confirm({
title: 'Confirm',
content: 'This operation will delete the product, Are you sure?'
}).then(function () {
$http.post('/sys/product/' + product.commodity_id + '/delete').then(function () {
alert("Success!");
$state.reload();
});
})
};
$scope.addProduct = function () {
$uibModal.open({
templateUrl: '/static/payment/product/templates/add_product.html',
controller: 'AddProductDialogCtrl',
resolve: {
product: function () {
return {};
},
partner: function () {
return $scope.partner;
},
}
}).result.then(function () {
$scope.loadProducts(1);
})
};
$scope.editProduct = function (product) {
$uibModal.open({
templateUrl: '/static/payment/product/templates/add_product.html',
controller: 'AddProductDialogCtrl',
resolve: {
product: function () {
return product;
},
partner: function () {
return $scope.partner;
},
}
}).result.then(function () {
$scope.loadProducts(1);
})
};
$scope.loadProducts(1);
}]); }]);
app.controller('AddProductDialogCtrl', ['$scope', '$http', '$uibModal', 'product', 'partner', '$state', 'industryMap', function ($scope, $http, $uibModal, product, partner, $state, industryMap) { app.controller('AddProductDialogCtrl', ['$scope', '$http', '$uibModal', 'product', 'partner', '$state', 'industryMap', function ($scope, $http, $uibModal, product, partner, $state, industryMap) {
$scope.product = angular.copy(product); $scope.product = angular.copy(product);

@ -0,0 +1,45 @@
<div class="content">
<div class="row">
<div class="col-sm-12">
<div class="box-solid">
<!--渠道方行业信息-->
<div class="box-body col-sm-6" ng-repeat="good in mcc_goods">
<ul class="list-group ui_desk">
<li class="list-group-item list-group-item-info"
style="height: 60px;text-align: center;display: block;">
<span>
<img ng-if="good.channel=='Wechat'" src="/static/images/wechatpay_sign_lg.png"
class="channel-icon-mid">
<img ng-if="good.channel=='Alipay'" src="/static/images/alipay_sign_lg.png"
class="channel-icon-mid">
<img ng-if="good.channel=='AlipayOnline'" src="/static/images/alipay_sign_lg.png"
class="channel-icon-mid">
<img ng-if="good.channel=='Bestpay'" src="/static/images/bestpay_sign_lg.png"
class="channel-icon-mid">
<img ng-if="good.channel=='jd'" src="/static/images/jd_sign_lg.png"
class="channel-icon-mid">
</span>
</li>
<li class="list-group-item list-group-item-text" style="height: 60px;">
商品
<select style="float: right;width: 50%;" ng-model="good.mc_code" id="wmi-select" name="wmi"
class="form-control"
ng-options="wmi.value as wmi.label for wmi in wechatMccIndustries" ng-change="updateMccInfo(good)">
<option value="">请选择</option>
</select>
</li>
<li class="list-group-item list-group-item-text">
创建时间
<span style="float: right" ng-bind="good.creation_date"></span>
</li>
<li class="list-group-item list-group-item-text">
操作人
<span style="float: right" ng-bind="good.creation_by"></span>
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
Loading…
Cancel
Save