Browse Source

求购模块-优质采购商

liusw 8 years ago
parent
commit
3ddf8b81a3

+ 60 - 0
src/main/java/com/uas/platform/b2c/trade/seek/controller/SeekPurchaseController.java

@@ -0,0 +1,60 @@
+package com.uas.platform.b2c.trade.seek.controller;
+
+import com.uas.platform.b2c.core.support.log.UsageBufferedLogger;
+import com.uas.platform.b2c.trade.seek.model.SeekPurchase;
+import com.uas.platform.b2c.trade.seek.service.SeekPurchaseService;
+import com.uas.platform.core.logging.BufferedLoggerManager;
+import com.uas.platform.core.model.PageInfo;
+import com.uas.platform.core.model.PageParams;
+import java.util.List;
+import java.util.Map;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.domain.Page;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * 求购
+ *
+ * @author liusw
+ * @version 2017/12/13 10:38
+ */
+@RestController
+@RequestMapping("/seek")
+public class SeekPurchaseController {
+
+    /**
+     * 求购接口
+     */
+    @Autowired
+    private SeekPurchaseService seekPurchaseService;
+
+    /**
+     * 日志
+     */
+    private static final  UsageBufferedLogger logger = BufferedLoggerManager.getLogger(UsageBufferedLogger.class);
+    /**
+     * 分页获取采购列表
+     * @param params 分页参数
+     * @return 采购列表
+     */
+    @RequestMapping(value = "/getSeekPageInfo", method = RequestMethod.GET)
+    public Page<SeekPurchase> getSeekPageInfo(PageParams params) {
+        logger.log("求购", "分页获取采购列表,参数为" + params);
+        PageInfo info = new PageInfo(params);
+        return seekPurchaseService.getSeekPageInfo(info);
+    }
+
+    /**
+     * 求购排行榜
+     * @return 排行榜
+     */
+    @RequestMapping(value = "/getSeekRanking", method = RequestMethod.GET)
+    public List<Map<String, Object>> getSeekRanking() {
+
+        return null;
+    }
+
+    //求购发布
+}

+ 87 - 0
src/main/java/com/uas/platform/b2c/trade/seek/controller/SeekQualityBuyerController.java

@@ -0,0 +1,87 @@
+package com.uas.platform.b2c.trade.seek.controller;
+
+import com.uas.platform.b2c.core.support.log.UsageBufferedLogger;
+import com.uas.platform.b2c.trade.seek.model.SeekPurchase;
+import com.uas.platform.b2c.trade.seek.model.SeekQualityBuyer;
+import com.uas.platform.b2c.trade.seek.service.SeekQualityBuyerService;
+import com.uas.platform.core.logging.BufferedLoggerManager;
+import com.uas.platform.core.model.PageInfo;
+import com.uas.platform.core.model.PageParams;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.domain.Page;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * 求购-优质采购商
+ *
+ * @author liusw
+ * @version 2017/12/13 10:38
+ */
+@RestController
+@RequestMapping("/seek/qualityBuyer")
+public class SeekQualityBuyerController {
+
+    /**
+     * 优质采购商接口
+     */
+    @Autowired
+    private SeekQualityBuyerService seekQualityBuyerService;
+
+    /**
+     * 日志
+     */
+    private static final UsageBufferedLogger logger = BufferedLoggerManager.getLogger(UsageBufferedLogger.class);
+
+    /**
+     * 获取优质采购商列表
+     * @return 采购商列表
+     */
+    @RequestMapping(value = "/getBuyerPageInfo", method = RequestMethod.GET)
+    public Page<SeekQualityBuyer> getBuyerPageInfo(PageParams params) {
+        logger.log("求购", "分页获取优质采购商列表,参数为" + params);
+        PageInfo info = new PageInfo(params);
+        return seekQualityBuyerService.getBuyerPageInfo(info);
+    }
+
+    /**
+     * 保存优质采购商列表
+     * @param buyer 采购商信息
+     * @return 状态值
+     */
+    @RequestMapping(value = "/saveBuyer", method = RequestMethod.POST)
+    public ResponseEntity<String> saveBuyer(@RequestBody SeekQualityBuyer buyer) {
+        logger.log("求购-优质采购商", "保存优质采购商,参数为" + buyer);
+        seekQualityBuyerService.saveBuyer(buyer);
+        return new ResponseEntity<>(HttpStatus.OK);
+    }
+
+    /**
+     * 获取单个采购商信息
+     * @param id 采购商id
+     * @return
+     */
+    @RequestMapping(value = "/getOneBuyer", method = RequestMethod.GET)
+    @ResponseBody
+    public SeekQualityBuyer getOneBuyer(Long id) {
+        logger.log("求购", "分页获取单个优质采购商,id为" + id);
+        return seekQualityBuyerService.getOneBuyer(id);
+    }
+
+    /**
+     * 删除采购商
+     * @param id 采购商id
+     * @return
+     */
+    @RequestMapping(value = "/deleteBuyer", method = RequestMethod.PUT)
+    public ResponseEntity<String> deleteBuyer(Long id) {
+        seekQualityBuyerService.deleteBuyer(id);
+        logger.log("求购-优质采购商", "删除优质采购商,id参数为" + id);
+        return new ResponseEntity<>(HttpStatus.OK);
+    }
+}

