Kaynağa Gözat

Merge remote-tracking branch 'origin/dev' into dev

hejq 8 yıl önce
ebeveyn
işleme
24fa1613c9
35 değiştirilmiş dosya ile 607 ekleme ve 319 silme
  1. 18 1
      donate-console/pom.xml
  2. 1 7
      donate-console/src/main/java/com/uas/console/donate/controller/ActivityController.java
  3. 1 45
      donate-console/src/main/java/com/uas/console/donate/controller/ActivityRecodeController.java
  4. 11 14
      donate-console/src/main/java/com/uas/console/donate/controller/OrgController.java
  5. 9 9
      donate-console/src/main/java/com/uas/console/donate/controller/ProjectController.java
  6. 2 5
      donate-console/src/main/java/com/uas/console/donate/controller/ProjectEvolveController.java
  7. 0 8
      donate-console/src/main/java/com/uas/console/donate/controller/ProjectFinanceController.java
  8. 3 3
      donate-console/src/main/java/com/uas/console/donate/dao/OrgDao.java
  9. 1 1
      donate-console/src/main/java/com/uas/console/donate/dao/ProjectQualificationDao.java
  10. 66 0
      donate-console/src/main/java/com/uas/console/donate/impl/ActivityRecodeServiceImpl.java
  11. 9 0
      donate-console/src/main/java/com/uas/console/donate/impl/ActivityServiceImpl.java
  12. 2 6
      donate-console/src/main/java/com/uas/console/donate/impl/OrgServiceImpl.java
  13. 0 3
      donate-console/src/main/java/com/uas/console/donate/impl/ProjectQualificationServiceImpl.java
  14. 7 4
      donate-console/src/main/java/com/uas/console/donate/model/Activity.java
  15. 0 3
      donate-console/src/main/java/com/uas/console/donate/model/ActivityRecode.java
  16. 3 1
      donate-console/src/main/java/com/uas/console/donate/service/ActivityRecodeService.java
  17. 19 5
      donate-console/src/main/webapp/WEB-INF/views/bannerSetting.html
  18. 165 26
      donate-console/src/main/webapp/resources/js/index/app.js
  19. 1 1
      donate-console/src/main/webapp/resources/view/project/project_list.html
  20. 1 1
      donate-console/src/main/webapp/resources/view/user/charityCertification.html
  21. 2 2
      donate-console/src/main/webapp/resources/view/user/charityCertification1.html
  22. 2 2
      donate-console/src/main/webapp/resources/view/user/charityCertification2.html
  23. 4 3
      donate-console/src/main/webapp/resources/view/user/charityCertification3.html
  24. 1 1
      donate-console/src/main/webapp/resources/view/user/publicOfferingCertification.html
  25. 70 20
      donate-console/src/main/webapp/resources/view/user/publicOfferingCertification1.html
  26. 36 14
      donate-console/src/main/webapp/resources/view/user/publicOfferingCertification2.html
  27. 34 17
      donate-console/src/main/webapp/resources/view/user/publicOfferingCertification3.html
  28. 40 5
      donate-console/src/main/webapp/resources/view/user/publicOfferingCertification4.html
  29. 1 1
      donate-console/src/main/webapp/resources/view/user/publicOfferingCertification5.html
  30. 54 3
      donate-console/src/main/webapp/resources/view/user/selectInstitutionsNature.html
  31. 22 11
      donate-service/pom.xml
  32. 4 2
      donate-service/src/main/java/com/uas/service/donate/config/AlipayConfig.java
  33. 2 2
      donate-service/src/main/java/com/uas/service/donate/controller/AlipayController.java
  34. 16 3
      donate-service/src/main/java/com/uas/service/donate/model/AlipayOrder.java
  35. 0 90
      donate-service/src/main/java/com/uas/service/donate/util/WxCheckoutUtil.java

+ 18 - 1
donate-console/pom.xml

@@ -229,7 +229,6 @@
                             <staticDir>/</staticDir>
                             <sourceIncludes>
                                 <sourceInclude>resources/js/**/*.js</sourceInclude>
-                                <sourceInclude>resources/ueditor/**/*.js</sourceInclude>
                                 <sourceInclude>WEB-INF/views/**/*.html</sourceInclude>
                             </sourceIncludes>
                             <!-- http://static.ubtoc.com/css/index.css?_v=1450321871828 -->
@@ -287,5 +286,23 @@
         </pluginManagement>
     </build>
 
+    <distributionManagement>
+        <!-- 发布release仓库 -->
+        <repository>
+            <id>platform-release</id>
+            <name>platform-release</name>
+            <url>http://113.105.74.141:8081/artifactory/libs-release-local</url
+
+            >
+        </repository>
+        <!-- 发布快照版本 -->
+        <snapshotRepository>
+            <id>platform-snapshots</id>
+            <name>platform-snapshots</name>
+            <url>http://113.105.74.141:8081/artifactory/libs-snapshot-local</url
+
+            >
+        </snapshotRepository>
+    </distributionManagement>
 
 </project>

+ 1 - 7
donate-console/src/main/java/com/uas/console/donate/controller/ActivityController.java

@@ -32,8 +32,7 @@ import java.util.List;
 
 @Controller
 @RequestMapping("/activity")