+ 27 - 0
src/main/java/com/uas/platform/b2c/trade/seek/dao/SeekPurchaseDao.java

@@ -0,0 +1,27 @@
+package com.uas.platform.b2c.trade.seek.dao;
+
+import com.uas.platform.b2c.trade.seek.model.SeekPurchase;
+import java.util.List;
+import java.util.Map;
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
+import org.springframework.data.jpa.repository.Query;
+import org.springframework.stereotype.Repository;
+
+/**
+ * 求购业务Dao
+ *
+ * @author liusw
+ * @version 2017/12/12 16:48
+ */
+@Repository
+public interface SeekPurchaseDao extends JpaSpecificationExecutor<SeekPurchase>,
+        JpaRepository<SeekPurchase, Long> {
+
+    /**
+     * 获取采购排行榜
+     * @return
+     */
+    @Query(value = "select s from trade.seekPurchase s")
+    List<Map<String, Object>> getSeekRanking();
+}

+ 18 - 0
src/main/java/com/uas/platform/b2c/trade/seek/dao/SeekQualityBuyerDao.java

@@ -0,0 +1,18 @@
+package com.uas.platform.b2c.trade.seek.dao;
+
+import com.uas.platform.b2c.trade.seek.model.SeekQualityBuyer;
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
+import org.springframework.stereotype.Repository;
+
+/**
+ * 优质采购商Dao
+ *
+ * @author liusw
+ * @version 2017/12/13 10:46
+ */
+@Repository
+public interface SeekQualityBuyerDao extends JpaSpecificationExecutor<SeekQualityBuyer>,
+        JpaRepository<SeekQualityBuyer, Long> {
+
+}

+ 205 - 0
src/main/java/com/uas/platform/b2c/trade/seek/model/SeekPurchase.java

@@ -0,0 +1,205 @@
+package com.uas.platform.b2c.trade.seek.model;
+
+import java.util.Date;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Id;
+import javax.persistence.Table;
+
+/**
+ * 求购实体类
+ *
+ * @author liusw
+ * @version 2017/12/12 16:45
+ */
+@Entity(name = "trade.seekPurchase")
+@Table(name = "trade$seekPurchase")
+public class SeekPurchase {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * ID
+     */
+    @Id
+    @GeneratedValue
+    @Column(name = "sp_id")
+    private Long id;
+
+    /**
+     * 求购uu号
+     */
+    @Column(name = "sp_uu")
+    private Long uu;
+
+    /**
+     * 求购手机号
+     */
+    @Column(name = "sp_tel")
+    private String tel;
+
+    /**
+     * 求购型号
+     */
+    @Column(name = "sp_code")
+    private String code;
+
+    /**
+     * 求购品牌
+     */
+    @Column(name = "sp_brand")
+    private String brand;
+
+    /**
+     * 求购截止时间
+     */
+    @Column(name = "sp_deadline")
+    private Date deadline;
+
+    /**
+     * 报价次数
+     */
+    @Column(name = "sp_offeramount")
+    private Integer offerAmount;
+
+    /**
+     * 求购产品生产日期
+     */
+    @Column(name = "sp_producedate")
+    private String produceDate;
+
+    /**
+     * 求购 封装类型
+     */
+    @Column(name = "sp_encapsulation")
+    private String encapsulation;
+
+    /**
+     * 求购数量
+     */
+    @Column(name = "sp_amount")
+    private Long amount;
+
+    /**
+     * 求购状态
+     */
+    @Column(name = "sp_status")
+    private Integer status;
+
+    /**
+     * 求购单价预算
+     */
+    @Column(name = "sp_unitPrice")
+    private Double unitPrice;
+
+    /**
+     * 求购产品类目
+     */
+    @Column(name = "sp_kind")
+    private String kind;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Long getUu() {
+        return uu;
+    }
+
+    public void setUu(Long uu) {
+        this.uu = uu;
+    }
+
+    public String getTel() {
+        return tel;
+    }
+
+    public void setTel(String tel) {
+        this.tel = tel;
+    }
+
+    public String getCode() {
+        return code;
+    }
+
+    public void setCode(String code) {
+        this.code = code;
+    }
+
+    public String getBrand() {
+        return brand;
+    }
+
+    public void setBrand(String brand) {
+        this.brand = brand;
+    }
+
+    public Date getDeadline() {
+        return deadline;
+    }
+
+    public void setDeadline(Date deadline) {
+        this.deadline = deadline;
+    }
+
+    public Integer getOfferAmount() {
+        return offerAmount;
+    }
+
+    public void setOfferAmount(Integer offerAmount) {
+        this.offerAmount = offerAmount;
+    }
+
+    public String getProduceDate() {
+        return produceDate;
+    }
+
+    public void setProduceDate(String produceDate) {
+        this.produceDate = produceDate;
+    }
+
+    public String getEncapsulation() {
+        return encapsulation;
+    }
+
+    public void setEncapsulation(String encapsulation) {
+        this.encapsulation = encapsulation;
+    }
+
+    public Long getAmount() {
+        return amount;
+    }
+
+    public void setAmount(Long amount) {
+        this.amount = amount;
+    }
+
+    public Integer getStatus() {
+        return status;
+    }
+
+    public void setStatus(Integer status) {
+        this.status = status;
+    }
+
+    public Double getUnitPrice() {
+        return unitPrice;
+    }
+
+    public void setUnitPrice(Double unitPrice) {
+        this.unitPrice = unitPrice;
+    }
+
+    public String getKind() {
+        return kind;
+    }
+
+    public void setKind(String kind) {
+        this.kind = kind;
+    }
+}

+ 64 - 0
src/main/java/com/uas/platform/b2c/trade/seek/model/SeekQualityBuyer.java