-public class
-ActivityController {
+public class ActivityController {
 
     private static final SimpleDateFormat codesdf=new SimpleDateFormat("yyyymmddhhmmsssss");
 
@@ -94,11 +93,6 @@ ActivityController {
     @RequestMapping("/submit")
     public Activity submit(String jsonStr){
         Activity activity = JSONObject.parseObject(jsonStr, Activity.class);
-        Date date=new Date();
-        //设置活动发布时间
-        activity.setSubmitTime(date);
-        //设置活动编号
-        activity.setCode(codesdf.format(date));
 
         return activityService.submit(activity);
     }

+ 1 - 45
donate-console/src/main/java/com/uas/console/donate/controller/ActivityRecodeController.java

@@ -80,51 +80,7 @@ public class ActivityRecodeController {
     @RequestMapping("/extract")
     public List<ActivityRecode> extract(Long activityId) {
 
-        //根据活动id查询谁参与了抽奖
-        List<ActivityRecode> activityRecodeList = activityRecodeService.joins(activityId);
-
-        //根据活动id查询活动奖品
-        List<Award> awardList = awardService.findByActivityId(activityId);
-
-        Set<Integer> set = new HashSet<Integer>();
-
-        //抽奖方法
-        for (Award award : awardList) {
-            //奖品的总数量
-            int amount = award.getAmount();
-            //参与活动人数
-            int size = activityRecodeList.size();
-            //中奖数量
-            int list = (amount <= size) ? amount : size;
-            //得到奖品级别
-            String awardLeavel=award.getAwardLevel();
-
-            //设置随机抽奖
-            for (int i = 1; i <= list; i++) {
-                int random = (int) (Math.random() * size);
-                while (set.contains(random)) {
-                    random = (int) (Math.random() * size);
-                }
-                ActivityRecode activityRecode = activityRecodeList.get(random);
-
-                activityRecode.setAwardId(award.getId());
-                activityRecode.setIsGetAward(1);
-                activityRecode.setReceiveTime(new Date());
-                activityRecode.setStatus(0);
-                activityRecode.setAwardLeavel(awardLeavel);
-
-                activityRecodeService.save(activityRecode);
-                set.add(random);
-            }
-            //在活动表里面保存中奖数
-            Activity activity=activityService.findOne(activityId);
-            activity.setReceivePerson(list);
-
-            //计算出这个活动的中奖率,中奖数除以总人数
-            Double chance=(list*100.00)/size;
-
-            activityService.save(activity);
-        }
+        List<ActivityRecode> activityRecodeList=new ArrayList<ActivityRecode>();
         return activityRecodeList;
     }
 

+ 11 - 14
donate-console/src/main/java/com/uas/console/donate/controller/OrgController.java

@@ -7,10 +7,7 @@ import com.uas.dfs.service.FileClient;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
 import org.springframework.ui.ModelMap;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.bind.annotation.*;
 import org.springframework.web.multipart.MultipartFile;
 
 import javax.servlet.http.HttpServletRequest;
@@ -36,7 +33,7 @@ public class OrgController {
      * 发起机构,有草稿取出草稿,没有草稿就新增
      */
     @ResponseBody
-    @RequestMapping("/show")
+    @RequestMapping(value = "/show",method = RequestMethod.GET)
     public Org show(Long uuid){
         return orgService.show(uuid);
     }
@@ -92,7 +89,7 @@ public class OrgController {
      *提交机构申请
      */
     @ResponseBody
-    @RequestMapping("/submit")
+    @RequestMapping(value = "/submit",method = RequestMethod.POST)
     public Org submit(@RequestParam(required = false) MultipartFile logo,
                       @RequestParam(required = false) MultipartFile certificate,
                       @RequestParam(required = false) MultipartFile personCertificate,
@@ -142,8 +139,8 @@ public class OrgController {
      * 查询某一机构详情信息
      */
     @ResponseBody
-    @RequestMapping("/detail")
-    public Org detail(Long id){
+    @RequestMapping(value = "/detail/{id}",method = RequestMethod.GET)
+    public Org detail(@PathVariable("id") Long id){
         return orgService.findOne(id);
     }
 
@@ -151,8 +148,8 @@ public class OrgController {
      * 批准机构申请
      */
     @ResponseBody
-    @RequestMapping("/approve")
-    public Org approve(Long id){
+    @RequestMapping(value = "/approve/{id}",method = RequestMethod.POST)
+    public Org approve(@PathVariable("id") Long id){
         return orgService.approve(id);
     }
 
@@ -160,8 +157,8 @@ public class OrgController {
      * 拒绝机构申请
      */
     @ResponseBody
-    @RequestMapping("/unapprove")
-    public Org unapprove(Long id,String refuse){
+    @RequestMapping(value = "/unapprove/{id}",method = RequestMethod.POST)
+    public Org unapprove(@PathVariable("id") Long id,String refuse){
         return orgService.unapprove(id,refuse);
     }
 
@@ -171,7 +168,7 @@ public class OrgController {
     * 默认展示已审核的机构信息
     */
      @ResponseBody
-     @RequestMapping("/showOrgs")
+     @RequestMapping(value = "/showOrgs",method = RequestMethod.GET)
      public List<Org> showOrgs(@RequestParam(defaultValue ="0") Integer type, @RequestParam(defaultValue="0") Integer majorArea, @RequestParam(defaultValue="1")Integer status) {
          if (type == 0 && majorArea != 0) {
              return orgService.findByMajorArea(majorArea,status);
@@ -187,7 +184,7 @@ public class OrgController {
 
     //根据搜索框查询机构信息
     @ResponseBody
-    @RequestMapping("/search")
+    @RequestMapping(value = "/search",method = RequestMethod.GET)
     public List<Org> search(String search){
          return orgService.search(search);
     }

+ 9 - 9
donate-console/src/main/java/com/uas/console/donate/controller/ProjectController.java

@@ -45,7 +45,7 @@ public class ProjectController {
     /**
      * 审核通过项目
      */
-    @RequestMapping("/approve")
+    @RequestMapping(value = "/approve",method = RequestMethod.POST)
     @ResponseBody
     public ModelMap approve(Long id){
         return projectService.approve(id);
@@ -54,7 +54,7 @@ public class ProjectController {
     /**
      * 审核驳回项目
      */
-    @RequestMapping("/unapprove")
+    @RequestMapping(value = "/unapprove",method = RequestMethod.POST)
     @ResponseBody
     public ModelMap unapprove(Long id,String refuse){
         return projectService.unapprove(id,refuse);
@@ -72,7 +72,7 @@ public class ProjectController {
     /**
      * 获取所有未被活动关联到的项目
      */
-    @RequestMapping("/getProjectQualification")
+    @RequestMapping(value = "/getProjectQualification",method = RequestMethod.GET)
     @ResponseBody
     public List<Project> getProjectQualification(){
         return projectService.getProjects();
@@ -84,7 +84,7 @@ public class ProjectController {
      * 默认展示已审核的项目信息
      */
     @ResponseBody
-    @RequestMapping("/showProjects")
+    @RequestMapping(value = "/showProjects",method = RequestMethod.GET)
     public List<Project> showProjects(@RequestParam(defaultValue ="全部") String area,@RequestParam(defaultValue="1")Integer status) {
         if(area=="全部"){
             return projectService.findByStatus(status);
@@ -106,7 +106,7 @@ public class ProjectController {
      * 保存项目草稿
      */
     @ResponseBody
-    @RequestMapping("/save")
+    @RequestMapping(value = "/save",method = RequestMethod.POST)
     public Project save(@RequestParam(required = false) MultipartFile logo,
                         @RequestParam(required = false) MultipartFile pcImg,
                         @RequestParam(required = false) MultipartFile mobileImg,
@@ -150,7 +150,7 @@ public class ProjectController {
      * 正式提交项目
      */
     @ResponseBody
-    @RequestMapping("/submit")
+    @RequestMapping(value = "/submit",method = RequestMethod.POST)
     public Project submit(@RequestParam(required = false) MultipartFile logo,
                           @RequestParam(required = false) MultipartFile pcImg,
                           @RequestParam(required = false) MultipartFile mobileImg,
@@ -188,8 +188,8 @@ public class ProjectController {
      * @return
      */
     @ResponseBody
-    @RequestMapping("/detail")
-    public List<Object> detail(Long id){
+    @RequestMapping("/detail/{id}")
+    public List<Object> detail(@PathVariable("id") Long id){
         Org org=projectService.findOrgInfo(id);
         Project project=projectService.findOne(id);
         //项目进度
@@ -211,7 +211,7 @@ public class ProjectController {
      * @return
      */
     @ResponseBody
-    @RequestMapping("/search")
+    @RequestMapping(value = "/search",method = RequestMethod.GET)
     public List<Project> search(String search){
         return projectService.search(search);
     }

+ 2 - 5
donate-console/src/main/java/com/uas/console/donate/controller/ProjectEvolveController.java

@@ -7,10 +7,7 @@ import com.uas.console.donate.service.ProjectEvolveService;
 import com.uas.dfs.service.FileClient;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
-import org.springframework.web.bind.annotation.PathVariable;
-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.*;
 import org.springframework.web.multipart.MultipartFile;
 
 import java.io.IOException;
@@ -47,7 +44,7 @@ public class ProjectEvolveController {
      */
     @ResponseBody
     @RequestMapping(value = "/upload",method = RequestMethod.POST)
-    public String ueditorUpload(MultipartFile file) throws IOException {
+    public String ueditorUpload(@RequestParam(required = false) MultipartFile file) throws IOException {
         //上传图片
         String path=fileClient.upload(file.getBytes(),file.getSize(),"jpg",null);
 

+ 0 - 8
donate-console/src/main/java/com/uas/console/donate/controller/ProjectFinanceController.java

@@ -45,14 +45,6 @@ public class ProjectFinanceController {
         return projectFinanceService.save(projectFinance);
     }
 
-   /* @ResponseBody
-    @RequestMapping("/test")
-    public ProjectFinance test(String name, String age, MultipartFile path, HttpServletRequest request, HttpServletResponse response) throws IOException {
-        System.out.println(path==null);
-        String url = fileClient.upload(path.getBytes(), path.getSize(), "jpg", null);
-        return null;
-    }*/
-
     /**
      * 展示某项目的所有财务信息
      * @param proId

+ 3 - 3
donate-console/src/main/java/com/uas/console/donate/dao/OrgDao.java

@@ -32,9 +32,9 @@ public interface OrgDao extends JpaRepository<Org,Long>,JpaSpecificationExecutor
     @Query("from Org o where type=:type and majorArea=:majorArea and status=:status and publish=2 order By createTime desc" )
     List<Org> findByTypeAndMajorArea(@Param("type") Integer type,@Param("majorArea")Integer majorArea,@Param("status")Integer status);
 
-    //取出草稿状态的机构
-    @Query("from Org  o where publish=1 and uuid=:uuid")
-    Org findDraft(@Param("uuid") Long uuid);
+    //根据UUID取出唯一的机构信息
+    @Query("from Org  o where  uuid=:uuid")
+    Org findOne(@Param("uuid") Long uuid);
 
     Page<Org> findAll(Pageable pageable);
 

+ 1 - 1
donate-console/src/main/java/com/uas/console/donate/dao/ProjectQualificationDao.java

@@ -26,7 +26,7 @@ public interface ProjectQualificationDao extends JpaRepository<ProjectQualificat
     List<Project> notConnectList();
 
     //查询某活动已关联的项目
-    @Query("from ProjectQualification")
+    @Query("from ProjectQualification where activityId=:activityId")
     List<ProjectQualification> hasConnected(@Param("activityId")Long activityId);
 
 

+ 66 - 0
donate-console/src/main/java/com/uas/console/donate/impl/ActivityRecodeServiceImpl.java

@@ -1,12 +1,20 @@
 package com.uas.console.donate.impl;
 
 import com.uas.console.donate.dao.ActivityRecodeDao;
+import com.uas.console.donate.dao.AwardDao;
+import com.uas.console.donate.model.Activity;
 import com.uas.console.donate.model.ActivityRecode;
+import com.uas.console.donate.model.Award;
 import com.uas.console.donate.service.ActivityRecodeService;
+import com.uas.console.donate.service.ActivityService;
+import com.uas.console.donate.service.AwardService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import java.util.Date;
+import java.util.HashSet;
 import java.util.List;
+import java.util.Set;
 
 @Service
 public class ActivityRecodeServiceImpl implements ActivityRecodeService {
@@ -14,6 +22,15 @@ public class ActivityRecodeServiceImpl implements ActivityRecodeService {
     @Autowired
     private ActivityRecodeDao activityRecodeDao;
 
+    @Autowired
+    private ActivityService activityService;
+
+    @Autowired
+    private AwardService awardService;
+
+    @Autowired
+    private ActivityRecodeService activityRecodeService;
+
     public ActivityRecode save(ActivityRecode joinActivity){
 
         return activityRecodeDao.save(joinActivity);
@@ -34,4 +51,53 @@ public class ActivityRecodeServiceImpl implements ActivityRecodeService {
         return activityRecodeDao.findByUuid(uuid);
     }
 
+    //抽奖方法
+    public List<ActivityRecode> extract(Long activityId){
+        //根据活动id查询谁参与了抽奖
+        List<ActivityRecode> activityRecodeList = activityRecodeService.joins(activityId);
+
+        //根据活动id查询活动奖品
+        List<Award> awardList = awardService.findByActivityId(activityId);
+
+        Set<Integer> set = new HashSet<Integer>();
+
+        //抽奖方法
+        for (Award award : awardList) {
+            //奖品的总数量
+            int amount = award.getAmount();
+            //参与活动人数
+            int size = activityRecodeList.size();
+            //中奖数量
+            int list = (amount <= size) ? amount : size;
+            //得到奖品级别
+            String awardLeavel=award.getAwardLevel();
+
+            //设置随机抽奖
+            for (int i = 1; i <= list; i++) {
+                int random = (int) (Math.random() * size);
+                while (set.contains(random)) {
+                    random = (int) (Math.random() * size);
+                }
+                ActivityRecode activityRecode = activityRecodeList.get(random);
+
+                activityRecode.setAwardId(award.getId());
+                activityRecode.setIsGetAward(1);
+                activityRecode.setReceiveTime(new Date());
+                activityRecode.setStatus(0);
+                activityRecode.setAwardLeavel(awardLeavel);
+
+                activityRecodeService.save(activityRecode);
+                set.add(random);
+            }
+            //在活动表里面保存中奖数
+            Activity activity=activityService.findOne(activityId);
+            activity.setReceivePerson(list);
+
+            //计算出这个活动的中奖率,中奖数除以总人数
+            Double chance=(list*100.00)/size;
+
+            activityService.save(activity);
+        }
+        return activityRecodeList;
+    }
 }

+ 9 - 0
donate-console/src/main/java/com/uas/console/donate/impl/ActivityServiceImpl.java

@@ -15,6 +15,7 @@ import org.springframework.data.domain.Page;
 import org.springframework.data.domain.Pageable;
 import org.springframework.stereotype.Service;
 
+import java.text.SimpleDateFormat;
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
@@ -23,6 +24,8 @@ import java.util.List;
 @Service
 public class ActivityServiceImpl implements ActivityService{
 
+    private static final SimpleDateFormat codesdf=new SimpleDateFormat("yyyymmddhhmmsssss");
+
     @Autowired
     private ActivityDao activityDao;
 
@@ -120,6 +123,12 @@ public class ActivityServiceImpl implements ActivityService{
 
     public Activity submit(Activity activity){
 
+        Date date=new Date();
+        //设置活动发布时间
+        activity.setSubmitTime(date);
+        //设置活动编号
+        activity.setCode(codesdf.format(date));
+
         //设置成发布状态
         activity.setPublish(2);
 

+ 2 - 6
donate-console/src/main/java/com/uas/console/donate/impl/OrgServiceImpl.java

@@ -19,13 +19,9 @@ public class OrgServiceImpl implements OrgService {
     @Autowired
     private OrgDao orgDao;
 
-    //发起机构进行判断,有草稿取出草稿,没草稿新建机构表单
+    //取出机构信息
     public Org show(Long uuid){
-        if(orgDao.findDraft(uuid)==null){
-            return null;
-        }else{
-            return orgDao.findDraft(uuid);
-        }
+        return orgDao.findOne(uuid);
     }
 
     //保存机构

+ 0 - 3
donate-console/src/main/java/com/uas/console/donate/impl/ProjectQualificationServiceImpl.java

@@ -21,9 +21,6 @@ public class ProjectQualificationServiceImpl implements ProjectQualificationServ
         return projectQualificationDao.save(projectQualification);
     }
 
-    /*public ProjectQualification deleteByProject(Long proId){
-        return projectQualificationDao.deleteByProject(proId);
-    }*/
 
     //查询某活动已关联的项目
     public List<ProjectQualification> hasConnected(Long activityId){

+ 7 - 4
donate-console/src/main/java/com/uas/console/donate/model/Activity.java

@@ -133,6 +133,12 @@ public class Activity implements Serializable{
     @Column(name = "act_img")
     private String actImg;
 
+    @Transient
+    private  List<Award> awards;
+
+    @Transient
+    private List<ProjectQualification> projectQualificationList;
+
     public Long getId() {
         return id;
     }
@@ -292,8 +298,7 @@ public class Activity implements Serializable{
         this.actImg = actImg;
     }
 
-    @Transient
-    private  List<Award> awards;
+
 
     public List<Award> getAwards() {
         return awards;
@@ -303,8 +308,6 @@ public class Activity implements Serializable{
         this.awards = awards;
     }
 
-   @Transient
-    private List<ProjectQualification> projectQualificationList;
 
     public List<ProjectQualification> getProjectQualificationList() {
         return projectQualificationList;

+ 0 - 3
donate-console/src/main/java/com/uas/console/donate/model/ActivityRecode.java

@@ -1,8 +1,5 @@
 package com.uas.console.donate.model;
 
-import com.alibaba.fastjson.annotation.JSONField;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-
 import javax.persistence.*;
 import java.util.Date;
 

+ 3 - 1
donate-console/src/main/java/com/uas/console/donate/service/ActivityRecodeService.java

@@ -14,7 +14,9 @@ public interface ActivityRecodeService {
     //查询某一活动的参与人
     List<ActivityRecode> joins(Long activityId);
 
-
+    //查询某用户参与的活动记录
     List<ActivityRecode> queryOne(Long uuid);
 
+    //抽奖方法
+    List<ActivityRecode> extract(Long activityId);
 }

+ 19 - 5
donate-console/src/main/webapp/WEB-INF/views/bannerSetting.html

@@ -149,16 +149,30 @@
         .banner-setting .button{
             margin-top: 30px;
         }
-        .banner-setting .button a{
-            display: inline-block ;
+        .banner-setting .button button{
             width: 140px;
             height: 34px;
             line-height: 34px;
+            font-family: 'SimHei'!important;
             text-align: center;
             font-size: 16px;
+            border-radius: 3px;
+            outline: none ;
+        }
+        .banner-setting .button button:first-child {
+            margin-right: 20px;
             color: #fff;
             background: #3c8dbc;
-            border-radius: 3px;
+            border: 1px solid #d2d2d2;
+        }
+        .banner-setting .button button:first-child:disabled {
+            color: #fff;
+            background: #d2d2d2;
+        }
+        .banner-setting .button button:last-child {
+            color: #787878;
+            background: none;
+            border: 1px solid #dcdcdc;
         }
     </style>
 </head>
@@ -317,7 +331,7 @@
                         <div class="form-group clearfix">
                             <label for="" class="control-label fl">图片名称</label>
                             <input type="text" class="form-control fl"/>
-                            <a href="" class="fl delete">删除</a>
+                            <!--<a href="" class="fl delete">删除</a>-->
                         </div>
                         <div class="form-group clearfix">
                             <label for="" class="control-label fl">图片地址</label>
@@ -343,7 +357,7 @@
                             <label for="" class="control-label fl">轮播文本</label>
                             <input type="text" class="form-control fl"/>
                         </div>
-                        <div class="button"><a href="">保存</a></div>
+                        <div class="button"><button disabled>保存</button><button>删除</button></div>
                     </div>
                 </div>
             </section>

+ 165 - 26
donate-console/src/main/webapp/resources/js/index/app.js

@@ -50,26 +50,59 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'commo
             url : '/selectInstitutionsNature',
             title : '机构入驻选择',
             templateUrl : 'static/view/user/selectInstitutionsNature.html',
+            controller : 'SelectInstitutionsNatureCtrl'
+        }).state("charityCertificationStep0", {
+            url : '/charityCertificationStep0',
+            title : '公益机构认证协议',
+            templateUrl : 'static/view/user/charityCertification.html',
         }).state("charityCertificationStep1", {
             url : '/charityCertificationStep1',
             title : '公益机构认证第一步',
             templateUrl : 'static/view/user/charityCertification1.html',
-            controller : 'charityCertificationStep1Ctrl'
+            controller : 'CertificationStep1Ctrl'
         }).state("charityCertificationStep2", {
             url : '/charityCertificationStep2',
             title : '公益机构认证第二步',
             templateUrl : 'static/view/user/charityCertification2.html',
-            controller : 'charityCertificationStep2Ctrl'
+            controller : 'CertificationStep2Ctrl'
         }).state("charityCertificationStep3", {
             url : '/charityCertificationStep3',
             title : '公益机构认证第三步',
             templateUrl : 'static/view/user/charityCertification3.html',
-            controller : 'charityCertificationStep3Ctrl'
+            controller : 'CertificationStep3Ctrl'
         }).state("charityCertificationStep4", {
             url : '/charityCertificationStep4',
             title : '公益机构认证完成',
             templateUrl : 'static/view/user/charityCertification4.html',
-            controller : 'charityCertificationStep4Ctrl'
+            controller : 'CertificationStep4Ctrl'
+        }).state("publicOfferingCertificationStep0", {
+            url : '/publicOfferingCertificationStep0',
+            title : '公募机构认证协议',
+            templateUrl : 'static/view/user/publicOfferingCertification.html',
+        }).state("publicOfferingCertificationStep1", {
+            url : '/publicOfferingCertificationStep1',
+            title : '公募机构认证第一步',
+            templateUrl : 'static/view/user/publicOfferingCertification1.html',
+            controller : 'CertificationStep1Ctrl'
+        }).state("publicOfferingCertificationStep2", {
+            url : '/publicOfferingCertificationStep2',
+            title : '公募机构认证第二步',
+            templateUrl : 'static/view/user/publicOfferingCertification2.html',
+            controller : 'CertificationStep2Ctrl'
+        }).state("publicOfferingCertificationStep3", {
+            url : '/publicOfferingCertificationStep3',
+            title : '公募机构认证第三步',
+            templateUrl : 'static/view/user/publicOfferingCertification3.html',
+            controller : 'CertificationStep3Ctrl'
+        }).state("publicOfferingCertificationStep4", {
+            url : '/publicOfferingCertificationStep4',
+            title : '公募机构认证第四步',
+            templateUrl : 'static/view/user/publicOfferingCertification4.html',
+            controller : 'PublicCertificationStep4Ctrl'
+        }).state("publicOfferingCertificationStep5", {
+            url : '/publicOfferingCertificationStep5',
+            title : '公益机构认证完成',
+            templateUrl : 'static/view/user/publicOfferingCertification5.html',
         });
 	}]);
 
@@ -361,13 +394,26 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'commo
     }]);
 
     /**
-     * 公益机构认证第一步
+     * 机构入驻选择
+     */
+    app.controller('SelectInstitutionsNatureCtrl', ['$scope', 'toaster', 'Organization',
+        function ($scope, toaster, Organization) {
+            // 获取当前账户注册机构情况
+            Organization.getByUuid({uuid : 10041166}, {}, function(data) {//10041558
+                $scope.org = data;
+            }, function() {
+                toaster.pop('error', '注册情况加载失败');
+            });
+        }]);
+
+    /**
+     * 机构认证第一步
      */
-    app.controller('charityCertificationStep1Ctrl', ['$scope', '$http', '$rootScope', '$timeout', '$location', 'toaster', 'Organization',
+    app.controller('CertificationStep1Ctrl', ['$scope', '$http', '$rootScope', '$timeout', '$location', 'toaster', 'Organization',
         function ($scope, $http, $rootScope, $timeout, $location, toaster, Organization) {
 
             // 获取当前账户注册机构情况
-            Organization.getByUuid({uuid : 10041166}, {}, function(data) {//154534654
+            Organization.getByUuid({uuid : 10041166}, {}, function(data) {//10041558
                 $scope.org = data;
             }, function() {
                 toaster.pop('error', '注册情况加载失败');
@@ -388,11 +434,15 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'commo
 
 
             //提交
-            $scope.saveStep1 = function (org,dirty) {
+            $scope.saveStep1 = function (org,dirty,orgType) {
                 if (dirty == false) {
-                    $location.path('charityCertificationStep2');
+                    if (orgType == 1) {
+                        $location.path('publicOfferingCertificationStep2');
+                    } else if (orgType == 2) {
+                        $location.path('charityCertificationStep2');
+                    }
                 } else {
-                    org.type = 2;//机构类别(1:公募 2:非公募)
+                    org.type = orgType;//机构类别(1:公募 2:非公募)
                     //var file = $scope.myFiles, file = file && file.length > 0 ? file[0] : null;// 可以不传附件
                     $http({
                         method : 'POST',
@@ -405,9 +455,13 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'commo
                             toaster.pop('success', '提示', data.success);
                             /*$timeout(function () {
                              //提交后跳转到下一页,防止重复提交
-                             window.location.href = "#/charityCertification2?orgId=" + data.id;
+                             window.location.href = "#/charityCertification2;
                              }, 500);*/
-                            $location.path('charityCertificationStep2');
+                            if (orgType == 1) {
+                                $location.path('publicOfferingCertificationStep2');
+                            } else if (orgType == 2) {
+                                $location.path('charityCertificationStep2');
+                            }
                         }
                         if (data.error) {
                             toaster.pop('error', '提示', data.error);
@@ -426,22 +480,26 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'commo
         }]);
 
     /**
-     * 公益机构认证第二步
+     * 机构认证第二步
      */
-    app.controller('charityCertificationStep2Ctrl', ['$scope', '$http', '$rootScope', '$timeout', '$location', 'toaster', 'Organization',
+    app.controller('CertificationStep2Ctrl', ['$scope', '$http', '$rootScope', '$timeout', '$location', 'toaster', 'Organization',
         function ($scope, $http, $rootScope, $timeout, $location, toaster, Organization) {
 
             // 获取当前账户注册机构情况
-            Organization.getByUuid({uuid : 10041166}, {}, function(data) {//154534654
+            Organization.getByUuid({uuid : 10041166}, {}, function(data) {//10041558
                 $scope.org = data;
             }, function() {
                 toaster.pop('error', '注册情况加载失败');
             });
 
             //提交
-            $scope.saveStep2 = function (org,dirty) {
+            $scope.saveStep2 = function (org,dirty,orgType) {
                 if (dirty == false) {
-                    $location.path('charityCertificationStep3');
+                    if (orgType == 1) {
+                        $location.path('publicOfferingCertificationStep3');
+                    } else if (orgType == 2) {
+                        $location.path('charityCertificationStep3');
+                    }
                 } else {
                     $http({
                         method: 'POST',
@@ -451,7 +509,11 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'commo
                         },
                     }).success(function (data) {
                         if (data.success) {
-                            $location.path('charityCertificationStep3');
+                            if (orgType == 1) {
+                                $location.path('publicOfferingCertificationStep3');
+                            } else if (orgType == 2) {
+                                $location.path('charityCertificationStep3');
+                            }
                         }
                         if (data.error) {
                             toaster.pop('error', '提示', data.error);
@@ -470,13 +532,13 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'commo
         }]);
 
     /**
-     * 公益机构认证第三步
+     * 机构认证第三步
      */
-    app.controller('charityCertificationStep3Ctrl', ['$scope', '$http', '$rootScope', '$timeout', '$location', 'toaster', 'Organization',
+    app.controller('CertificationStep3Ctrl', ['$scope', '$http', '$rootScope', '$timeout', '$location', 'toaster', 'Organization',
         function ($scope, $http, $rootScope, $timeout, $location, toaster, Organization) {
 
             // 获取当前账户注册机构情况
-            Organization.getByUuid({uuid : 10041166}, {}, function(data) {//154534654
+            Organization.getByUuid({uuid : 10041166}, {}, function(data) {//10041558
                 $scope.org = data;
             }, function() {
                 toaster.pop('error', '注册情况加载失败');
@@ -520,17 +582,21 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'commo
                     $scope.logo = ele.files[0];
                 } else if (order == 1) {
                     $scope.personCertificate = ele.files[0];
-                } if (order == 2) {
+                } else if (order == 2) {
                     $scope.donateCertificate = ele.files[0];
-                } if (order == 3) {
+                } else if (order == 3) {
                     $scope.legalIdCard = ele.files[0];
                 }
                 $scope.$apply();
             }
             //提交
-            $scope.saveStep3 = function (org,dirty) {
+            $scope.saveStep3 = function (org,dirty,orgType) {
                 if (dirty == false) {
-                    $location.path('charityCertificationStep4');
+                    if (orgType == 1) {
+                        $location.path('publicOfferingCertificationStep4');
+                    } else if (orgType == 2) {
+                        $location.path('charityCertificationStep4');
+                    }
                 } else {
                     var data = new FormData();      //以下为像后台提交图片数据
                     data.append('logo', $scope.logo);
@@ -551,7 +617,11 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'commo
                         },
                     }).success(function (data) {
                         if (data.success) {
-                            $location.path('charityCertificationStep4');
+                            if (orgType == 1) {
+                                $location.path('publicOfferingCertificationStep4');
+                            } else if (orgType == 2) {
+                                $location.path('charityCertificationStep4');
+                            }
                         }
                         if (data.error) {
                             toaster.pop('error', '提示', data.error);
@@ -568,7 +638,76 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'commo
                 }
             };
         }]);
+    
+    /**
+     * 公募机构认证第四步
+     */
+    app.controller('PublicCertificationStep4Ctrl', ['$scope', '$http', '$rootScope', '$timeout', '$location', 'toaster', 'Organization',
+        function ($scope, $http, $rootScope, $timeout, $location, toaster, Organization) {
+
+            // 获取当前账户注册机构情况
+            Organization.getByUuid({uuid : 10041166}, {}, function(data) {//10041166  10041558
+                $scope.org = data;
+            }, function() {
+                toaster.pop('error', '注册情况加载失败');
+            });
+
+            $scope.fileChanged = function(ele, order){
+                if (order == 0) {
+                    //合作商户资料
+                    $scope.material = ele.files[0];
+                } else if (order == 1) {
+                    //结算银行账号证明
+                    $scope.certify = ele.files[0];
+                }
+                $scope.$apply();
+            }
+            //提交
+            $scope.saveStep4 = function (org, isDirty, isDraft) {
+                if (isDirty == false) {
+                    $location.path('publicOfferingCertificationStep5');
+                } else {
+                    var url;
+                    if (isDraft) {
+                        url = '/org/save';
+                    } else {
+                        url = '/org/submit';
+                    }
 
+                    var data = new FormData();      //以下为像后台提交图片数据
+                    data.append('material', $scope.material);
+                    data.append('certify', $scope.certify);
+                    $http({
+                        headers: {
+                            'Content-Type': undefined
+                        },
+                        method: 'POST',
+                        processData: false,
+                        async: false,
+                        url: url,
+                        data: data,
+                        params: {
+                            jsonStr: org
+                        },
+                    }).success(function (data) {
+                        if (data.success) {
+                            $location.path('publicOfferingCertificationStep5');
+                        }
+                        if (data.error) {
+                            toaster.pop('error', '提示', data.error);
+                        }
 
+                    }).error(function (data, status) {
+                        $scope.loadingShow = false;
+                        if (status == 403) {
+                            toaster.pop('error', '操作失败', data);
+                        } else {
+                            toaster.pop('error', '操作失败', data.error);
+                        }
+                    });
+                }
+            };
+        }]);
+    
     return app;
 });

+ 1 - 1
donate-console/src/main/webapp/resources/view/project/project_list.html

@@ -730,7 +730,7 @@
                 <span ng-click="setState('disagreed')">未通过<em>({{numOfUnagreed}})</em></span>
             </div>
             <!--<form class="form-horizontal" method="POST" action="">-->
-            <div class="input-group input-group-sm">
+            <div class="input-group input-group-sm fr">
                 <input id="post-search-input" class="form-control" type="search" ng-model="keyword" ng-search="onSearch()" value="" name="" placeholder="请输入关键词">&nbsp;&nbsp;
                 <input id="search-submit" class="btn btn-default btn-sm" type="submit" value="搜索" ng-click="onSearch()">
             </div>

+ 1 - 1
donate-console/src/main/webapp/resources/view/user/charityCertification.html

@@ -411,7 +411,7 @@
                                 <input type="checkbox" class="fl"/>
                                 <div class="fl read"><span>我已经阅读并同意<a href="">《优软一元捐用户协议》</a></span></div>
                             </div>
-                            <a ui-sref="charityCertification1" class="btn">确定,下一步</a>
+                            <a ui-sref="charityCertificationStep1" class="btn">确定,下一步</a>
                         </div>
                     </div>
                 </div>

+ 2 - 2
donate-console/src/main/webapp/resources/view/user/charityCertification1.html

@@ -491,7 +491,7 @@
         <section class="content">
             <div class="container">
                 <div class="section">
-                    <div class="instruction"><span>公益1机构认证</span><span>(以下所有信息均为必填项)</span></div>
+                    <div class="instruction"><span>公益机构认证</span><span>(以下所有信息均为必填项)</span></div>
                     <div class="choose">
                         <div class="chooseNav">
                             <span class="step1 active">1、注册信息</span><span class="step2 active">2、机构信息</span><span
@@ -632,7 +632,7 @@
                                         </div>
                                     </div>
                                     <div class="text-left submitBtn">
-                                        <button type="submit" ng-click="saveStep1(org,charityCertification1.$dirty)" ng-disabled="charityCertification1.$invalid">保存,下一步</button><a href="charityCertification">返回上一页</a></div>
+                                        <button type="submit" ng-click="saveStep1(org, charityCertification1.$dirty, 2)" ng-disabled="charityCertification1.$invalid">保存,下一步</button><a href="charityCertificationStep0">返回上一页</a></div>
                                     <!--<div class="text-left submitBtn"><a href="charityCertification2">保存,下一步</a><a href="charityCertification">返回上一页</a></div>-->
                                 </form>
                             </div>

+ 2 - 2
donate-console/src/main/webapp/resources/view/user/charityCertification2.html

@@ -491,7 +491,7 @@
     <section class="content">
         <div class="container">
             <div class="section">
-                <div class="instruction"><span>公益2机构认证</span><span>(以下所有信息均为必填项)</span></div>
+                <div class="instruction"><span>公益机构认证</span><span>(以下所有信息均为必填项)</span></div>
                 <div class="choose">
                     <div class="chooseNav">
                         <span class="step1 active">1、注册信息</span><span class="step2 active">2、机构信息</span><span
@@ -551,7 +551,7 @@
                                     <span class="control-help fl">(请填写机构当前联系人电子邮箱)</span>
                                 </div>
                                 <div class="text-left submitBtn" style="margin-top: 55px;">
-                                    <button type="submit" ng-click="saveStep2(org,charityCertification2.$dirty)" ng-disabled="charityCertification2.$invalid">保存,下一步</button>
+                                    <button type="submit" ng-click="saveStep2(org, charityCertification2.$dirty, 2)" ng-disabled="charityCertification2.$invalid">保存,下一步</button>
                                     <a ui-sref="charityCertificationStep1">返回上一页</a>
                                 </div>
                             </form>

+ 4 - 3
donate-console/src/main/webapp/resources/view/user/charityCertification3.html

@@ -452,7 +452,7 @@
         margin: 85px 0 60px 130px;
     }
 
-    .detail .text-left a:first-child {
+    .detail .text-left button {
         margin-right: 60px;
         display: inline-block;
         width: 160px;
@@ -466,7 +466,7 @@
         border: none;
     }
 
-    .detail .text-left a:first-child:hover {
+    .detail .text-left button:hover {
         background: #be3b1b;
     }
 
@@ -571,7 +571,8 @@
                                     <img class="fl lookImg" src="{{org.legalIdCard}}">
                                 </div>
                                 <div class="text-left submitBtn" style="margin-top: 75px;">
-                                    <button type="submit" ng-click="saveStep3(org,charityCertification3.$dirty)" ng-disabled="charityCertification3.$invalid">保存,下一步</button>
+                                    <button type="submit" ng-click="saveStep3(org, charityCertification3.$dirty, 2)" ng-disabled="charityCertification3.$invalid">保存,下一步</button>
+                                    <button class="sub">提交</button>
                                     <a ui-sref="charityCertificationStep2">返回上一页</a>
                                 </div>
                             </div>

+ 1 - 1
donate-console/src/main/webapp/resources/view/user/publicOfferingCertification.html

@@ -536,7 +536,7 @@
                                 <input type="checkbox" class="fl"/>
                                 <div class="fl read"><span>我已经阅读并同意<a href="">《优软一元捐用户协议》</a></span></div>
                             </div>
-                            <a class="btn" href="publicOfferingCertification1">确定,下一步</a>
+                            <a ui-sref="publicOfferingCertificationStep1" class="btn">确定,下一步</a>
                         </div>
                     </div>
                 </div>

+ 70 - 20
donate-console/src/main/webapp/resources/view/user/publicOfferingCertification1.html

@@ -318,6 +318,25 @@
         margin: 85px 0 60px 130px;
     }
 
+    .detail .text-left button {
+        margin-right: 60px;
+        width: 160px;
+        height: 34px;
+        display: inline-block;
+        text-align: center;
+        line-height: 34px;
+        font-size: 16px;
+        color: #fff;
+        background: #ff7624;
+        border-radius: 3px;
+        border: none;
+        outline: none;
+    }
+
+    .detail .text-left button:hover {
+        background: #be3b1b;
+    }
+
     .detail .text-left a:first-child {
         margin-right: 60px;
         width: 160px;
@@ -503,6 +522,7 @@
 <!--主体内容-->
 <div class="content-wrapper" style="min-height: 924px;; z-index: 50;">
     <!-- Main content -->
+    <form name="publicOfferingCertification1" novalidate>
     <section class="content">
         <div class="container">
             <div class="section">
@@ -522,34 +542,36 @@
                             <form action="">
                                 <div class="form-group clearfix">
                                     <label for="" class="fl control-label">优软账号</label>
-                                    <input type="text" class="fl form-control">
+                                    <input required="true" type="text" class="fl form-control" ng-maxlength="15" placeholder="请输入企业UU号" ng-model="org.uuid">
                                 </div>
                                 <div class="form-group clearfix">
                                     <label for="" class="fl control-label">机构全称</label>
-                                    <input type="text" class="fl form-control">
-                                    <span class="control-help fl">(请填写机构在银行的开户名称,例如:优软公益慈善基金会)</span>
+                                    <input required="true" type="text" class="fl form-control" placeholder="请输入机构全称" ng-model="org.name">
+                                    <span class="control-help fl">(请填写机构称,例如:优软公益慈善基金会)</span>
                                 </div>
                                 <div class="form-group clearfix">
                                     <label for="" class="fl control-label">机构电话</label>
-                                    <input type="text" class="fl form-control">
+                                    <!--验证规则:区号+号码,区号以0开头,3位或4位号码由7位或8位数字组成区号与号码之间可以无连接符,也可以“-”连接
+                                    若电话号码与手机号码同时验证:(^(\d{3,4}-)?\d{7,8})$|(13[0-9]{9})-->
+                                    <input required="true" type="text" class="fl form-control" ng-parttern="/^0\d{2,3}-?\d{7,8}$/" ng-model="org.telphone">
                                     <span class="control-help fl">(请填写机构常用联系电话,例如:0755-26994808)</span>
                                 </div>
                                 <div class="form-group clearfix">
                                     <label for="" class="fl control-label">常驻地址</label>
                                     <div class="select-group fl">
-                                        <select name="" id="">
+                                        <select required="true" name="" id=""  ng-model="org.province" ng-options="key as key for (key,value) in provinces" ng-change="org.city='';">
                                             <option value="">请选择</option>
                                         </select>
                                         <span>省</span>
                                     </div>
                                     <div class="select-group fl">
-                                        <select name="" id="">
+                                        <select required="true" name="" id="" ng-model="org.city" ng-options="key as key for (key,value) in provinces[org.province]">
                                             <option value="">请选择</option>
                                         </select>
                                         <span>市</span>
                                     </div>
                                     <div class="select-group fl">
-                                        <input type="text" placeholder="详细地址" class="form-control">
+                                        <input required="true" type="text" placeholder="详细地址" class="form-control" ng-model="org.address">
                                     </div>
                                 </div>
                             </form>
@@ -559,17 +581,24 @@
                             <form action="">
                                 <div class="form-group clearfix">
                                     <label for="" class="fl control-label">机构登记性质</label>
-                                    <input type="text" class="fl form-control nature" placeholder="慈善组织(公募)"/>
+                                    <select required="true" name="" id="" class="fl" ng-model="org.regType">
+                                        <option value="">请选择</option>
+                                        <option value="公益机构">公益机构</option>
+                                    </select>
                                 </div>
                                 <div class="form-group clearfix">
                                     <label for="" class="fl control-label">主要领域</label>
-                                    <div class="area fl"><span>疾病援助</span><span>扶贫/救灾</span><span>教育/助学</span><span>环境/动物保护</span><span>其他</span>
+                                    <div class="area fl" ng-model="org.majorArea">
+                                        <span>疾病援助</span><span>扶贫/救灾</span><span>教育/助学</span><span>环境/动物保护</span><span>其他</span>
                                     </div>
                                 </div>
                                 <div class="form-group clearfix">
                                     <label for="" class="fl control-label">年募捐额</label>
-                                    <select name="" id="" class="fl">
+                                    <select required="true" name="" id="" class="fl" ng-model="org.yearDonationAmount">
                                         <option value="">请选择</option>
+                                        <option value="100w-1000w">100w-1000w</option>
+                                        <option value="1000w-10000w">1000w-10000w</option>
+                                        <option value="大于10000w">大于10000w</option>
                                     </select>
                                     <span class="fl control-help">(请选择机构上一年的全年募款金额)</span>
                                 </div>
@@ -577,39 +606,57 @@
                                     <label for="" class="fl control-label">机构规模</label>
                                     <div class="select-group fl">
                                         <span class="count">全职人数</span>
-                                        <select name="" id="">
+                                        <select required="true" name="" id="" ng-model="org.fullTimePopulation">
                                             <option value="">请选择</option>
+                                            <option value="10-100">10-100</option>
+                                            <option value="100-500">100-500</option>
+                                            <option value="超过500">超过500</option>
                                         </select>
                                     </div>
                                     <div class="select-group fl">
                                         <span>兼职人数</span>
-                                        <select name="" id="">
+                                        <select required="true" name="" id="" ng-model="org.partTimePopulation">
                                             <option value="">请选择</option>
+                                            <option value="0-10">0-10</option>
+                                            <option value="10-50">10-50</option>
+                                            <option value="超过50">超过50</option>
                                         </select>
                                     </div>
                                     <div class="select-group fl">
                                         <span>志愿者人数</span>
-                                        <select name="" id="">
+                                        <select required="true" name="" id="" ng-model="org.voluntaryPopulation">
                                             <option value="">请选择</option>
+                                            <option value="0-10">0-10</option>
+                                            <option value="10-50">10-50</option>
+                                            <option value="超过50">超过50</option>
                                         </select>
                                     </div>
                                 </div>
-                                <div class="form-group clearfix">
+                                <div class="form-group input-group input-group-xs input-trigger clearfix">
                                     <label for="" class="fl control-label">成立日期</label>
-                                    <input type="text" class="fl form-control">
+                                    <!--<input type="text" class="fl form-control" ng-model="org.createTime">-->
+                                    <input type="text" ng-model="org.createTime"
+                                           class="f1 form-control" placeholder="到"
+                                           datepicker-popup="yyyy-MM-dd" is-open="org.$toOpened"
+                                           ng-required="true"
+                                           current-text="今天" clear-text="清除" close-text="关闭"
+                                           datepicker-options="{formatDayTitle: 'yyyy年M月', formatMonth: 'M月', showWeeks: false}"
+                                           ng-focus="openDatePicker($event, org, '$toOpened')">
+                                    </span>
                                 </div>
                                 <div class="form-group clearfix home">
                                     <label for="" class="fl control-label">官方主页</label>
                                     <div class="fl text-left">
-                                        <input type="text" class="form-control">
+                                        <input required="true" type="text" class="form-control" ng-model="org.website">
                                         <p class="tip">(请填写您的官网地址,或者机构新浪微博地址,没有设置访问权限的QQ空间、微信公众号推送文章链接其中任意一个)</p>
                                     </div>
                                 </div>
                                 <div class="form-group clearfix home">
                                     <label for="" class="fl control-label">机构简介</label>
                                     <div class="fl text-left">
-                                        <textarea name="" id="" cols="30" rows="10" class="fl"
-                                                  placeholder="筹款来源、特色项目、服务片区、机构愿景、希望解决的社会问题等"></textarea>
+                                            <textarea required="true" name="" id="" cols="30" rows="10" class="fl"
+                                                      ng-model="org.summary"
+                                                      placeholder="筹款来源、特色项目、服务片区、机构愿景、希望解决的社会问题等"></textarea>
                                         <p class="tip">机构简介建议保持在200~500字。</p>
                                     </div>
                                 </div>
@@ -620,8 +667,10 @@
                                         <span>BBPf</span><a href="">刷新验证码</a>
                                     </div>
                                 </div>
-                                <div class="text-left submitBtn"><a href="publicOfferingCertification2">保存,下一步</a><a
-                                        href="publicOfferingCertification">返回上一页</a></div>
+                                <div class="text-left submitBtn">
+                                    <button type="submit" ng-click="saveStep1(org, publicOfferingCertification1.$dirty, 1)" ng-disabled="publicOfferingCertification1.$invalid">保存,下一步</button>
+                                    <a ui-sref="publicOfferingCertificationStep0">返回上一页</a></div>
+                                <!--<div class="text-left submitBtn"><a href="charityCertification2">保存,下一步</a><a href="charityCertification">返回上一页</a></div>-->
                             </form>
                         </div>
                     </div>
@@ -629,6 +678,7 @@
             </div>
         </div>
     </section>
+    </form>
 </div>
 
 <script>

+ 36 - 14
donate-console/src/main/webapp/resources/view/user/publicOfferingCertification2.html

@@ -318,6 +318,25 @@
         margin: 85px 0 60px 130px;
     }
 
+    .detail .text-left button {
+        margin-right: 60px;
+        width: 160px;
+        height: 34px;
+        display: inline-block;
+        text-align: center;
+        line-height: 34px;
+        font-size: 16px;
+        color: #fff;
+        background: #ff7624;
+        border-radius: 3px;
+        border: none;
+        outline: none;
+    }
+
+    .detail .text-left button:hover {
+        background: #be3b1b;
+    }
+
     .detail .text-left a:first-child {
         margin-right: 60px;
         width: 160px;
@@ -503,6 +522,7 @@
 <!--主体内容-->
 <div class="content-wrapper" style="min-height: 924px;; z-index: 50;">
     <!-- Main content -->
+    <form name="publicOfferingCertification2" novalidate>
     <section class="content">
         <div class="container">
             <div class="section">
@@ -522,22 +542,22 @@
                             <form action="">
                                 <div class="form-group clearfix">
                                     <label for="" class="fl control-label">负责人姓名</label>
-                                    <input type="text" class="fl form-control">
+                                    <input type="text" class="fl form-control" ng-model="org.managerName" required="true" ng-pattern="/^[\u4e00-\u9fa5]{1,6}$|^[\dA-Za-z]{1,12}$/">
                                     <span class="control-help fl">(请填写机构当前负责人姓名)</span>
                                 </div>
                                 <div class="form-group clearfix">
                                     <label for="" class="fl control-label">身份证号</label>
-                                    <input type="text" class="fl form-control">
+                                    <input type="text" class="fl form-control" ng-model="org.managerIdcard" required="true">
                                     <span class="control-help fl">(请填写机构当前负责人身份证号码)</span>
                                 </div>
                                 <div class="form-group clearfix">
                                     <label for="" class="fl control-label">办公电话</label>
-                                    <input type="text" class="fl form-control">
+                                    <input type="text" class="fl form-control" ng-model="org.managerOph" ng-pattern="/^0\d{2,3}-?\d{7,8}$/">
                                     <span class="control-help fl">(请填写机构当前负责人有效联系电话)</span>
                                 </div>
                                 <div class="form-group clearfix">
                                     <label for="" class="fl control-label">个人手机</label>
-                                    <input type="text" class="fl form-control">
+                                    <input type="text" class="fl form-control" ng-model="org.managerMobile" required="true" ng-pattern="/^1(3|4|5|7|8)\d{9}$/">
                                     <span class="control-help fl">(请填写机构当前负责人常用联系手机号码)</span>
                                 </div>
                             </form>
@@ -547,27 +567,28 @@
                             <form action="">
                                 <div class="form-group clearfix">
                                     <label for="" class="fl control-label">负责人姓名</label>
-                                    <input type="text" class="fl form-control">
+                                    <input type="text" class="fl form-control" ng-model="org.contactName" required="true" ng-pattern="/^[\u4e00-\u9fa5]{1,6}$|^[\dA-Za-z]{1,12}$/">
                                     <span class="control-help fl">(请填写机构当前联系人姓名)</span>
                                 </div>
                                 <div class="form-group clearfix">
                                     <label for="" class="fl control-label">身份证号</label>
-                                    <input type="text" class="fl form-control">
+                                    <input type="text" class="fl form-control" ng-model="org.contactIdcard" required="true">
                                     <span class="control-help fl">(请填写机构当前联系人身份证号码)</span>
                                 </div>
                                 <div class="form-group clearfix">
-                                    <label for="" class="fl control-label">办公电话</label>
-                                    <input type="text" class="fl form-control">
-                                    <span class="control-help fl">(请填写机构当前联系人有效联系电话)</span>
+                                    <label for="" class="fl control-label">个人手机</label>
+                                    <input type="text" class="fl form-control" ng-model="org.contactTel" ng-pattern="/^1(3|4|5|7|8)\d{9}$/">
+                                    <span class="control-help fl">(请填写机构当前联系人有效联系手机号码)</span>
                                 </div>
                                 <div class="form-group clearfix">
-                                    <label for="" class="fl control-label">个人手机</label>
-                                    <input type="text" class="fl form-control">
+                                    <label for="" class="fl control-label">个人邮箱</label>
+                                    <input type="text" class="fl form-control" ng-model="org.contactEmail" required="true" ng-pattern="/^(\w-*\.*)+@(\w-?)+(\.\w{2,})+$/">
                                     <span class="control-help fl">(请填写机构当前联系人电子邮箱)</span>
                                 </div>
-                                <div class="text-left submitBtn" style="margin-top: 55px;"><a
-                                        href="publicOfferingCertification3">保存,下一步</a><a
-                                        href="publicOfferingCertification1">返回上一页</a></div>
+                                <div class="text-left submitBtn" style="margin-top: 55px;">
+                                    <button type="submit" ng-click="saveStep2(org, publicOfferingCertification2.$dirty, 1)" ng-disabled="publicOfferingCertification2.$invalid">保存,下一步</button>
+                                    <a ui-sref="publicOfferingCertificationStep1">返回上一页</a>
+                                </div>
                             </form>
                         </div>
                     </div>
@@ -575,6 +596,7 @@
             </div>
         </div>
     </section>
+    </form>
 </div>
 
 <script>

+ 34 - 17
donate-console/src/main/webapp/resources/view/user/publicOfferingCertification3.html

@@ -318,7 +318,7 @@
         margin: 85px 0 60px 130px;
     }
 
-    .detail .text-left a:first-child {
+    .detail .text-left button {
         margin-right: 60px;
         width: 160px;
         height: 34px;
@@ -333,7 +333,7 @@
         outline: none;
     }
 
-    .detail .text-left a:first-child:hover {
+    .detail .text-left button:hover {
         background: #be3b1b;
     }
 
@@ -498,11 +498,22 @@
         font-size: 16px;
         color: #1968f9;
     }
+
+    .lookImg{
+        margin-left: 40px;
+        width: 40px;
+        height: 34px;
+        line-height: 34px;
+        text-align: center;
+        vertical-align: middle ;
+        border: 1px solid #dcdcdc;
+    }
 </style>
 
 <!--主体内容-->
 <div class="content-wrapper" style="min-height: 924px;; z-index: 50;">
     <!-- Main content -->
+    <form name="publicOfferingCertification3" novalidate>
     <section class="content">
         <div class="container">
             <div class="section">
@@ -522,18 +533,18 @@
                             <form action="">
                                 <div class="form-group clearfix">
                                     <label for="" class="fl control-label">机构开户名称</label>
-                                    <input type="text" class="fl form-control">
+                                    <input type="text" class="fl form-control" ng-model="org.bankCardName" required="true">
                                 </div>
                                 <div class="form-group clearfix">
-                                    <label for="" class="fl control-label">开户银行支行</label>
-                                    <select name="" id="" class="fl bankChoose">
-                                        <option value="">请选择</option>
-                                    </select>
-                                    <input type="text" class="fl form-control bank-choose">
+                                    <label for="" class="fl control-label">银行账号</label>
+                                    <input type="text" class="fl form-control" ng-model="org.account" required="true" ng-change="getBankName({{org.account}})">
                                 </div>
                                 <div class="form-group clearfix">
-                                    <label for="" class="fl control-label">银行账号</label>
-                                    <input type="text" class="fl form-control">
+                                    <label for="" class="fl control-label">开户银行支行</label>
+                                    <!--<select name="" id="" class="fl bankChoose" ng-model="org.cardOfBank">
+                                        <option value="">请选择</option>
+                                    </select>-->
+                                    <input type="text" class="fl form-control <!--bank-choose-->" ng-model="org.branchMessage" readonly='readonly'>
                                 </div>
                             </form>
                             <div class="message">
@@ -544,36 +555,41 @@
                                     <span class="fl">上传机构logo</span>
                                     <div class="fl uploadImg">
                                         <button>上传图片</button>
-                                        <input type="file">
+                                        <input type="file" ng-multiple="false" onchange='angular.element(this).scope().fileChanged(this, 0)'>
                                     </div>
+                                    <img class="fl lookImg" src="{{org.logo}}">
                                 </div>
                                 <div class="certificate-item clearfix">
                                     <span class="fl">慈善组织法人登记证书(加盖慈善机构红章)</span>
                                     <div class="fl uploadImg">
                                         <button>上传图片</button>
-                                        <input type="file">
+                                        <input type="file" id="personCertificateImage" ng-multiple="false" onchange='angular.element(this).scope().fileChanged(this, 1)'>
                                         <a href="">查看样式</a>
                                     </div>
+                                    <img class="fl lookImg" src="{{org.personCertificate}}">
                                 </div>
                                 <div class="certificate-item clearfix">
                                     <span class="fl">慈善组织公开募捐资格证书(加盖机构红章)</span>
                                     <div class="fl uploadImg">
                                         <button>上传图片</button>
-                                        <input type="file">
+                                        <input type="file" id="donateCertificateImage" ng-multiple="false" onchange='angular.element(this).scope().fileChanged(this, 2)'>
                                         <a href="">查看样式</a>
                                     </div>
+                                    <img class="fl lookImg" src="{{org.donateCertificate}}">
                                 </div>
                                 <div class="certificate-item clearfix">
                                     <span class="fl">法人身份证(加盖机构红章)</span>
                                     <div class="fl uploadImg">
                                         <button>上传图片</button>
-                                        <input type="file">
+                                        <input type="file" id="legalIdCardImage" ng-multiple="false" onchange='angular.element(this).scope().fileChanged(this, 3)'>
                                         <a href="">查看样式</a>
                                     </div>
+                                    <img class="fl lookImg" src="{{org.legalIdCard}}">
+                                </div>
+                                <div class="text-left submitBtn" style="margin-top: 75px;">
+                                    <button type="submit" ng-click="saveStep3(org, publicOfferingCertification3.$dirty, 1)" ng-disabled="publicOfferingCertification3.$invalid">保存,下一步</button>
+                                    <a ui-sref="publicOfferingCertificationStep2">返回上一页</a>
                                 </div>
-                                <div class="text-left submitBtn" style="margin-top: 75px;"><a
-                                        href="publicOfferingCertification4">保存,下一步</a><a
-                                        href="publicOfferingCertification2">返回上一页</a></div>
                             </div>
                         </div>
                     </div>
@@ -581,6 +597,7 @@
             </div>
         </div>
     </section>
+    </form>
 </div>
 
 

+ 40 - 5
donate-console/src/main/webapp/resources/view/user/publicOfferingCertification4.html

@@ -318,6 +318,25 @@
         margin: 85px 0 60px 130px;
     }
 
+    .detail .text-left button {
+        margin-right: 60px;
+        width: 160px;
+        height: 34px;
+        display: inline-block;
+        text-align: center;
+        line-height: 34px;
+        font-size: 16px;
+        color: #fff;
+        background: #ff7624;
+        border-radius: 3px;
+        border: none;
+        outline: none;
+    }
+
+    .detail .text-left button:hover {
+        background: #be3b1b;
+    }
+
     .detail .text-left a:first-child {
         margin-right: 60px;
         width: 160px;
@@ -498,11 +517,22 @@
         font-size: 16px;
         color: #1968f9;
     }
+
+    .lookImg{
+        margin-left: 40px;
+        width: 40px;
+        height: 34px;
+        line-height: 34px;
+        text-align: center;
+        vertical-align: middle ;
+        border: 1px solid #dcdcdc;
+    }
 </style>
 
 <!--主体内容-->
 <div class="content-wrapper" style="min-height: 924px;; z-index: 50;">
     <!-- Main content -->
+    <form name="publicOfferingCertification4" novalidate>
     <section class="content">
         <div class="container">
             <div class="section">
@@ -530,28 +560,32 @@
                                     <span class="fl name">XXX合作商户资料</span>
                                     <div class="fl uploadImg">
                                         <button>上传图片</button>
-                                        <input type="file">
+                                        <input type="file" ng-multiple="false" onchange='angular.element(this).scope().fileChanged(this, 0)'>
                                         <a href="">下载模板</a>
                                         <span class="txt-info">(请根据模板要求填写对应内容)</span>
                                     </div>
+                                    <img class="fl lookImg" src="{{org.material}}">
                                 </div>
                                 <div class="certificate-item item clearfix">
                                     <span class="fl name">XXX结算银行账号证明</span>
                                     <div class="fl uploadImg">
                                         <button>上传图片</button>
-                                        <input type="file">
+                                        <input type="file" ng-multiple="false" onchange='angular.element(this).scope().fileChanged(this, 1)'>
                                         <a href="">下载模板</a>
                                         <span class="txt-info">(请根据模板要求填写对应内容)</span>
                                     </div>
+                                    <img class="fl lookImg" src="{{org.certify}}">
                                 </div>
                                 <div class="important-txt text-left">
                                     <p>重要说明:</p>
                                     <p>1、您需要提交的相关资料,由优软一元捐代为办理在优软云平台的募捐账号。</p>
                                     <p>2、所有上传图片大小不超过1M支持jpg、png格式。</p>
                                 </div>
-                                <div class="text-left submitBtn" style="margin-top: 35px;margin-left: 375px;"><a
-                                        href="publicOfferingCertification5">保存,下一步</a><a
-                                        href="publicOfferingCertification3">返回上一页</a></div>
+                                <div class="text-left submitBtn" style="margin-top: 35px;margin-left: 375px;">
+                                    <button type="submit" ng-click="saveStep4(org, publicOfferingCertification4.$dirty, true)" ng-disabled="publicOfferingCertification4.$invalid">保存,下一步</button>
+                                    <button type="submit" ng-click="saveStep4(org, publicOfferingCertification4.$dirty, false)" ng-disabled="publicOfferingCertification4.$invalid">提交</button>
+                                    <a ui-sref="publicOfferingCertificationStep3">返回上一页</a>
+                                </div>
                             </div>
                         </div>
                     </div>
@@ -559,6 +593,7 @@
             </div>
         </div>
     </section>
+    </form>
 </div>
 
 <script>

+ 1 - 1
donate-console/src/main/webapp/resources/view/user/publicOfferingCertification5.html

@@ -518,7 +518,7 @@
                         <div class="detail">
                             <div class="complete"><img src="static/images/over.png" alt=""/><span>注册完成!</span></div>
                             <!--<div class="look"><a href="launchProject">发布项目</a></div>-->
-                            <a href="/" class="return">返回首页&gt;</a>
+                            <a href="/index" class="return">返回首页&gt;</a>
                         </div>
                     </div>
                 </div>

+ 54 - 3
donate-console/src/main/webapp/resources/view/user/selectInstitutionsNature.html

@@ -95,21 +95,72 @@
     <section class="content">
         <div class="container">
             <div class="section">
-                <div class="instruction"><span>身份1说明</span><a href="projectProcessInstruction"><img src="static/images/instruction.png" alt=""/>项目发起流程说明</a></div>
+                <div class="instruction"><span>身份说明</span><a href="projectProcessInstruction"><img src="static/images/instruction.png" alt=""/>项目发起流程说明</a></div>
                 <div class="choose">
                     <p class="choose-txt">请选择适合您的身份,完成以下注册和认证,以便快速发布公益项目。</p>
                     <div class="choose-about">
                         <div class="choose-item">
-                            <a ui-sref="charityCertificationStep1">
+                            <a ng-if="org.id == null || org.publish == 1" ui-sref="charityCertificationStep0">
                                 <div class="img">
                                     <img src="static/images/non-public.png" alt=""/>
                                 </div>
                                 <p>公益机构</p>
                                 <span>适合慈善组织(务公开募捐资格证书)、民办非企业单位、社会团体、企业等,不具备直接面向公众募捐的性质</span>
                             </a>
+
+                            <a ng-if="org.publish == 2 && org.status == 0" ui-sref="charityCertificationStep4"><!--跳到待审核页面-->
+                                <div class="img">
+                                    <img src="static/images/non-public.png" alt=""/>
+                                </div>
+                                <p>公益机构</p>
+                                <span>适合慈善组织(务公开募捐资格证书)、民办非企业单位、社会团体、企业等,不具备直接面向公众募捐的性质</span>
+                            </a>
+
+                            <a ng-if="org.publish == 2 && org.status == 1" ui-sref="charityCertificationStep4"><!--跳到已批准页面-->
+                                <div class="img">
+                                    <img src="static/images/non-public.png" alt=""/>
+                                </div>
+                                <p>公益机构</p>
+                                <span>适合慈善组织(务公开募捐资格证书)、民办非企业单位、社会团体、企业等,不具备直接面向公众募捐的性质</span>
+                            </a>
+
+                            <a ng-if="org.publish == 2 && org.status == 2" href="#"><!--跳到批准不通过页面-->
+                                <div class="img">
+                                    <img src="static/images/non-public.png" alt=""/>
+                                </div>
+                                <p>公益机构</p>
+                                <span>适合慈善组织(务公开募捐资格证书)、民办非企业单位、社会团体、企业等,不具备直接面向公众募捐的性质</span>
+                            </a>
+
+
+
                         </div>
                         <div class="choose-item">
-                            <a ui-sref="publicOfferingCertification">
+                            <a ng-if="org.id == null || org.publish == 1" ui-sref="publicOfferingCertificationStep0">
+                                <div class="img">
+                                    <img src="static/images/public.png" alt=""/>
+                                </div>
+                                <p>慈善组织(公募)</p>
+                                <span>适合民证部批准,持有法人登记证书、公开募捐资格证书,具备向公众募捐集资金性质的公募基金会。</span>
+                            </a>
+
+                            <a ng-if="org.publish == 2 && org.status == 0" ui-sref="publicOfferingCertificationStep5">
+                                <div class="img">
+                                    <img src="static/images/public.png" alt=""/>
+                                </div>
+                                <p>慈善组织(公募)</p>
+                                <span>适合民证部批准,持有法人登记证书、公开募捐资格证书,具备向公众募捐集资金性质的公募基金会。</span>
+                            </a>
+
+                            <a ng-if="org.publish == 2 && org.status == 1" ui-sref="publicOfferingCertificationStep5">
+                                <div class="img">
+                                    <img src="static/images/public.png" alt=""/>
+                                </div>
+                                <p>慈善组织(公募)</p>
+                                <span>适合民证部批准,持有法人登记证书、公开募捐资格证书,具备向公众募捐集资金性质的公募基金会。</span>
+                            </a>
+
+                            <a ng-if="org.publish == 2 && org.status == 2" href="#">
                                 <div class="img">
                                     <img src="static/images/public.png" alt=""/>
                                 </div>

+ 22 - 11
donate-service/pom.xml

@@ -174,18 +174,11 @@
 
         <dependency>
             <groupId>com.alibaba</groupId>
-            <artifactId>alipay-sdk-java</artifactId>
-            <version>java20170411150054</version>
-            <scope>system</scope>
-            <systemPath>${project.basedir}/libs/alipay-sdk-java20170725114550.jar</systemPath>
-        </dependency>
-        <dependency>
-            <groupId>com.unionpay</groupId>
-            <artifactId>unionpay-sdk-java</artifactId>
-            <version>1.54</version>
-            <scope>system</scope>
-            <systemPath>${project.basedir}/libs/bcprov-jdk15on-1.54.jar</systemPath>
+            <artifactId>alipay-sdk</artifactId>
+            <version>java20171027120314</version>
         </dependency>
+
+
         <dependency>
             <groupId>commons-logging</groupId>
             <artifactId>commons-logging</artifactId>
@@ -350,5 +343,23 @@
         </pluginManagement>
     </build>
 
+    <distributionManagement>
+        <!-- 发布release仓库 -->
+        <repository>
+            <id>platform-release</id>
+            <name>platform-release</name>
+            <url>http://113.105.74.141:8081/artifactory/libs-release-local</url
+
+            >
+        </repository>
+        <!-- 发布快照版本 -->
+        <snapshotRepository>
+            <id>platform-snapshots</id>
+            <name>platform-snapshots</name>
+            <url>http://113.105.74.141:8081/artifactory/libs-snapshot-local</url
+
+            >
+        </snapshotRepository>
+    </distributionManagement>
 
 </project>

+ 4 - 2
donate-service/src/main/java/com/uas/service/donate/config/AlipayConfig.java

@@ -5,10 +5,12 @@ public class AlipayConfig {
 	// 合作身份者ID,以2088开头由16位纯数字组成的字符串
 	public static String partner = "";
 	// 收款支付宝账号,一般情况下收款账号就是签约账号
-	public static String seller_email = "";
+	public static String SELLER_ID = "2088721790326335";
+	public static String SELLER_EMAIL = "2681690616@qq.com";
 	// 商户的私钥
 	public static String key = "";
 
+
 /*商城账号沙箱*/
 	public static String SB_DO_MAIN = "http://5087452.nat123.cc";
 	// 商户appid   沙箱 2016081600255841  正式 2017101909388183
@@ -27,7 +29,7 @@ public class AlipayConfig {
 	public static String SB_GATEWAY = "https://openapi.alipaydev.com/gateway.do";
 
 /*优软正式账号*/
-	public static String DO_MAIN = "http://hct.lj.ubtob.com";
+	public static String DO_MAIN = "http://lj.ubtob.com";
 	public static String APPID = "2017110609768534";
 	public static String RSA_PRIVATE_KEY = "MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQCBBAdOMRXg0uJTfZoQN8b4FgXMlPtQn5blyOfcQum8Iv9GLs8v7qgJZCvVWD3AbaFlmpNLyk9KiCuzKwxowknc4gRFpGUNpnlIg6mvDlnB1m9rT5VKQMAzSo8QLUsv9he55zXCE6X/aIIBt4nzBP87IZeVEgYOJY20cUVdIpzyIe69XOHRjeZMTxtgF0MZPEd0CgkuyAkEjhmc909x0zz+aBkXikbj3EHX6nkgR+NThf2UEGnU7RL5Z5cPoRda2fr9atd7mW3r6MrE4A30bPZpPFOigaTHZlhfPMyrin5WtpWhHMF6Y8CS1SUF8YFKX9YWi81ZamcKkCwmlNu9HV3RAgMBAAECggEARJR0oa7b91+CKWlpvNc5b+Sc/ovvL4M1vj3WajIzduuPkKoPPmZ5ckyKNGUsph5gndbWF4KaNX8+44Wtmf41LzIBnVdu1Bu6+r3qNADH2472OS/bptXWlS078RhykDMbl5l87QZuxd6yxODgdosgdTk9D2O+TkTOF63idkiQ7vAzdm8ImjeKIvv2/CU+00Xf4soxBCgLuAyUdfqguXmbrHnYip2WTtegQq0LFuY0n+OuODXxj4JZROZrCbPUZ29ymQkSyZdCyQ/43IYPgyzXQFQ8WPJ0UjiVt+YJLPWzc3PXlX6hXl2wQ7UjuGjWrYqG8w/wXDqfYqSJ0KjloWmwxQKBgQC2jfUDy0vroHuSe9jfhXOFug1yr4dc1JT+LKs4AxEsgQvv2ORgX6lN/rgRLWKnwmNMD7l5Oj6wcY9vxSGhLHF0ZP87DfZSknDxTicBs2wBTLZ918d/NFihcD8J/eMXuhb9xtqX5zyQ/CSHdN+OeqGAsZnbLiwH+hpdY6qdRLuLiwKBgQC06+QuhohB+i7GJ8C1KBgRaox5HXzUEwwR505BEYwRBKZK8Qv+bOAXCchzGrFbD9u6Yyyx6SgVzZOfKpWUcqXMIXrUw7AU34G59uOFoKRZMmVOP1AMCm5IIvRRLF16qi3jsa2sDhI3SXYiBuCWgQv7TftZVVnIu+EhF7YpuwBXkwKBgH1+QLyG+H3WKJyePowJtUxsheoc+DS8fl/sXRd4JEovvAD5XKVTnZNcUzSbuoIQgyo6dQn9HDM3HZ98KI4fey7EbyAtjPNeb/2x9+aXbNvH3HvN5fpwBa2U+ADqYz5gUoXKOWLLNzuD2ai0kyni6zsI2/dsWiBxscYZSaQrJ7HZAoGAZojB+zQ3iNzXIWpqJsEgUs6F6iYyFqbs0kC68tmU/hgafqJ536monqXmuoVIOomUR9/o9rNjCmhF35Ds0QLgv/3BdU+qPUomZVRswdC3E+4hx+TN4uUOd0eIG3D/UYOdGkwaV0ZqQHcbwlEPe3yLY9NgPdLHXaJNBso/bQsUOI0CgYBR8n3au0u+ewWQa568TSbGwbfzpSMu6KlmLOELY1CV30SLWAklyu1zvs2NaqVsZKyxB/ERTwmRAu/ACDNMMx02EmDUK1hajSixBNZfX6cQXIFTUPVFu5uX1Cys8yQ7K8sL6WeTQTVxyrUXW8M81i30YH4sMeu4iJv1++3Mcn0Trw==";
 	public static String NOTIFY_URL = DO_MAIN + "/alipay/notifyUrl";

+ 2 - 2
donate-service/src/main/java/com/uas/service/donate/controller/AlipayController.java

@@ -270,7 +270,7 @@ public class AlipayController {
                 } else {
                     projectRecode.setStatus(projectRecodePayStatus);
 
-                    if (!notifyTotalAmount.equals(projectRecode.getAmount().toString())) {
+                    if (!(Double.parseDouble(notifyTotalAmount) == projectRecode.getAmount())) {
                         //2、判断total_amount是否确实为该订单的实际金额(即商户订单创建时的金额),
                         //TODO 金额不相等情况处理     金额
                         projectRecode.setExceptionMsg("{'AmountMsg' : '支付宝返回金额与订单金额不相等', 'notifyTotalAmount' : " + notifyTotalAmount + "}");
@@ -278,7 +278,7 @@ public class AlipayController {
                         saveAlipayOrder(data, null);
                         response.getWriter().write("fail");
                     } else {
-                        if (!(notifySellerId.equals("2088102171369624") || notifySellerEmail.equals("seller_email"))) {
+                        if (!(AlipayConfig.SELLER_ID.equals(notifySellerId) || AlipayConfig.SELLER_EMAIL.equals(notifySellerEmail))) {
                             //TODO 操作方不相等情况处理    操作方
                             projectRecode.setExceptionMsg("{'SellerMsg' : '支付宝返回操作方不相等', 'notifySellerId' : " + notifySellerId + ", 'notifySellerEmail' : " + notifySellerEmail + "}");
                             projectRecodeService.update(projectRecode);

+ 16 - 3
donate-service/src/main/java/com/uas/service/donate/model/AlipayOrder.java

@@ -1,6 +1,9 @@
 package com.uas.service.donate.model;
 
 import javax.persistence.*;
+import java.io.Serializable;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
 import java.util.Date;
 
 /**
@@ -9,7 +12,11 @@ import java.util.Date;
  */
 @Entity
 @Table(name="alipay$order")
-public class AlipayOrder {
+public class AlipayOrder implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+    private static final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+
     @Id
     @GeneratedValue(strategy = GenerationType.IDENTITY)
     @Column(name = "id")
@@ -144,8 +151,14 @@ public class AlipayOrder {
         return notify_time;
     }
 
-    public void setNotify_time(Date notify_time) {
-        this.notify_time = notify_time;
+    public void setNotify_time(String notify_time) {
+        Date date = null;
+        try {
+            date = sdf.parse(notify_time);
+        } catch (ParseException e) {
+            e.printStackTrace();
+        }
+        this.notify_time = date;
     }
 
     public String getNotify_type() {

+ 0 - 90
donate-service/src/main/java/com/uas/service/donate/util/WxCheckoutUtil.java

@@ -1,90 +0,0 @@
-package com.uas.service.donate.util;
-
-import com.uas.service.donate.config.WxConfig;
-
-import java.security.MessageDigest;
-import java.security.NoSuchAlgorithmException;
-
-/**
- * Created by 黄诚天 on 2017-10-30.
- *
- * 微信Access_Token验证类
- */
-public class WxCheckoutUtil {
-    // 与接口配置信息中的Token要一致
-    private static String token = WxConfig.Token;
-
-    /**
-     * 验证签名
-     *
-     * @param signature
-     * @param timestamp
-     * @param nonce
-     * @return
-     */
-    public static boolean checkSignature(String signature, String timestamp, String nonce) {
-        String[] arr = new String[] { token, timestamp, nonce };
-        // 将token、timestamp、nonce三个参数进行字典序排序
-        // Arrays.sort(arr);
-        sort(arr);
-        StringBuilder content = new StringBuilder();
-        for (int i = 0; i < arr.length; i++) {
-            content.append(arr[i]);
-        }
-        MessageDigest md = null;
-        String tmpStr = null;
-
-        try {
-            md = MessageDigest.getInstance("SHA-1");
-            // 将三个参数字符串拼接成一个字符串进行sha1加密
-            byte[] digest = md.digest(content.toString().getBytes());
-            tmpStr = byteToStr(digest);
-        } catch (NoSuchAlgorithmException e) {
-            e.printStackTrace();
-        }
-        content = null;
-        // 将sha1加密后的字符串可与signature对比,标识该请求来源于微信
-        return tmpStr != null ? tmpStr.equals(signature.toUpperCase()) : false;
-    }
-
-    /**
-     * 将字节数组转换为十六进制字符串
-     *
-     * @param byteArray
-     * @return
-     */
-    private static String byteToStr(byte[] byteArray) {
-        String strDigest = "";
-        for (int i = 0; i < byteArray.length; i++) {
-            strDigest += byteToHexStr(byteArray[i]);
-        }
-        return strDigest;
-    }
-
-    /**
-     * 将字节转换为十六进制字符串
-     *
-     * @param mByte
-     * @return
-     */
-    private static String byteToHexStr(byte mByte) {
-        char[] Digit = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' };
-        char[] tempArr = new char[2];
-        tempArr[0] = Digit[(mByte >>> 4) & 0X0F];
-        tempArr[1] = Digit[mByte & 0X0F];
-        String s = new String(tempArr);
-        return s;
-    }
-    public static void sort(String a[]) {
-        for (int i = 0; i < a.length - 1; i++) {
-            for (int j = i + 1; j < a.length; j++) {
-                if (a[j].compareTo(a[i]) < 0) {
-                    String temp = a[i];
-                    a[i] = a[j];
-                    a[j] = temp;
-                }
-            }
-        }
-    }
-
-}