@@ -0,0 +1,64 @@
+package com.uas.platform.b2c.trade.seek.model;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Id;
+import javax.persistence.Table;
+
+/**
+ * 求购-优质采购商实体类
+ *
+ * @author liusw
+ * @version 2017/12/13 10:16
+ */
+@Entity(name = "trade.seekQualityBuyer")
+@Table(name = "trade$seekQualityBuyer")
+public class SeekQualityBuyer {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * ID
+     */
+    @Id
+    @GeneratedValue
+    @Column(name = "qb_id")
+    private Long id;
+
+    /**
+     * 采购商排序
+     */
+    @Column(name = "qb_sort")
+    private Integer sort;
+
+    /**
+     * 采购商名称
+     */
+    @Column(name = "qb_name")
+    private String name;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Integer getSort() {
+        return sort;
+    }
+
+    public void setSort(Integer sort) {
+        this.sort = sort;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+}

+ 29 - 0
src/main/java/com/uas/platform/b2c/trade/seek/service/SeekPurchaseService.java

@@ -0,0 +1,29 @@
+package com.uas.platform.b2c.trade.seek.service;
+
+import com.uas.platform.b2c.trade.seek.model.SeekPurchase;
+import com.uas.platform.core.model.PageInfo;
+import java.util.List;
+import java.util.Map;
+import org.springframework.data.domain.Page;
+
+/**
+ * 求购业务接口类
+ *
+ * @author liusw
+ * @version 2017/12/12 16:45
+ */
+public interface SeekPurchaseService {
+
+    /**
+     * 分页获取采购列表
+     * @param pageInfo 分页信息
+     * @return 采购列表
+     */
+    Page<SeekPurchase> getSeekPageInfo(PageInfo pageInfo);
+
+    /**
+     * 获取采购排行榜
+     * @return 排行榜
+     */
+    List<Map<String, Object>> getSeekRanking();
+}

+ 22 - 0
src/main/java/com/uas/platform/b2c/trade/seek/service/SeekQualityBuyerService.java

@@ -0,0 +1,22 @@
+package com.uas.platform.b2c.trade.seek.service;
+
+import com.uas.platform.b2c.trade.seek.model.SeekQualityBuyer;
+import com.uas.platform.core.model.PageInfo;
+import org.springframework.data.domain.Page;
+
+/**
+ * 优质采购商接口
+ *
+ * @author liusw
+ * @version 2017/12/13 10:45
+ */
+public interface SeekQualityBuyerService {
+
+    Page<SeekQualityBuyer> getBuyerPageInfo(PageInfo info);
+
+    SeekQualityBuyer saveBuyer(SeekQualityBuyer buyer);
+
+    SeekQualityBuyer getOneBuyer(Long id);
+
+    void deleteBuyer(Long id);
+}

+ 48 - 0
src/main/java/com/uas/platform/b2c/trade/seek/service/impl/SeekPurchaseServiceImpl.java

@@ -0,0 +1,48 @@
+package com.uas.platform.b2c.trade.seek.service.impl;
+
+import com.uas.platform.b2c.trade.seek.dao.SeekPurchaseDao;
+import com.uas.platform.b2c.trade.seek.model.SeekPurchase;
+import com.uas.platform.b2c.trade.seek.service.SeekPurchaseService;
+import com.uas.platform.core.model.PageInfo;
+import java.util.List;
+import java.util.Map;
+import javax.persistence.criteria.CriteriaBuilder;
+import javax.persistence.criteria.CriteriaQuery;
+import javax.persistence.criteria.Predicate;
+import javax.persistence.criteria.Root;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.domain.Page;
+import org.springframework.data.jpa.domain.Specification;
+import org.springframework.stereotype.Service;
+
+/**
+ * 求购业务实现类
+ *
+ * @author liusw
+ * @version 2017/12/12 16:45
+ */
+@Service
+public class SeekPurchaseServiceImpl implements SeekPurchaseService {
+
+    /**
+     * 求购接口
+     */
+    @Autowired
+    private SeekPurchaseDao seekPurchasedao;
+
+    @Override
+    public Page<SeekPurchase> getSeekPageInfo(final PageInfo pageInfo) {
+        Page<SeekPurchase> pageSeeks = seekPurchasedao.findAll(new Specification<SeekPurchase>() {
+            public Predicate toPredicate(Root<SeekPurchase> root, CriteriaQuery<?> query, CriteriaBuilder builder) {
+                query.where(pageInfo.getPredicates(root, query, builder));
+                return null;
+            }
+        }, pageInfo);
+        return pageSeeks;
+    }
+
+    @Override
+    public List<Map<String, Object>> getSeekRanking() {
+        return null;
+    }
+}

+ 64 - 0
src/main/java/com/uas/platform/b2c/trade/seek/service/impl/SeekQualityBuyerServiceImpl.java

@@ -0,0 +1,64 @@
+package com.uas.platform.b2c.trade.seek.service.impl;
+
+import com.uas.platform.b2c.trade.seek.dao.SeekQualityBuyerDao;
+import com.uas.platform.b2c.trade.seek.model.SeekQualityBuyer;
+import com.uas.platform.b2c.trade.seek.service.SeekQualityBuyerService;
+import com.uas.platform.core.model.PageInfo;
+import javax.persistence.criteria.CriteriaBuilder;
+import javax.persistence.criteria.CriteriaQuery;
+import javax.persistence.criteria.Predicate;
+import javax.persistence.criteria.Root;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.domain.Page;
+import org.springframework.data.domain.Sort.Direction;
+import org.springframework.data.jpa.domain.Specification;
+import org.springframework.stereotype.Service;
+
+/**
+ * 优质采购商实现类
+ *
+ * @author liusw
+ * @version 2017/12/13 10:45
+ */
+@Service
+public class SeekQualityBuyerServiceImpl implements SeekQualityBuyerService {
+
+    @Autowired
+    private SeekQualityBuyerDao seekQualityBuyerDao;
+
+    @Override
+    public Page<SeekQualityBuyer> getBuyerPageInfo(final PageInfo pageInfo) {
+        pageInfo.sorting("sort", Direction.ASC);
+        Page<SeekQualityBuyer> pageBuyers = seekQualityBuyerDao.findAll(new Specification<SeekQualityBuyer>() {
+            public Predicate toPredicate(Root<SeekQualityBuyer> root, CriteriaQuery<?> query, CriteriaBuilder builder) {
+                query.where(pageInfo.getPredicates(root, query, builder));
+                return null;
+            }
+        }, pageInfo);
+        return pageBuyers;
+    }
+
+    @Override
+    public SeekQualityBuyer saveBuyer(SeekQualityBuyer buyer) {
+        if (buyer == null || buyer.getSort() == null || buyer.getName() == null) {
+            throw new IllegalArgumentException("请输入完整信息");
+        }
+        return seekQualityBuyerDao.save(buyer);
+    }
+
+    @Override
+    public SeekQualityBuyer getOneBuyer(Long id) {
+        if (id == null) {
+            throw new IllegalArgumentException("id未空");
+        }
+        return seekQualityBuyerDao.findOne(id);
+    }
+
+    @Override
+    public void deleteBuyer(Long id) {
+        if (id == null) {
+            throw new IllegalArgumentException("id未空");
+        }
+       seekQualityBuyerDao.delete(id);
+    }
+}

+ 2 - 0
src/main/webapp/WEB-INF/views/normal/adminWithNav.html

@@ -172,6 +172,8 @@
 					class="fa fa-flag"></i><span> 非法关键词维护</span></a></li>
 			<li class="nav-node"><a href="#/logUsage"><i
 					class="fa fa-flag"></i><span>用户操作日志</span></a></li>
+			<li class="nav-node"><a href="#/seekQualityBuyer"><i
+					class="fa fa-flag"></i><span>优质采购商</span></a></li>
 
 			<li class="nav-header">禁用信息</li>
 			<li class="nav-node"><a href="#/disable/brand"><i

+ 9 - 2
src/main/webapp/resources/js/admin/app.js

@@ -1,4 +1,4 @@
- define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ui-form', 'ngLocal', 'ngTable', 'ngSanitize', 'ngDraggable', 'common/services', 'common/directives', 'common/query/brand', 'common/query/address', 'common/query/return' , 'common/query/change' ,'common/query/component', 'common/query/order', 'common/query/purchase', 'common/query/invoice', 'common/query/property', 'common/query/kind', 'common/query/property', 'common/query/receipt', 'common/query/logistics' ,'angular-toaster', 'ui-jquery', 'jquery-uploadify','common/query/dateParse' , 'common/query/bankTransfer' ,'common/query/bankInfo', 'common/query/urlencryption', 'common/query/bill', 'common/query/makerDemand', 'common/query/goods', 'common/query/validtime', 'file-upload','file-upload-shim', 'common/query/slideImage', 'common/query/kindAdvice', 'common/query/responseLogistics', 'common/query/search','common/directives/dynamicInput', 'common/query/auditorMail', 'common/query/tradeBasicProperties', 'common/query/exchangeRate', 'common/query/tradeDeliveryDelayTime', 'common/query/payment', 'common/query/kindContrast', 'common/query/crawlTask', 'common/query/afterSale', 'common/query/refund', 'common/query/messageBoard', 'common/query/logisticsPort', 'common/query/storeInfo', 'common/query/cms', 'common/query/help', 'common/query/commonCount', 'common/module/store_admin_violations_module', 'common/query/internalMessage','common/query/user','common/query/secQuestion','common/query/keyWord','common/query/logUsage'], function(angularAMD) {
+ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ui-form', 'ngLocal', 'ngTable', 'ngSanitize', 'ngDraggable', 'common/services', 'common/directives', 'common/query/brand', 'common/query/address', 'common/query/return' , 'common/query/change' ,'common/query/component', 'common/query/order', 'common/query/purchase', 'common/query/invoice', 'common/query/property', 'common/query/kind', 'common/query/property', 'common/query/receipt', 'common/query/logistics' ,'angular-toaster', 'ui-jquery', 'jquery-uploadify','common/query/dateParse' , 'common/query/bankTransfer' ,'common/query/bankInfo', 'common/query/urlencryption', 'common/query/bill', 'common/query/makerDemand', 'common/query/goods', 'common/query/validtime', 'file-upload','file-upload-shim', 'common/query/slideImage', 'common/query/kindAdvice', 'common/query/responseLogistics', 'common/query/search','common/directives/dynamicInput', 'common/query/auditorMail', 'common/query/tradeBasicProperties', 'common/query/exchangeRate', 'common/query/tradeDeliveryDelayTime', 'common/query/payment', 'common/query/kindContrast', 'common/query/crawlTask', 'common/query/afterSale', 'common/query/refund', 'common/query/messageBoard', 'common/query/logisticsPort', 'common/query/storeInfo', 'common/query/cms', 'common/query/help', 'common/query/commonCount', 'common/module/store_admin_violations_module', 'common/query/internalMessage','common/query/user','common/query/secQuestion','common/query/keyWord','common/query/logUsage','common/query/seekQualityBuyer'], function(angularAMD) {
 	'use strict';
 
 	 /**
@@ -8,7 +8,7 @@
 		 return this.length > 0 ? this[this.length - 1] : null;
 	 };
 
-	var app = angular.module('myApp', [ 'ui.router', 'ui.bootstrap', 'ui.form', 'ng.local', 'ngTable', 'ngSanitize', 'ngDraggable', 'common.services', 'common.directives', 'brandServices', 'addressServices', 'returnServices', 'changeServices', 'componentServices', 'orderServices', 'purchaseServices', 'invoiceServices', 'propertyServices', 'receiptServices', 'logisticsServices', 'common.query.kind', 'toaster','ui.jquery' ,'dateparseServices', 'bankInfo' , 'bankTransfer', 'urlencryptionServices', 'billServices', 'makerDemand', 'goodsServices', 'validtimeServices', 'angularFileUpload', 'slideImageService', 'common.query.kindAdvice', 'responseLogisticsService', 'searchService', 'ngDynamicInput', 'ReviewerEmailInfoService', 'tradeBasicPropertiesServices', 'exchangeRateModule', 'tradeDeliveryDelayTimeModule', 'PaymentService', 'kindContrastServices', 'crawlTaskServices', 'afterSaleService', 'refundModule', 'messageBoardServices', 'logisticsPortService', 'storeInfoServices', 'cmsService', 'helpServices', 'commonCountServices', 'tool.directives', 'StoreAdminViolationsModule', 'internalMessageServices','common.query.user','secQuestionServices','keyWordServices','logUsageServices']);
+	var app = angular.module('myApp', [ 'ui.router', 'ui.bootstrap', 'ui.form', 'ng.local', 'ngTable', 'ngSanitize', 'ngDraggable', 'common.services', 'common.directives', 'brandServices', 'addressServices', 'returnServices', 'changeServices', 'componentServices', 'orderServices', 'purchaseServices', 'invoiceServices', 'propertyServices', 'receiptServices', 'logisticsServices', 'common.query.kind', 'toaster','ui.jquery' ,'dateparseServices', 'bankInfo' , 'bankTransfer', 'urlencryptionServices', 'billServices', 'makerDemand', 'goodsServices', 'validtimeServices', 'angularFileUpload', 'slideImageService', 'common.query.kindAdvice', 'responseLogisticsService', 'searchService', 'ngDynamicInput', 'ReviewerEmailInfoService', 'tradeBasicPropertiesServices', 'exchangeRateModule', 'tradeDeliveryDelayTimeModule', 'PaymentService', 'kindContrastServices', 'crawlTaskServices', 'afterSaleService', 'refundModule', 'messageBoardServices', 'logisticsPortService', 'storeInfoServices', 'cmsService', 'helpServices', 'commonCountServices', 'tool.directives', 'StoreAdminViolationsModule', 'internalMessageServices','common.query.user','secQuestionServices','keyWordServices','logUsageServices','seekQualityBuyerServices']);
 	app.init = function() {
 		angularAMD.bootstrap(app);
 	};
@@ -603,6 +603,13 @@
       controller: 'LogUsageCtrl',
       controllerUrl: 'app/controllers/LogUsageCtrl',
       title: '用户操作日志'
+    })).state('seekQualityBuyer', angularAMD.route({
+      //用户操作日志
+      url: '/seekQualityBuyer',
+      templateUrl: 'static/view/admin/seekQualityBuyer.html',
+      controller: 'SeekQualityBuyerCtrl',
+      controllerUrl: 'app/controllers/SeekQualityBuyerCtrl',
+      title: '用户操作日志'
     })).state('keyWord', angularAMD.route({
       url: '/keyWord',
       templateUrl: 'static/view/admin/keyword.html',

+ 89 - 0
src/main/webapp/resources/js/admin/controllers/SeekQualityBuyerCtrl.js

@@ -0,0 +1,89 @@
+define(['app/app'], function (app) {
+  'use strict';
+  app.register.controller('SeekQualityBuyerCtrl', ['$scope', 'seekQualityBuyer', 'toaster', 'BaseService','$modal','ngTableParams', function ($scope, seekQualityBuyer, toaster, BaseService,$modal,ngTableParams) {
+    $scope.seekQualityBuyerTableParams = new ngTableParams({
+      page : 1,
+      count : 5
+    }, {
+      total : 0,
+      getData : function ($defer, params) {
+        const param = BaseService.parseParams(params.url());
+        seekQualityBuyer.getBuyerPageInfo(param, function (data) {
+          params.total(data.totalElements);
+          $defer.resolve(data.content);
+        }, function (response) {
+          toaster.pop('error', response.data);
+        });
+      }
+    });
+
+    // 添加采购商
+    $scope.add = function() {
+      openModal(null) ;
+    }
+
+    // 编辑采购商
+    $scope.edit = function(id) {
+      openModal(id) ;
+    }
+
+    // 删除采购商
+    $scope.delete = function (id) {
+      seekQualityBuyer.deleteBuyer({id:id},function(){
+        toaster.pop('success', '提示', '删除采购商成功');
+        $scope.seekQualityBuyerTableParams.reload();
+      },function(res){
+        toaster.pop('error', '提示', res.data);
+      });
+    }
+
+    var openModal = function(id) {
+      var modalInstance = $modal.open({
+        templateUrl : 'static/view/admin/modal/seekQualityBuyer_add_modal.html',  //指向上面创建的视图
+        controller : 'SeekQualityBuyerEditCtrl',// 初始化模态范围
+        size : 'sm', // 大小配置
+        resolve: {
+          id: function() {
+            return id;
+          }
+        }
+      });
+      modalInstance.result.then(function(){
+        $scope.seekQualityBuyerTableParams.reload();
+      }, function(res){
+      });
+    }
+  }]);
+
+  /**
+   * 优质采购商 添加和编辑 模态框
+   */
+  app.register.controller('SeekQualityBuyerEditCtrl', ['$scope','id', '$modalInstance','ngTableParams', 'seekQualityBuyer', 'toaster', 'BaseService', function ($scope, id,$modalInstance,ngTableParams, seekQualityBuyer, toaster, BaseService) {
+    $scope.addModal = true;
+    $scope.updateModal = false;
+    if (id) {
+      seekQualityBuyer.getOneBuyer({id : id}, function(data) {
+        $scope.seekQualityBuyer = data;
+        $scope.addModal = false;
+        $scope.updateModal = true;
+      }, function(res) {
+        toaster.pop('error', '提示', res.data);
+      });
+    }
+
+    // 保存操作
+    $scope.confirm = function() {
+      seekQualityBuyer.saveBuyer({},$scope.seekQualityBuyer,function(data) {
+        toaster.pop('success', '提示', '添加优秀采购商成功');
+        $modalInstance.close();
+      }, function(res) {
+        toaster.pop('error', '提示', res.data);
+      });
+    };
+
+
+    $scope.cancel = function() {
+      $modalInstance.dismiss();
+    }
+  }]);
+});

+ 23 - 0
src/main/webapp/resources/js/common/query/seekQualityBuyer.js

@@ -0,0 +1,23 @@
+define([ 'ngResource' ], function() {
+	angular.module('seekQualityBuyerServices', [ 'ngResource' ]).factory('seekQualityBuyer', ['$resource', 'BaseService', function($resource, BaseService) {
+		const rootPath = BaseService.getRootPath();
+		return $resource('seek/qualityBuyer', {}, {
+      getBuyerPageInfo:{
+        url:'seek/qualityBuyer/getBuyerPageInfo',
+        method:'GET'
+			},
+      saveBuyer:{
+        url:'seek/qualityBuyer/saveBuyer',
+        method:'POST'
+			},
+      getOneBuyer:{
+        url:'seek/qualityBuyer/getOneBuyer',
+        method:'GET'
+			},
+      deleteBuyer:{
+        url:'seek/qualityBuyer/deleteBuyer',
+        method:'PUT'
+      }
+		});
+}])
+});

+ 18 - 0
src/main/webapp/resources/view/admin/modal/seekQualityBuyer_add_modal.html

@@ -0,0 +1,18 @@
+<div class="modal-header">
+	<h3 class="modal-title" ng-hide="!addModal">添加优质采购商</h3>
+	<h3 class="modal-title" ng-hide="!updateModal">编辑优质采购商</h3>
+</div>
+<div class="modal-body">
+	<div class="form-group">
+		<sapn>名称:</sapn>
+		<input type="text" ng-model="seekQualityBuyer.name"/>
+	</div>
+	<div class="form-group">
+		<sapn>排序:</sapn>
+		<input type="text" ng-model="seekQualityBuyer.sort"/>
+	</div>
+</div>
+<div class="modal-footer">
+	<button  class="btn btn-success" ng-click="confirm()">确认</button>
+	<button class="btn btn-default" ng-click="cancel()">取消</button>
+</div>

+ 40 - 0
src/main/webapp/resources/view/admin/seekQualityBuyer.html

@@ -0,0 +1,40 @@
+<style>
+.row {
+	margin-bottom: 10px;
+}
+</style>
+<div>
+	<div class="box-header well">
+		求购-优质采购商
+	</div>
+	<div  class="box-content">
+		<div class="row">
+			<div class="col-xs-offset-9 col-xs-4">
+				<a class="btn btn-primary" ng-click="add()"><i class="fa fa-plus"></i>添加优质采购商</a>
+			</div>
+		</div>
+		<p ng-model="test"></p>
+		<table ng-table="seekQualityBuyerTableParams"
+			class="table table-bordered table-striped table-hover" style="word-break:break-all; word-wrap:break-all;">
+			<thead>
+				<tr class="tr-default">
+					<th width="10%;" class="text-center">编号</th>
+					<th width="7%;" class="text-center">名称</th>
+					<th width="10%" class="text-center">排序</th>
+					<th width="10%" class="text-center">操作</th>
+				</tr>
+			</thead>
+			<tbody ng-repeat="buyer in $data">
+				<tr class="text-center">
+					<td><span ng-bind="buyer.id"></span></td>
+					<td><span ng-bind="buyer.name"></span></td>
+					<td><span ng-bind="buyer.sort"></span></td>
+					<td>
+						<button class="btn btn-primary" ng-click="edit(buyer.id)">编辑</button>
+						<button class="btn btn-primary" ng-click="delete(buyer.id)">删除</button>
+					</td>
+				</tr>
+			</tbody>
+		</table>
+	</div>
+</div>