Sfoglia il codice sorgente

1、加入招聘会酒店自动下发权限功能
2、修改jsp

rayson 1 anno fa
parent
commit
7349d65922

+ 1 - 0
src/main/java/com/thinkgem/jeesite/common/constant/Constant.java

@@ -104,6 +104,7 @@ public class Constant {
     public static final String BOLE_TYPE_CDT="2";// 专家人员类别[1-荣誉顾问委员会,2-职业发展导师团]
     public static final String ORDER_SOURCE_PC="1";// 订单来源[ 1-PC, 2-微信 ]
     public static final String ORDER_SOURCE_WX="2";// 订单来源[ 1-PC, 2-微信 ]
+    public static final String ORDER_SOURCE_SYSTEM="9";// 订单来源[ 1-PC, 2-微信, 9-系统后台 ]
     public static final String STATISTIC_TYPE_MONTH="1";// 统计类型  按月,季度,年 统计
     public static final String STATISTIC_TYPE_QUARTER="2";// 统计类型  按月,季度,年 统计
     public static final String STATISTIC_TYPE_YEAR="3";// 统计类型  按月,季度,年 统计

+ 31 - 0
src/main/java/com/thinkgem/jeesite/modules/recruitment/dto/OrderDto.java

@@ -0,0 +1,31 @@
+package com.thinkgem.jeesite.modules.recruitment.dto;
+
+import java.util.Date;
+
+/**
+ * @author rayson
+ * @description OrderDto 系统生成订单,MdeOrdersReq的扩展
+ * @create 2023-10-13 10:18
+ **/
+public class OrderDto extends MdeOrdersReq{
+
+    private Date finishTime;		// 到期时间
+
+    private String price;		// 套餐售价
+
+    public Date getFinishTime() {
+        return finishTime;
+    }
+
+    public void setFinishTime(Date finishTime) {
+        this.finishTime = finishTime;
+    }
+
+    public String getPrice() {
+        return price;
+    }
+
+    public void setPrice(String price) {
+        this.price = price;
+    }
+}

+ 19 - 2
src/main/java/com/thinkgem/jeesite/modules/recruitment/entity/MdeFairDtl.java

@@ -20,10 +20,12 @@ public class MdeFairDtl extends DataEntity<MdeFairDtl> {
 	private String fairId;		// 招聘会id 父类
 	private String dtlId;		// 用户ID/职位ID
 	private Integer sort;
-	private String fairType;
+	private String fairType; // 招聘会类型
 	private String hotelId;
 	private String jobId;
-	
+	private String vipFlag; // 会员标识[0-非会员;1-会员]
+
+	private String authorizeFlag; // 授权标识[0-未授权;1-授权]
 	private List<MdeJobAdvertised> jobList;
 	
 	public MdeFairDtl() {
@@ -92,4 +94,19 @@ public class MdeFairDtl extends DataEntity<MdeFairDtl> {
 		this.jobList = jobList;
 	}
 
+	public String getVipFlag() {
+		return vipFlag;
+	}
+
+	public void setVipFlag(String vipFlag) {
+		this.vipFlag = vipFlag;
+	}
+
+	public String getAuthorizeFlag() {
+		return authorizeFlag;
+	}
+
+	public void setAuthorizeFlag(String authorizeFlag) {
+		this.authorizeFlag = authorizeFlag;
+	}
 }

+ 31 - 2
src/main/java/com/thinkgem/jeesite/modules/recruitment/entity/MdeJobFair.java

@@ -11,6 +11,7 @@ import java.util.List;
 import com.google.common.collect.Lists;
 
 import com.thinkgem.jeesite.common.persistence.DataEntity;
+import org.hibernate.validator.constraints.NotBlank;
 
 /**
  * 主子表生成Entity
@@ -38,6 +39,12 @@ public class MdeJobFair extends DataEntity<MdeJobFair> {
 	private Date stopDate;		// 结束时间
 	private String versionNo;		// 数据版本号[默认为1]
 	private List<MdeFairDtl> mdeFairDtlList;		// 子表列表
+
+	private String pkgId; // 套餐id(会员套餐表id)
+
+	private String priceId; // 价格id
+
+	private String price;		// 套餐售价
 	
 	public MdeJobFair() {
 		super();
@@ -198,6 +205,28 @@ public class MdeJobFair extends DataEntity<MdeJobFair> {
 	public void setShareImg(String shareImg) {
 		this.shareImg = shareImg;
 	}
-	
-	
+
+	public String getPkgId() {
+		return pkgId;
+	}
+
+	public void setPkgId(String pkgId) {
+		this.pkgId = pkgId;
+	}
+
+	public String getPriceId() {
+		return priceId;
+	}
+
+	public void setPriceId(String priceId) {
+		this.priceId = priceId;
+	}
+
+	public String getPrice() {
+		return price;
+	}
+
+	public void setPrice(String price) {
+		this.price = price;
+	}
 }

+ 54 - 3
src/main/java/com/thinkgem/jeesite/modules/recruitment/service/MdeJobFairService.java

@@ -4,8 +4,15 @@
 package com.thinkgem.jeesite.modules.recruitment.service;
 
 import java.util.ArrayList;
+import java.util.Calendar;
+import java.util.Date;
 import java.util.List;
 
+import com.thinkgem.jeesite.common.constant.Constant;
+import com.thinkgem.jeesite.modules.recruitment.dto.MdeOrdersReq;
+import com.thinkgem.jeesite.modules.recruitment.dto.OrderDto;
+import com.thinkgem.jeesite.modules.recruitment.entity.*;
+import com.thinkgem.jeesite.modules.sys.utils.UserUtils;
 import org.apache.commons.collections.CollectionUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -14,10 +21,7 @@ import org.springframework.transaction.annotation.Transactional;
 import com.thinkgem.jeesite.common.persistence.Page;
 import com.thinkgem.jeesite.common.service.CrudService;
 import com.thinkgem.jeesite.common.utils.StringUtils;
-import com.thinkgem.jeesite.modules.recruitment.entity.MdeJobFair;
-import com.thinkgem.jeesite.modules.recruitment.entity.MdeVipPackagePrice;
 import com.thinkgem.jeesite.modules.recruitment.dao.MdeJobFairDao;
-import com.thinkgem.jeesite.modules.recruitment.entity.MdeFairDtl;
 import com.thinkgem.jeesite.modules.recruitment.dao.MdeFairDtlDao;
 
 /**
@@ -31,6 +35,9 @@ public class MdeJobFairService extends CrudService<MdeJobFairDao, MdeJobFair> {
 
 	@Autowired
 	private MdeFairDtlDao mdeFairDtlDao;
+
+	@Autowired
+	private MdeOrdersService ordersService;
 	
 	public MdeJobFair get(String fairId) {
 		MdeJobFair mdeJobFair = super.get(fairId);
@@ -73,8 +80,52 @@ public class MdeJobFairService extends CrudService<MdeJobFairDao, MdeJobFair> {
 			mdeFairDtl.setFairType(mdeJobFair.getFairType());
 			mdeFairDtl.preInsert();
 			mdeFairDtlDao.insert(mdeFairDtl);
+
+			// 招聘会类型=企业 并且 非会员
+			if(Constant.PKG_TYPE_ENTERPRISE.equals(mdeFairDtl.getFairType())
+					&& Constant.ORDER_TYPE_VIP.equals(mdeFairDtl.getVipFlag())) {
+				buildOrder(mdeJobFair,mdeFairDtl.getDtlId());
+			}
 			
 		}
 	}
+
+	/**
+	 * @description 构建订单
+	 * @author rayson
+	 * @param mdeJobFair
+	 * @date 2023-10-13 13:34
+	 * @return void
+	 **/
+	public void buildOrder(MdeJobFair mdeJobFair,String userCode) {
+		// 构建创建订单类
+		OrderDto orderDto = new OrderDto();
+		orderDto.setUserCode(userCode);
+		orderDto.setType(Constant.ORDER_TYPE_VIP);
+		orderDto.setPkgType(Constant.PKG_TYPE_ENTERPRISE);
+
+
+		orderDto.setPkgId(mdeJobFair.getPkgId());
+		orderDto.setPriceId(mdeJobFair.getPriceId());
+		orderDto.setPrice(mdeJobFair.getPrice());
+
+		orderDto.setIdentityFlag(Constant.PKG_TYPE_ENTERPRISE);
+
+		// 系统后台
+		orderDto.setOrderSource(Constant.ORDER_SOURCE_SYSTEM);
+
+		orderDto.setOrderTime(new Date());
+
+		// 过期时间+2天
+		// 创建 Calendar 对象,并设置为当前时间
+		Calendar calendar = Calendar.getInstance();
+		calendar.setTime(mdeJobFair.getStopDate());
+
+		// 将日期加上两天
+		calendar.add(Calendar.DAY_OF_MONTH, 2);
+		orderDto.setFinishTime(calendar.getTime());
+
+		ordersService.systemGeneratedOrder(orderDto);
+	}
 	
 }

+ 57 - 4
src/main/java/com/thinkgem/jeesite/modules/recruitment/service/MdeOrdersService.java

@@ -17,6 +17,9 @@ import java.util.Set;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
+import com.thinkgem.jeesite.common.utils.IdGenarator;
+import com.thinkgem.jeesite.modules.recruitment.dto.OrderDto;
+import com.thinkgem.jeesite.modules.recruitment.entity.*;
 import org.apache.commons.lang.StringEscapeUtils;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -32,10 +35,6 @@ import com.thinkgem.jeesite.common.utils.DateUtils;
 import com.thinkgem.jeesite.common.utils.StringUtils;
 import com.thinkgem.jeesite.modules.recruitment.dao.MdeOrdersDao;
 import com.thinkgem.jeesite.modules.recruitment.dto.MdeOrdersReq;
-import com.thinkgem.jeesite.modules.recruitment.entity.MdeOrders;
-import com.thinkgem.jeesite.modules.recruitment.entity.MdeVipPackage;
-import com.thinkgem.jeesite.modules.recruitment.entity.MdeVipPackagePrice;
-import com.thinkgem.jeesite.modules.recruitment.entity.PackageStatistic;
 import com.thinkgem.jeesite.modules.sys.utils.UserUtils;
 
 
@@ -51,6 +50,9 @@ public class MdeOrdersService extends CrudService<MdeOrdersDao, MdeOrders> {
 	
 	@Autowired
 	MdeVipPackageService mdeVipPackageService;
+
+	@Autowired
+	MdeUserService mdeUserService;
 	
 //	@Autowired
 //	MdeUserService mdeUserService = new MdeUserService();
@@ -196,6 +198,10 @@ public class MdeOrdersService extends CrudService<MdeOrdersDao, MdeOrders> {
 		dao.update(order);
 	}
 
+	@Transactional(readOnly = false)
+	public void insert(MdeOrders order) {
+		dao.insert(order);
+	}
 	public List<MdeOrders> getValidOrdersListByUserCode(String orderId) {
 		return dao.getValidOrdersListByUserCode(orderId);
 	}
@@ -217,6 +223,53 @@ public class MdeOrdersService extends CrudService<MdeOrdersDao, MdeOrders> {
 
 		return mdeOrders;
 	}
+
+	@Transactional
+	public void systemGeneratedOrder(OrderDto orderDto) {
+
+		// 生成订单信息
+		MdeOrders order = initOrderInfo(orderDto);
+
+		// 完成支付
+		// 第三方单号
+		order.setThirdPartyOrd(String.valueOf(IdGenarator.nextId()));
+		// 支付金额
+		order.setPrice(order.getPrice());
+		order.setPayPrice(order.getPrice());
+		// 退款金额
+		order.setRefundNo("0.00");
+		// 支付时间
+		order.setPayTime(new Date());
+		order.setOrdStatus("2");
+		order.setUpdateBy(UserUtils.getUser());
+		order.setUpdateDate(new Date());
+		order.setChangeBy(UserUtils.getUser().getId());
+
+
+		// 会员到期时间
+		order.setFinishTime(orderDto.getFinishTime());
+
+		// 创建订单
+		dao.insertNewOrder(order);
+
+
+		// 获取订单, 考虑多个订单相互覆盖用户权限标识的问题
+
+		order = getValidOrdersByUserCode(order.getOrderId());
+
+
+		// 更改用户会员标识
+		MdeUser user = mdeUserService.getByOrderId(order.getOrderId());
+		MdeUser u = new MdeUser();
+		u.setUserCode(user.getUserCode());
+		u.setVipFlag(order.getVipFlag());
+		u.setDueDate(order.getFinishTime());
+		u.setUpdateDate(new Date());
+		u.setUpdateBy(UserUtils.getUser());
+		u.setVersionNo(user.getVersionNo());
+		mdeUserService.updateVip(u);
+
+	}
 	
 	
 	

+ 144 - 130
src/main/java/com/thinkgem/jeesite/modules/recruitment/web/MdeJobFairController.java

@@ -3,38 +3,33 @@
  */
 package com.thinkgem.jeesite.modules.recruitment.web;
 
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
+import com.thinkgem.jeesite.common.config.Global;
+import com.thinkgem.jeesite.common.constant.Constant;
+import com.thinkgem.jeesite.common.persistence.Page;
+import com.thinkgem.jeesite.common.utils.StringUtils;
+import com.thinkgem.jeesite.common.web.BaseController;
+import com.thinkgem.jeesite.modules.recruitment.dto.SelectDto;
+import com.thinkgem.jeesite.modules.recruitment.entity.*;
+import com.thinkgem.jeesite.modules.recruitment.service.*;
 import org.apache.shiro.authz.annotation.RequiresPermissions;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
 import org.springframework.ui.Model;
 import org.springframework.web.bind.annotation.ModelAttribute;
-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.RequestParam;
 import org.springframework.web.bind.annotation.ResponseBody;
 import org.springframework.web.servlet.mvc.support.RedirectAttributes;
 
-import com.thinkgem.jeesite.common.config.Global;
-import com.thinkgem.jeesite.common.persistence.Page;
-import com.thinkgem.jeesite.common.web.BaseController;
-import com.thinkgem.jeesite.common.utils.StringUtils;
-import com.thinkgem.jeesite.modules.recruitment.entity.MdeFairDtl;
-import com.thinkgem.jeesite.modules.recruitment.entity.MdeJobAdvertised;
-import com.thinkgem.jeesite.modules.recruitment.entity.MdeJobFair;
-import com.thinkgem.jeesite.modules.recruitment.entity.MdeUser;
-import com.thinkgem.jeesite.modules.recruitment.service.MdeJobAdvertisedService;
-import com.thinkgem.jeesite.modules.recruitment.service.MdeJobFairService;
-import com.thinkgem.jeesite.modules.recruitment.service.MdeUserService;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.stream.Collectors;
 
 /**
  * 主子表生成Controller
+ *
  * @author jadyn
  * @version 2020-05-25
  */
@@ -42,116 +37,135 @@ import com.thinkgem.jeesite.modules.recruitment.service.MdeUserService;
 @RequestMapping(value = "${adminPath}/recruitment/mdeJobFair")
 public class MdeJobFairController extends BaseController {
 
-	@Autowired
-	private MdeJobFairService mdeJobFairService;
-	
-	@Autowired
-	private MdeUserService mdeUserService;
-	
-	@Autowired
-	private MdeJobAdvertisedService mdeJobAdvertisedService;
-	
-	@ModelAttribute
-	public MdeJobFair get(@RequestParam(required=false) String id,@RequestParam(required=false) String fairType) {
-		MdeJobFair entity = null;
-		if (StringUtils.isNotBlank(id)){
-			entity = mdeJobFairService.get(id);
-		} 
-		if (entity == null){
-			entity = new MdeJobFair();
-		}
-		if(StringUtils.isNotBlank(fairType))
-		{
-			entity.setFairType(fairType);
-		}
-		return entity;
-	}
-	
-	@RequiresPermissions("recruitment:mdeJobFair:view")
-	@RequestMapping(value = {"list", ""})
-	public String list(MdeJobFair mdeJobFair, HttpServletRequest request, HttpServletResponse response, Model model) {
-		Page<MdeJobFair> page = mdeJobFairService.findPage(new Page<MdeJobFair>(request, response), mdeJobFair); 
-		model.addAttribute("page", page);
-		return "modules/recruitment/mdeJobFairList";
-	}
-
-	@RequiresPermissions("recruitment:mdeJobFair:view")
-	@RequestMapping(value = "form")
-	public String form(MdeJobFair mdeJobFair, Model model) {
-		String fairId = mdeJobFair.getFairId();
-		List<MdeFairDtl> fairDtlList = new ArrayList<MdeFairDtl>();
-		if (StringUtils.isNotBlank(fairId))
-		{
-			fairDtlList=mdeJobFairService.getFairDtl(fairId,mdeJobFair.getFairType());
-		}
-		if("2".equals(mdeJobFair.getFairType())) {
-			//以工作为单位的情况
-			model.addAttribute("jobList", null);
-		}
-		mdeJobFair.setMdeFairDtlList(fairDtlList);
-		model.addAttribute("mdeJobFair", mdeJobFair);
-		model.addAttribute("userList", getUserList(""));
-		
-		return "modules/recruitment/mdeJobFairForm";
-	}
-	
-
-	@RequiresPermissions("recruitment:mdeJobFair:edit")
-	@RequestMapping(value = "save")
-	public String save(MdeJobFair mdeJobFair, Model model, RedirectAttributes redirectAttributes) {
-		if (!beanValidator(model, mdeJobFair)){
-			return form(mdeJobFair, model);
-		}
-		mdeJobFairService.save(mdeJobFair);
-		addMessage(redirectAttributes, "保存主子表成功");
-		return "redirect:"+Global.getAdminPath()+"/recruitment/mdeJobFair/?repage";
-	}
-	
-	@RequiresPermissions("recruitment:mdeJobFair:edit")
-	@RequestMapping(value = "delete")
-	public String delete(MdeJobFair mdeJobFair, RedirectAttributes redirectAttributes) {
-		mdeJobFairService.delete(mdeJobFair);
-		addMessage(redirectAttributes, "删除主子表成功");
-		return "redirect:"+Global.getAdminPath()+"/recruitment/mdeJobFair/?repage";
-	}
-	
-	/**
-	 * 获取企业用户列表
-	 * @param redirectAttributes
-	 * @return
-	 */
-	@RequestMapping(value = "getUserList")
-	@ResponseBody
-	public List<MdeUser> getUserList(@RequestParam String name) {
-		List<MdeUser> userList = new ArrayList<MdeUser>();
-		MdeUser mdeUser = new MdeUser();
-		mdeUser.setIdentityFlag("1");
-		if(!StringUtils.isEmpty(name)) {
-			//获取用户列表
-			mdeUser.setName(name.trim());
-		}
-		userList = mdeUserService.findList(mdeUser);
-		return userList;
-	}
-	
-	/**
-	 * 获取企业发布中职位列表
-	 * @param redirectAttributes
-	 * @return
-	 */
-	@RequestMapping(value = "getJobList")
-	@ResponseBody
-	public List<MdeJobAdvertised> getJobList(@RequestParam String userCode) {
-		List<MdeJobAdvertised> jobList = new ArrayList<MdeJobAdvertised>();
-		MdeJobAdvertised entity = new MdeJobAdvertised();
-		//招聘中的
-		entity.setJobStatus("0");
-		if(!StringUtils.isEmpty(userCode)) {
-			//获取用户列表
-			entity.setPublisher(userCode);
-			jobList = mdeJobAdvertisedService.findList(entity);
-		}
-		return jobList;
-	}
+    @Autowired
+    private MdeJobFairService mdeJobFairService;
+
+    @Autowired
+    private MdeUserService mdeUserService;
+
+    @Autowired
+    private MdeJobAdvertisedService mdeJobAdvertisedService;
+
+    @Autowired
+    private MdeVipPackageService mdeVipPackageService;
+
+    @Autowired
+    private MdeVipPackagePriceService vipPackagePriceService;
+
+
+    @ModelAttribute
+    public MdeJobFair get(@RequestParam(required = false) String id, @RequestParam(required = false) String fairType) {
+        MdeJobFair entity = null;
+        if (StringUtils.isNotBlank(id)) {
+            entity = mdeJobFairService.get(id);
+        }
+        if (entity == null) {
+            entity = new MdeJobFair();
+        }
+        if (StringUtils.isNotBlank(fairType)) {
+            entity.setFairType(fairType);
+        }
+        return entity;
+    }
+
+    @RequiresPermissions("recruitment:mdeJobFair:view")
+    @RequestMapping(value = {"list", ""})
+    public String list(MdeJobFair mdeJobFair, HttpServletRequest request, HttpServletResponse response, Model model) {
+        Page<MdeJobFair> page = mdeJobFairService.findPage(new Page<MdeJobFair>(request, response), mdeJobFair);
+        model.addAttribute("page", page);
+        return "modules/recruitment/mdeJobFairList";
+    }
+
+    @RequiresPermissions("recruitment:mdeJobFair:view")
+    @RequestMapping(value = "form")
+    public String form(MdeJobFair mdeJobFair, Model model) {
+        String fairId = mdeJobFair.getFairId();
+        List<MdeFairDtl> fairDtlList = new ArrayList<MdeFairDtl>();
+        //获取在售套餐列表
+        List<SelectDto> vipPkgsList = mdeVipPackageService.getOnsalePkgListByType(Constant.PKG_TYPE_ENTERPRISE);
+        model.addAttribute("vipPkgsList", vipPkgsList);
+        if (StringUtils.isNotBlank(fairId)) {
+            fairDtlList = mdeJobFairService.getFairDtl(fairId, mdeJobFair.getFairType());
+
+            if (StringUtils.isNotBlank(mdeJobFair.getPkgId())) {
+                //获取套餐价格列表
+                List<MdeVipPackagePrice> vipPkgPriceList = vipPackagePriceService.findListById(mdeJobFair.getPkgId());
+                for (MdeVipPackagePrice pkg : vipPkgPriceList) {
+                    pkg.setPkgTitle(pkg.getSkuCn() + " " + pkg.getPrice());
+                }
+                model.addAttribute("vipPkgPriceList", vipPkgPriceList);
+            }
+        }
+        if ("2".equals(mdeJobFair.getFairType())) {
+            //以工作为单位的情况
+            model.addAttribute("jobList", null);
+        }
+        mdeJobFair.setMdeFairDtlList(fairDtlList);
+        model.addAttribute("mdeJobFair", mdeJobFair);
+        model.addAttribute("userList", getUserList(""));
+
+        return "modules/recruitment/mdeJobFairForm";
+    }
+
+
+    @RequiresPermissions("recruitment:mdeJobFair:edit")
+    @RequestMapping(value = "save")
+    public String save(MdeJobFair mdeJobFair, Model model, RedirectAttributes redirectAttributes) {
+        if (!beanValidator(model, mdeJobFair)) {
+            return form(mdeJobFair, model);
+        }
+        mdeJobFairService.save(mdeJobFair);
+        addMessage(redirectAttributes, "保存主子表成功");
+        return "redirect:" + Global.getAdminPath() + "/recruitment/mdeJobFair/?repage";
+    }
+
+    @RequiresPermissions("recruitment:mdeJobFair:edit")
+    @RequestMapping(value = "delete")
+    public String delete(MdeJobFair mdeJobFair, RedirectAttributes redirectAttributes) {
+        mdeJobFairService.delete(mdeJobFair);
+        addMessage(redirectAttributes, "删除主子表成功");
+        return "redirect:" + Global.getAdminPath() + "/recruitment/mdeJobFair/?repage";
+    }
+
+    /**
+     * 获取企业用户列表
+     *
+     * @param redirectAttributes
+     * @return
+     */
+    @RequestMapping(value = "getUserList")
+    @ResponseBody
+    public List<MdeUser> getUserList(@RequestParam String name) {
+        List<MdeUser> userList = new ArrayList<MdeUser>();
+        MdeUser mdeUser = new MdeUser();
+        mdeUser.setIdentityFlag("1");
+        if (!StringUtils.isEmpty(name)) {
+            //获取用户列表
+            mdeUser.setName(name.trim());
+        }
+        userList = mdeUserService.findList(mdeUser);
+        return userList;
+    }
+
+    /**
+     * 获取企业发布中职位列表
+     *
+     * @param redirectAttributes
+     * @return
+     */
+    @RequestMapping(value = "getJobList")
+    @ResponseBody
+    public List<MdeJobAdvertised> getJobList(@RequestParam String userCode) {
+        List<MdeJobAdvertised> jobList = new ArrayList<MdeJobAdvertised>();
+        MdeJobAdvertised entity = new MdeJobAdvertised();
+        //招聘中的
+        entity.setJobStatus("0");
+        if (!StringUtils.isEmpty(userCode)) {
+            //获取用户列表
+            entity.setPublisher(userCode);
+            jobList = mdeJobAdvertisedService.findList(entity);
+        }
+        return jobList;
+    }
 
 }

+ 2 - 0
src/main/java/com/thinkgem/jeesite/modules/recruitment/web/MdeOrdersController.java

@@ -161,6 +161,8 @@ public class MdeOrdersController extends BaseController {
 			}
 			order.setFinishTime(finishTime);
 			ordersService.update(order);// 更新订单状态
+			// 根据 订单id找到用户id,根据用户id查询当前用户的所有已支付的订单,然后排序取到期时间最长的那一条
+			// 会出现新的数据到期时间没有旧的数据到期时间长,就依然赋值旧数据的vipFlag
 			order = ordersService.getValidOrdersByUserCode(mdeOrders.getOrderId());
 			MdeUser user = mdeUserService.getByOrderId(mdeOrders.getOrderId());
 			MdeUser u = new MdeUser();

+ 1 - 1
src/main/resources/jeesite.properties

@@ -4,7 +4,7 @@
 
 
 jdbc.type=mysql
-jdbc.driver=com.mysql.cj.jdbc.Driver
+jdbc.driver=com.mysql.jdbc.Driver
 #jdbc.url=jdbc:mysql://192.168.31.178:3306/recruitments?useUnicode=true&characterEncoding=utf-8
 #jdbc.url=jdbc:mysql://7.161.62.249:3306/recruitments?useUnicode=true&characterEncoding=utf-8
 jdbc.url=jdbc:mysql://192.168.3.180:3306/recruitments?useUnicode=true&characterEncoding=utf-8

+ 17 - 12
src/main/resources/mappings/modules/recruitment/MdeFairDtlDao.xml

@@ -13,7 +13,8 @@
 		a.update_by AS "updateBy.id",
 		a.update_date AS "updateDate",
 		a.remarks AS "remarks",
-		a.del_flag AS "delFlag"
+		a.del_flag AS "delFlag",
+		a.authorize_flag AS "authorizeFlag"
 	</sql>
 	
 	<resultMap type="com.thinkgem.jeesite.modules.recruitment.entity.MdeFairDtl" id="fairDtlJob">
@@ -69,6 +70,7 @@
 		SELECT 
 			<include refid="mdeFairDtlColumns"/>
 			,u.user_code as hotelId
+			,u.VIP_FLAG as vipFlag
 		FROM mde_fair_dtl a
 		inner join mde_user u on a.dtl_id = u.user_code
 		<where>
@@ -121,7 +123,8 @@
 			update_by,
 			update_date,
 			remarks,
-			del_flag
+			del_flag,
+		    authorize_flag
 		) VALUES (
 			#{fairId},
 			#{dtlId},
@@ -134,20 +137,22 @@
 			#{updateBy.id},
 			#{updateDate},
 			#{remarks},
-			#{delFlag}
+			#{delFlag},
+			#{authorizeFlag}
 		)
 	</insert>
 	
 	<update id="update">
-		UPDATE mde_fair_dtl SET 	
-			fair_id = #{fairId},
-			dtl_id = #{dtlId},
-			version_no = #{versionNo},
-			update_by = #{updateBy.id},
-			update_date = #{updateDate},
-			remarks = #{remarks}
-		WHERE id = #{id}
-	</update>
+        UPDATE mde_fair_dtl
+        SET fair_id        = #{fairId},
+            dtl_id         = #{dtlId},
+            version_no     = #{versionNo},
+            update_by      = #{updateBy.id},
+            update_date    = #{updateDate},
+            remarks        = #{remarks},
+            authorize_flag =#{authorizeFlag}
+        WHERE id = #{id}
+    </update>
 	
 	<update id="delete">
 		UPDATE mde_fair_dtl SET 

+ 37 - 30
src/main/resources/mappings/modules/recruitment/MdeJobFairDao.xml

@@ -25,7 +25,9 @@
 		a.update_by AS "updateBy.id",
 		a.update_date AS "updateDate",
 		a.remarks AS "remarks",
-		a.del_flag AS "delFlag"
+		a.del_flag AS "delFlag",
+		a.pkg_id AS "pkgId",
+		a.price_id AS "priceId"
 	</sql>
 	
 	<sql id="mdeJobFairJoins">
@@ -114,7 +116,9 @@
 			create_date,
 			update_by,
 			update_date,
-			remarks
+			remarks,
+			pkg_id,
+			price_id
 		) VALUES (
 			#{fairTitle},
 			#{fairSlogan},
@@ -135,38 +139,41 @@
 			#{createDate},
 			#{updateBy.id},
 			#{updateDate},
-			#{remarks}
+			#{remarks},
+			#{pkgId},
+			#{priceId}
 		)
 	</insert>
 	
 	<update id="update">
-		UPDATE mde_job_fair SET 	
-			fair_title = #{fairTitle},
-			fair_slogan = #{fairSlogan},
-			fair_type = #{fairType},
-			head_img = #{headImg},
-			background_img = #{backgroundImg},
-			BOTTOM_IMG = #{bottomImg},
-			pc_head_img = #{pcHeadImg},
-			pc_background_img = #{pcBackgroundImg},
-			pc_BOTTOM_IMG = #{pcBottomImg},
-			INSIDE_COLOUR = #{insideColour},
-			JOB_COLOUR = #{jobColour},
-			background_colour = #{backgroundColour},
-			share_img = #{shareImg},
-			start_date = #{startDate},
-			stop_date = #{stopDate},
-			version_no = #{versionNo},
-			update_by = #{updateBy.id},
-			update_date = #{updateDate},
-			remarks = #{remarks},
-			version_no = version_no+1 
-    	WHERE fair_id = #{fairId}
-    	<if test="versionNo!=null">
-    		and version_no = #{versionNo}
-    	</if>
-
-	</update>
+        UPDATE mde_job_fair SET
+        fair_title = #{fairTitle},
+        fair_slogan = #{fairSlogan},
+        fair_type = #{fairType},
+        head_img = #{headImg},
+        background_img = #{backgroundImg},
+        BOTTOM_IMG = #{bottomImg},
+        pc_head_img = #{pcHeadImg},
+        pc_background_img = #{pcBackgroundImg},
+        pc_BOTTOM_IMG = #{pcBottomImg},
+        INSIDE_COLOUR = #{insideColour},
+        JOB_COLOUR = #{jobColour},
+        background_colour = #{backgroundColour},
+        share_img = #{shareImg},
+        start_date = #{startDate},
+        stop_date = #{stopDate},
+        version_no = #{versionNo},
+        update_by = #{updateBy.id},
+        update_date = #{updateDate},
+        remarks = #{remarks},
+        pkg_id =#{pkgId},
+        price_id=#{priceId},
+        version_no = version_no+1
+        WHERE fair_id = #{fairId}
+        <if test="versionNo!=null">
+            and version_no = #{versionNo}
+        </if>
+    </update>
 	
 	<update id="delete">
 		UPDATE mde_job_fair SET 

+ 404 - 382
src/main/resources/mappings/modules/recruitment/MdeOrdersDao.xml

@@ -70,7 +70,7 @@
 			a.user_id = (select user_id from mde_orders where order_id = #{orderId})
 			AND a.ord_status = '2' AND a.del_flag = 0 
 		ORDER BY
-			unix_timestamp( a.finish_time ) DESC 
+			 a.finish_time  DESC
 			LIMIT 1 
 	</select>
 	<select id="getValidOrdersListByUserCode" resultType="MdeOrders">
@@ -82,7 +82,7 @@
 			a.user_id = (select user_id from mde_orders where order_id = #{orderId})
 			AND a.ord_status = '2' AND a.del_flag = 0 
 		ORDER BY
-			unix_timestamp( a.finish_time ) DESC 
+			a.finish_time  DESC
 	</select>
 	<select id="findList" resultType="MdeOrders">
 		SELECT 
@@ -172,386 +172,408 @@
 	</select>
 	
 	<insert id="insertNewOrder" >
-    insert into mde_orders
-    <trim prefix="(" suffix=")" suffixOverrides=",">
-      <if test="orderId != null">
-        ORDER_ID,
-      </if>
-      <if test="userId != null">
-        USER_ID,
-      </if>
-      <if test="payType != null">
-        PAY_TYPE,
-      </if>
-      <if test="orderSource != null">
-        ORDER_SOURCE,
-      </if>
-      <if test="thirdPartyOrd != null">
-        THIRD_PARTY_ORD,
-      </if>
-      <if test="pkgId != null">
-        PKG_ID,
-      </if>
-      <if test="goodsId != null">
-        GOODS_ID,
-      </if>
-      <if test="img != null">
-        IMG,
-      </if>
-      <if test="pkgTitle != null">
-        PKG_TITLE,
-      </if>
-      <if test="pkgTitleEn != null">
-        PKG_TITLE_EN,
-      </if>
-      <if test="pkgIntroduction != null">
-        PKG_INTRODUCTION,
-      </if>
-      <if test="vipFlag != null">
-        VIP_FLAG,
-      </if>
-      <if test="validityPeriod != null">
-        VALIDITY_PERIOD,
-      </if>
-      <if test="skuEn != null">
-        SKU_EN,
-      </if>
-      <if test="skuCn != null">
-        SKU_CN,
-      </if>
-      <if test="price != null">
-        PRICE,
-      </if>
-      <if test="payableMoney != null">
-        PAYABLE_MONEY,
-      </if>
-      <if test="payableFreight != null">
-        PAYABLE_FREIGHT,
-      </if>
-      <if test="realFreight != null">
-        REAL_FREIGHT,
-      </if>
-      <if test="goodsNo != null">
-        GOODS_NO,
-      </if>
-      <if test="goodsNums != null">
-        GOODS_NUMS,
-      </if>
-      <if test="goodsWeight != null">
-        GOODS_WEIGHT,
-      </if>
-      <if test="discountMoney != null">
-        DISCOUNT_MONEY,
-      </if>
-      <if test="tcCode != null">
-        TC_CODE,
-      </if>
-      <if test="tdCode != null">
-        TD_CODE,
-      </if>
-      <if test="orderTime != null">
-        ORDER_TIME,
-      </if>
-      <if test="payTime != null">
-        PAY_TIME,
-      </if>
-      <if test="sendTime != null">
-        SEND_TIME,
-      </if>
-      <if test="invTitle != null">
-        INV_TITLE,
-      </if>
-      <if test="taxationNo != null">
-        TAXATION_NO,
-      </if>
-      <if test="ltdAdd != null">
-        LTD_ADD,
-      </if>
-      <if test="ltdTel != null">
-        LTD_TEL,
-      </if>
-      <if test="openingBank != null">
-        OPENING_BANK,
-      </if>
-      <if test="accountNumber != null">
-        ACCOUNT_NUMBER,
-      </if>
-      <if test="invContent != null">
-        INV_CONTENT,
-      </if>
-      <if test="invMoney != null">
-        INV_MONEY,
-      </if>
-      <if test="recipientName != null">
-        RECIPIENT_NAME,
-      </if>
-      <if test="recipientTel != null">
-        RECIPIENT_TEL,
-      </if>
-      <if test="recipientAdd != null">
-        RECIPIENT_ADD,
-      </if>
-      <if test="addId != null">
-        ADD_ID,
-      </if>
-      <if test="addrProvince != null">
-        ADDR_PROVINCE,
-      </if>
-      <if test="addrCity != null">
-        ADDR_CITY,
-      </if>
-      <if test="addrArea != null">
-        ADDR_AREA,
-      </if>
-      <if test="postcode != null">
-        POSTCODE,
-      </if>
-      <if test="invType != null">
-        INV_TYPE,
-      </if>
-      <if test="expressName != null">
-        EXPRESS_NAME,
-      </if>
-      <if test="expressNo != null">
-        EXPRESS_NO,
-      </if>
-      <if test="ordStatus != null">
-        ORD_STATUS,
-      </if>
-      <if test="distributionStatus != null">
-        DISTRIBUTION_STATUS,
-      </if>
-      <if test="point != null">
-        POINT,
-      </if>
-      <if test="type != null">
-        TYPE,
-      </if>
-      <if test="postscript != null">
-        POSTSCRIPT,
-      </if>
-      <if test="changeBy != null">
-        CHANGE_BY,
-      </if>
-      <if test="remarks != null">
-        REMARKS,
-      </if>
-      <if test="userDel != null">
-        USER_DEL,
-      </if>
-      <if test="createBy.id!=null">		create_by,         </if>
-	  <if test="createDate!=null">		create_date,       </if>
-	  <if test="updateBy.id!=null">		update_by,         </if>
-	  <if test="updateDate!=null">		update_date,        </if>
-      <if test="finishTime != null">
-        FINISH_TIME,
-      </if>
-      <if test="subheadCn != null">
-        SUBHEAD_CN,
-      </if>
-      <if test="subheadEn != null">
-        SUBHEAD_EN,
-      </if>
-      <if test="pkgIntroductionEn != null">
-        PKG_INTRODUCTION_EN,
-      </if>
-      <if test="pkgDetail != null">
-        PKG_DETAIL,
-      </if>
-      <if test="pkgDetailEn != null">
-        PKG_DETAIL_EN,
-      </if>
-    </trim>
-    <trim prefix="values (" suffix=")" suffixOverrides=",">
-      <if test="orderId != null">
-        #{orderId},
-      </if>
-      <if test="userId != null">
-        #{userId},
-      </if>
-      <if test="payType != null">
-        #{payType},
-      </if>
-      <if test="orderSource != null">
-        #{orderSource},
-      </if>
-      <if test="thirdPartyOrd != null">
-        #{thirdPartyOrd},
-      </if>
-      <if test="pkgId != null">
-        #{pkgId},
-      </if>
-      <if test="goodsId != null">
-        #{goodsId},
-      </if>
-      <if test="img != null">
-        #{img},
-      </if>
-      <if test="pkgTitle != null">
-        #{pkgTitle},
-      </if>
-      <if test="pkgTitleEn != null">
-        #{pkgTitleEn},
-      </if>
-      <if test="pkgIntroduction != null">
-        #{pkgIntroduction},
-      </if>
-      <if test="vipFlag != null">
-        #{vipFlag},
-      </if>
-      <if test="validityPeriod != null">
-        #{validityPeriod},
-      </if>
-      <if test="skuEn != null">
-        #{skuEn},
-      </if>
-      <if test="skuCn != null">
-        #{skuCn},
-      </if>
-      <if test="price != null">
-        #{price},
-      </if>
-      <if test="payableMoney != null">
-        #{payableMoney},
-      </if>
-      <if test="payableFreight != null">
-        #{payableFreight},
-      </if>
-      <if test="realFreight != null">
-        #{realFreight},
-      </if>
-      <if test="goodsNo != null">
-        #{goodsNo},
-      </if>
-      <if test="goodsNums != null">
-        #{goodsNums},
-      </if>
-      <if test="goodsWeight != null">
-        #{goodsWeight},
-      </if>
-      <if test="discountMoney != null">
-        #{discountMoney},
-      </if>
-      <if test="tcCode != null">
-        #{tcCode},
-      </if>
-      <if test="tdCode != null">
-        #{tdCode},
-      </if>
-      <if test="orderTime != null">
-        #{orderTime},
-      </if>
-      <if test="payTime != null">
-        #{payTime},
-      </if>
-      <if test="sendTime != null">
-        #{sendTime},
-      </if>
-      <if test="invTitle != null">
-        #{invTitle},
-      </if>
-      <if test="taxationNo != null">
-        #{taxationNo},
-      </if>
-      <if test="ltdAdd != null">
-        #{ltdAdd},
-      </if>
-      <if test="ltdTel != null">
-        #{ltdTel},
-      </if>
-      <if test="openingBank != null">
-        #{openingBank},
-      </if>
-      <if test="accountNumber != null">
-        #{accountNumber},
-      </if>
-      <if test="invContent != null">
-        #{invContent},
-      </if>
-      <if test="invMoney != null">
-        #{invMoney},
-      </if>
-      <if test="recipientName != null">
-        #{recipientName},
-      </if>
-      <if test="recipientTel != null">
-        #{recipientTel},
-      </if>
-      <if test="recipientAdd != null">
-        #{recipientAdd},
-      </if>
-      <if test="addId != null">
-        #{addId},
-      </if>
-      <if test="addrProvince != null">
-        #{addrProvince},
-      </if>
-      <if test="addrCity != null">
-        #{addrCity},
-      </if>
-      <if test="addrArea != null">
-        #{addrArea},
-      </if>
-      <if test="postcode != null">
-        #{postcode},
-      </if>
-      <if test="invType != null">
-        #{invType},
-      </if>
-      <if test="expressName != null">
-        #{expressName},
-      </if>
-      <if test="expressNo != null">
-        #{expressNo},
-      </if>
-      <if test="ordStatus != null">
-        #{ordStatus},
-      </if>
-      <if test="distributionStatus != null">
-        #{distributionStatus},
-      </if>
-      <if test="point != null">
-        #{point},
-      </if>
-      <if test="type != null">
-        #{type},
-      </if>
-      <if test="postscript != null">
-        #{postscript},
-      </if>
-      <if test="changeBy != null">
-        #{changeBy},
-      </if>
-      <if test="remarks != null">
-        #{remarks},
-      </if>
-      <if test="userDel != null">
-        #{userDel},
-      </if>
-      <if test="createBy.id!=null">		#{createBy.id},     </if>
-	  <if test="createDate!=null">		#{createDate},      </if>
-	  <if test="updateBy.id!=null">		#{updateBy.id},     </if>
-	  <if test="updateDate!=null">		#{updateDate},       </if>
-      <if test="finishTime != null">
-        #{finishTime,jdbcType=TIMESTAMP},
-      </if>
-      <if test="subheadCn != null">
-        #{subheadCn,jdbcType=VARCHAR},
-      </if>
-      <if test="subheadEn != null">
-        #{subheadEn,jdbcType=VARCHAR},
-      </if>
-      <if test="pkgIntroductionEn != null">
-        #{pkgIntroductionEn},
-      </if>
-      <if test="pkgDetail != null">
-        #{pkgDetail},
-      </if>
-      <if test="pkgDetailEn != null">
-        #{pkgDetailEn},
-      </if>
-    </trim>
-  </insert>
+        insert into mde_orders
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="orderId != null">
+                ORDER_ID,
+            </if>
+            <if test="userId != null">
+                USER_ID,
+            </if>
+            <if test="payType != null">
+                PAY_TYPE,
+            </if>
+            <if test="orderSource != null">
+                ORDER_SOURCE,
+            </if>
+            <if test="thirdPartyOrd != null">
+                THIRD_PARTY_ORD,
+            </if>
+            <if test="pkgId != null">
+                PKG_ID,
+            </if>
+            <if test="goodsId != null">
+                GOODS_ID,
+            </if>
+            <if test="img != null">
+                IMG,
+            </if>
+            <if test="pkgTitle != null">
+                PKG_TITLE,
+            </if>
+            <if test="pkgTitleEn != null">
+                PKG_TITLE_EN,
+            </if>
+            <if test="pkgIntroduction != null">
+                PKG_INTRODUCTION,
+            </if>
+            <if test="vipFlag != null">
+                VIP_FLAG,
+            </if>
+            <if test="validityPeriod != null">
+                VALIDITY_PERIOD,
+            </if>
+            <if test="skuEn != null">
+                SKU_EN,
+            </if>
+            <if test="skuCn != null">
+                SKU_CN,
+            </if>
+            <if test="price != null">
+                PRICE,
+            </if>
+            <if test="payPrice != null">
+                PAY_PRICE,
+            </if>
+            <if test="payableMoney != null">
+                PAYABLE_MONEY,
+            </if>
+            <if test="payableFreight != null">
+                PAYABLE_FREIGHT,
+            </if>
+            <if test="realFreight != null">
+                REAL_FREIGHT,
+            </if>
+            <if test="goodsNo != null">
+                GOODS_NO,
+            </if>
+            <if test="goodsNums != null">
+                GOODS_NUMS,
+            </if>
+            <if test="goodsWeight != null">
+                GOODS_WEIGHT,
+            </if>
+            <if test="discountMoney != null">
+                DISCOUNT_MONEY,
+            </if>
+            <if test="tcCode != null">
+                TC_CODE,
+            </if>
+            <if test="tdCode != null">
+                TD_CODE,
+            </if>
+            <if test="orderTime != null">
+                ORDER_TIME,
+            </if>
+            <if test="payTime != null">
+                PAY_TIME,
+            </if>
+            <if test="sendTime != null">
+                SEND_TIME,
+            </if>
+            <if test="invTitle != null">
+                INV_TITLE,
+            </if>
+            <if test="taxationNo != null">
+                TAXATION_NO,
+            </if>
+            <if test="ltdAdd != null">
+                LTD_ADD,
+            </if>
+            <if test="ltdTel != null">
+                LTD_TEL,
+            </if>
+            <if test="openingBank != null">
+                OPENING_BANK,
+            </if>
+            <if test="accountNumber != null">
+                ACCOUNT_NUMBER,
+            </if>
+            <if test="invContent != null">
+                INV_CONTENT,
+            </if>
+            <if test="invMoney != null">
+                INV_MONEY,
+            </if>
+            <if test="recipientName != null">
+                RECIPIENT_NAME,
+            </if>
+            <if test="recipientTel != null">
+                RECIPIENT_TEL,
+            </if>
+            <if test="recipientAdd != null">
+                RECIPIENT_ADD,
+            </if>
+            <if test="addId != null">
+                ADD_ID,
+            </if>
+            <if test="addrProvince != null">
+                ADDR_PROVINCE,
+            </if>
+            <if test="addrCity != null">
+                ADDR_CITY,
+            </if>
+            <if test="addrArea != null">
+                ADDR_AREA,
+            </if>
+            <if test="postcode != null">
+                POSTCODE,
+            </if>
+            <if test="invType != null">
+                INV_TYPE,
+            </if>
+            <if test="expressName != null">
+                EXPRESS_NAME,
+            </if>
+            <if test="expressNo != null">
+                EXPRESS_NO,
+            </if>
+            <if test="ordStatus != null">
+                ORD_STATUS,
+            </if>
+            <if test="distributionStatus != null">
+                DISTRIBUTION_STATUS,
+            </if>
+            <if test="point != null">
+                POINT,
+            </if>
+            <if test="type != null">
+                TYPE,
+            </if>
+            <if test="postscript != null">
+                POSTSCRIPT,
+            </if>
+            <if test="changeBy != null">
+                CHANGE_BY,
+            </if>
+            <if test="remarks != null">
+                REMARKS,
+            </if>
+            <if test="userDel != null">
+                USER_DEL,
+            </if>
+            <if test="createBy.id!=null">
+                create_by,
+            </if>
+            <if test="createDate!=null">
+                create_date,
+            </if>
+            <if test="updateBy.id!=null">
+                update_by,
+            </if>
+            <if test="updateDate!=null">
+                update_date,
+            </if>
+            <if test="finishTime != null">
+                FINISH_TIME,
+            </if>
+            <if test="subheadCn != null">
+                SUBHEAD_CN,
+            </if>
+            <if test="subheadEn != null">
+                SUBHEAD_EN,
+            </if>
+            <if test="pkgIntroductionEn != null">
+                PKG_INTRODUCTION_EN,
+            </if>
+            <if test="pkgDetail != null">
+                PKG_DETAIL,
+            </if>
+            <if test="pkgDetailEn != null">
+                PKG_DETAIL_EN,
+            </if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="orderId != null">
+                #{orderId},
+            </if>
+            <if test="userId != null">
+                #{userId},
+            </if>
+            <if test="payType != null">
+                #{payType},
+            </if>
+            <if test="orderSource != null">
+                #{orderSource},
+            </if>
+            <if test="thirdPartyOrd != null">
+                #{thirdPartyOrd},
+            </if>
+            <if test="pkgId != null">
+                #{pkgId},
+            </if>
+            <if test="goodsId != null">
+                #{goodsId},
+            </if>
+            <if test="img != null">
+                #{img},
+            </if>
+            <if test="pkgTitle != null">
+                #{pkgTitle},
+            </if>
+            <if test="pkgTitleEn != null">
+                #{pkgTitleEn},
+            </if>
+            <if test="pkgIntroduction != null">
+                #{pkgIntroduction},
+            </if>
+            <if test="vipFlag != null">
+                #{vipFlag},
+            </if>
+            <if test="validityPeriod != null">
+                #{validityPeriod},
+            </if>
+            <if test="skuEn != null">
+                #{skuEn},
+            </if>
+            <if test="skuCn != null">
+                #{skuCn},
+            </if>
+            <if test="price != null">
+                #{price},
+            </if>
+            <if test="payPrice != null">
+                #{payPrice},
+            </if>
+            <if test="payableMoney != null">
+                #{payableMoney},
+            </if>
+            <if test="payableFreight != null">
+                #{payableFreight},
+            </if>
+            <if test="realFreight != null">
+                #{realFreight},
+            </if>
+            <if test="goodsNo != null">
+                #{goodsNo},
+            </if>
+            <if test="goodsNums != null">
+                #{goodsNums},
+            </if>
+            <if test="goodsWeight != null">
+                #{goodsWeight},
+            </if>
+            <if test="discountMoney != null">
+                #{discountMoney},
+            </if>
+            <if test="tcCode != null">
+                #{tcCode},
+            </if>
+            <if test="tdCode != null">
+                #{tdCode},
+            </if>
+            <if test="orderTime != null">
+                #{orderTime},
+            </if>
+            <if test="payTime != null">
+                #{payTime},
+            </if>
+            <if test="sendTime != null">
+                #{sendTime},
+            </if>
+            <if test="invTitle != null">
+                #{invTitle},
+            </if>
+            <if test="taxationNo != null">
+                #{taxationNo},
+            </if>
+            <if test="ltdAdd != null">
+                #{ltdAdd},
+            </if>
+            <if test="ltdTel != null">
+                #{ltdTel},
+            </if>
+            <if test="openingBank != null">
+                #{openingBank},
+            </if>
+            <if test="accountNumber != null">
+                #{accountNumber},
+            </if>
+            <if test="invContent != null">
+                #{invContent},
+            </if>
+            <if test="invMoney != null">
+                #{invMoney},
+            </if>
+            <if test="recipientName != null">
+                #{recipientName},
+            </if>
+            <if test="recipientTel != null">
+                #{recipientTel},
+            </if>
+            <if test="recipientAdd != null">
+                #{recipientAdd},
+            </if>
+            <if test="addId != null">
+                #{addId},
+            </if>
+            <if test="addrProvince != null">
+                #{addrProvince},
+            </if>
+            <if test="addrCity != null">
+                #{addrCity},
+            </if>
+            <if test="addrArea != null">
+                #{addrArea},
+            </if>
+            <if test="postcode != null">
+                #{postcode},
+            </if>
+            <if test="invType != null">
+                #{invType},
+            </if>
+            <if test="expressName != null">
+                #{expressName},
+            </if>
+            <if test="expressNo != null">
+                #{expressNo},
+            </if>
+            <if test="ordStatus != null">
+                #{ordStatus},
+            </if>
+            <if test="distributionStatus != null">
+                #{distributionStatus},
+            </if>
+            <if test="point != null">
+                #{point},
+            </if>
+            <if test="type != null">
+                #{type},
+            </if>
+            <if test="postscript != null">
+                #{postscript},
+            </if>
+            <if test="changeBy != null">
+                #{changeBy},
+            </if>
+            <if test="remarks != null">
+                #{remarks},
+            </if>
+            <if test="userDel != null">
+                #{userDel},
+            </if>
+            <if test="createBy.id!=null">
+                #{createBy.id},
+            </if>
+            <if test="createDate!=null">
+                #{createDate},
+            </if>
+            <if test="updateBy.id!=null">
+                #{updateBy.id},
+            </if>
+            <if test="updateDate!=null">
+                #{updateDate},
+            </if>
+            <if test="finishTime != null">
+                #{finishTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="subheadCn != null">
+                #{subheadCn,jdbcType=VARCHAR},
+            </if>
+            <if test="subheadEn != null">
+                #{subheadEn,jdbcType=VARCHAR},
+            </if>
+            <if test="pkgIntroductionEn != null">
+                #{pkgIntroductionEn},
+            </if>
+            <if test="pkgDetail != null">
+                #{pkgDetail},
+            </if>
+            <if test="pkgDetailEn != null">
+                #{pkgDetailEn},
+            </if>
+        </trim>
+    </insert>
 	
 	<update id="update">
 		UPDATE mde_orders SET 	

+ 531 - 327
src/main/webapp/WEB-INF/views/modules/recruitment/mdeJobFairForm.jsp

@@ -1,326 +1,525 @@
 <%@ page contentType="text/html;charset=UTF-8" %>
-<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
+<%@ include file="/WEB-INF/views/include/taglib.jsp" %>
 <html>
 <head>
-	<title>主子表管理</title>
-	<meta name="decorator" content="default"/>
-	<script type="text/javascript">
-		$(document).ready(function() {
-			//$("#name").focus();
-			$("#inputForm").validate({
-				submitHandler: function(form){
-					loading('正在提交,请稍等...');
-					form.submit();
-				},
-				errorContainer: "#messageBox",
-				errorPlacement: function(error, element) {
-					$("#messageBox").text("输入有误,请先更正。");
-					if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
-						error.appendTo(element.parent().parent());
-					} else {
-						error.insertAfter(element);
-					}
-				}
-			});
-		});
-		function addRow(list, idx, tpl, row){
-			$(list).append(Mustache.render(tpl, {
-				idx: idx, delBtn: true, row: row, rowNo: idx+1
-			}));
-			$(list+idx).find("select").each(function(){
-				$(this).val($(this).attr("data-value"));
-				$(this).select2();
-			});
-			$(list+idx).find("input[type='checkbox'], input[type='radio']").each(function(){
-				var ss = $(this).attr("data-value").split(',');
-				for (var i=0; i<ss.length; i++){
-					if($(this).val() == ss[i]){
-						$(this).attr("checked","checked");
-					}
-				}
-			});
-			
-			//为职位列表初始化
-			if(row && $("#fairType").val()== '2'){
-				if (row.jobList.length > 0) {
-					var jobSelectObj = $(list+idx+"_jobId");
-					var jobSelect = jobSelectObj[0];
-					jobSelect.options.length = 0;
-					jobSelect.add(new Option("请选择职位",""));
-		           	for (var i = 0; i < row.jobList.length; i++){
-		           		var opt = new Option(row.jobList[i].jobName,row.jobList[i].jobId);
-		           		if(row.jobId == row.jobList[i].jobId)
-		           		{
-		           			opt.selected = true; 
-		           		}
-		           		jobSelect.add(opt);
-		           		
-		           	}
-					jobSelectObj.select2().val(row.jobId);
-	            }
-			}
+    <title>主子表管理</title>
+    <meta name="decorator" content="default"/>
+    <script type="text/javascript">
+        $(document).ready(function () {
+            //$("#name").focus();
+            $("#inputForm").validate({
+                submitHandler: function (form) {
+                    loading('正在提交,请稍等...');
+                    form.submit();
+                },
+                errorContainer: "#messageBox",
+                errorPlacement: function (error, element) {
+                    $("#messageBox").text("输入有误,请先更正。");
+                    if (element.is(":checkbox") || element.is(":radio") || element.parent().is(".input-append")) {
+                        error.appendTo(element.parent().parent());
+                    } else {
+                        error.insertAfter(element);
+                    }
+                }
+            });
+            // 是否全部授权
+            $('#allAuthorize').change(function (val) {
+                $('#mdeFairDtlList').children('tr').each(function () {
+                    $(this).find('.checkbox input').attr('checked', val.target.checked).val(val.target.checked ? '1' : '0')
+                })
+            })
 
-		}
-		
-		function delDtlRow(obj, prefix){
-			var id = $(prefix+"_dtlId");
-			if (id.val() == ""){
-				$(obj).parent().parent().remove();
-			} else {
-				top.$.jBox.confirm("确定要删除该条信息吗?", '系统提示', function(v, h, f) {
-					if (v == 'ok') 
-					{
-						$(obj).parent().parent().remove();
-					}
-				}, {
-					buttonsFocus : 1,
-					closed : function() {
-					}
-				});
-				top.$('.jbox-body .jbox-icon').css('top', '55px');
-				return false;
-			}
-		}
-		
-		function saveSubmit(){
-			$("#inputForm").attr("action","${ctx}/recruitment/mdeJobFair/save");
-		}
-		
-		function hotelChange(hotelId, baseId,index) {
-			if($("#fairType").val()== '2') {
-				//职位为单位时才去进行职位联动
-				var jobObj = $("#"+baseId+"_jobId");
-				jobObj.select2("val","");
-				$.get("${ctx}/recruitment/mdeJobFair/getJobList?userCode="+hotelId, 
-					function(data){
-						var jobSelect = document.getElementById(baseId+"_jobId");
-						jobSelect.options.length = 0;
-		                if (data) {
-		                	for (var i = 0; i < data.length; i++){
-		                		jobSelect.add(new Option(data[i].jobName,data[i].jobId));
-		                	}
-		                }
-		            }
-				);
-			} else {
-				var objArr = $("select[name$='.hotelId']");
-				//查重
-				if (!unique(objArr,hotelId,index)){
-					//清空现有选项
-					alert("酒店信息不允许重复");
-					$("#"+baseId+"_hotelId").select2("val","");
-					return false;
-				} else {
-					//为dtlId 赋值
-					$("#"+baseId+"_dtlId").val(hotelId);
-				}
-			}
-		}
-		
-		function jobChange(jobId, baseId,index) {
-			debugger
-			var objArr = $("select[name$='.jobId']");
-			//查重
-			if (!unique(objArr,jobId,index)){
-				//清空现有选项
-				alert("职位信息不允许重复");
-				$("#"+baseId+"_jobId").select2("val","");
-				return false;
-			} else {
-				//为dtlId 赋值
-				$("#"+baseId+"_dtlId").val(jobId);
-			}
-		}
+        });
 
-		
-		function fairTypeChange(v) {
-			var id = document.getElementById("id").value;
-			window.location.href="${ctx}/recruitment/mdeJobFair/form?id="+id+"&fairType="+v;
-		}
-		
-		//验重
-		function unique(objArr, v,index){
-			debugger
-			var length = objArr.length;
-			for(var i = 0; i < length; i++){
-				if(objArr[i].value == v && index != i)
-				{
-					return false;
-				}
-			}
-			return true;
-		}
-		
-	</script>
+        function addRow(list, idx, tpl, row) {
+
+                $(list).append(Mustache.render(tpl, {
+                    idx: idx, delBtn: true, row: row, rowNo: idx + 1
+                }));
+
+            debugger
+            $(list + idx).find("select").each(function () {
+                debugger
+                $(this).val($(this).attr("data-value"));
+                $(this).select2();
+            });
+
+            // $(list + idx).find("input[type='checkbox'], input[type='radio']").each(function () {
+            //     var ss = $(this).attr("data-value").split(',');
+            //     for (var i = 0; i < ss.length; i++) {
+            //         if ($(this).val() == ss[i]) {
+            //             $(this).attr("checked", "checked");
+            //         }
+            //     }
+            // });
+
+            //为职位列表初始化
+            if (row && $("#fairType").val() == '2') {
+                if (row.jobList.length > 0) {
+                    var jobSelectObj = $(list + idx + "_jobId");
+                    var jobSelect = jobSelectObj[0];
+                    jobSelect.options.length = 0;
+                    jobSelect.add(new Option("请选择职位", ""));
+                    for (var i = 0; i < row.jobList.length; i++) {
+                        var opt = new Option(row.jobList[i].jobName, row.jobList[i].jobId);
+                        if (row.jobId == row.jobList[i].jobId) {
+                            opt.selected = true;
+                        }
+                        jobSelect.add(opt);
+
+                    }
+                    jobSelectObj.select2().val(row.jobId);
+                }
+            }
+
+        }
+
+        function delDtlRow(obj, prefix) {
+            var id = $(prefix + "_dtlId");
+            if (id.val() == "") {
+                $(obj).parent().parent().remove();
+            } else {
+                top.$.jBox.confirm("确定要删除该条信息吗?", '系统提示', function (v, h, f) {
+                    if (v == 'ok') {
+                        $(obj).parent().parent().remove();
+                    }
+                }, {
+                    buttonsFocus: 1,
+                    closed: function () {
+                    }
+                });
+                top.$('.jbox-body .jbox-icon').css('top', '55px');
+                return false;
+            }
+        }
+
+        function saveSubmit() {
+            $("#inputForm").attr("action", "${ctx}/recruitment/mdeJobFair/save");
+        }
+
+        function hotelChange(hotelId, baseId, index) {
+            if ($("#fairType").val() == '2') {
+                //职位为单位时才去进行职位联动
+                var jobObj = $("#" + baseId + "_jobId");
+                jobObj.select2("val", "");
+                $.get("${ctx}/recruitment/mdeJobFair/getJobList?userCode=" + hotelId,
+                    function (data) {
+                        var jobSelect = document.getElementById(baseId + "_jobId");
+                        jobSelect.options.length = 0;
+                        if (data) {
+                            for (var i = 0; i < data.length; i++) {
+                                jobSelect.add(new Option(data[i].jobName, data[i].jobId));
+                            }
+                        }
+                    }
+                );
+            } else {
+                var objArr = $("select[name$='.hotelId']");
+                //查重
+                if (!unique(objArr, hotelId, index)) {
+                    //清空现有选项
+                    alert("酒店信息不允许重复");
+                    debugger
+                    $("#" + baseId + "_hotelId").select2("val", "");
+                    $("#" + baseId + "_hotelId").attr("value", "");
+                    return false;
+                } else {
+                    //为dtlId 赋值
+                    $("#" + baseId + "_dtlId").val(hotelId);
+
+                    let vipFlag = null
+                    $("#mdeFairDtlList" + index + "_hotelId").children().each(function (index, item) {
+                        debugger
+                        if ($(this).attr('value') === hotelId) {
+                            const id = $(this).attr('id')
+                            vipFlag = $('#' + id).attr('data-vip')
+                            return
+                        }
+                    })
+
+                    $("#mdeFairDtlList" + index + "_hotelId").parent().prev().text(vipFlag === '0' ? '否' : '是');
+                    $("#mdeFairDtlList" + index + "_hotelId").parent().find('.checkbox input').removeAttr('checked')
+                }
+            }
+        }
+
+        function jobChange(jobId, baseId, index) {
+            debugger
+            var objArr = $("select[name$='.jobId']");
+            //查重
+            if (!unique(objArr, jobId, index)) {
+                //清空现有选项
+                debugger
+                alert("职位信息不允许重复");
+                $("#" + baseId + "_jobId").select2("val", "");
+                return false;
+            } else {
+                //为dtlId 赋值
+                $("#" + baseId + "_dtlId").val(jobId);
+            }
+        }
+
+
+        function fairTypeChange(v) {
+            var id = document.getElementById("id").value;
+            window.location.href = "${ctx}/recruitment/mdeJobFair/form?id=" + id + "&fairType=" + v;
+        }
+
+        //验重
+        function unique(objArr, v, index) {
+            return objArr.filter((index, e) => e.value === v).length < 2
+        }
+
+        function vipPkgChange(v) {
+            $("#priceId").select2("val", "");
+            $("#price").select2("val", "");
+            $.get("${ctx}/recruitment/mdeOrders/getPkgPriceList?pkgId=" + v,
+                function (data) {
+                    var select = document.getElementById("priceId");
+                    select.options.length = 0;
+                    select.add(new Option("请选择套餐价格", ""));
+                    if (data) {
+                        for (var i = 0; i < data.length; i++) {
+                            select.add(new Option(data[i].skuCn + " " + data[i].price, data[i].priceId));
+                            if (i == data.length - 1) {
+                            }
+                        }
+
+                    }
+                }
+            );
+        }
+
+    </script>
 </head>
 <body>
-	<ul class="nav nav-tabs">
-		<li><a href="${ctx}/recruitment/mdeJobFair/">主子表列表</a></li>
-		<li class="active"><a href="${ctx}/recruitment/mdeJobFair/form?id=${mdeJobFair.id}">主子表<shiro:hasPermission name="recruitment:mdeJobFair:edit">${not empty mdeJobFair.id?'修改':'添加'}</shiro:hasPermission><shiro:lacksPermission name="recruitment:mdeJobFair:edit">查看</shiro:lacksPermission></a></li>
-	</ul><br/>
-	<form:form id="inputForm" modelAttribute="mdeJobFair" action="${ctx}/recruitment/mdeJobFair/save" method="post" class="form-horizontal">
-		<form:hidden path="id"/>
-		<sys:message content="${message}"/>		
-		<div class="control-group">
-			<label class="control-label">招聘会类型:</label>
-			<div class="controls">
-				<form:select path="fairType" class="input-xlarge required" onchange="fairTypeChange(this.value);">
-					<form:option value="" label=""/>
-					<form:options items="${fns:getDictList('FAIR_TYPE')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
-				</form:select>
-				<span class="help-inline"><font color="red">*</font> </span>
-			</div>
-		</div>
-		<div class="control-group">
-			<label class="control-label">标题(内部使用):</label>
-			<div class="controls">
-				<form:input path="fairTitle" htmlEscape="false" maxlength="40" class="input-xlarge required"/>
-				<span class="help-inline"><font color="red">*</font> </span>
-			</div>
-		</div>
-		<div class="control-group">
-			<label class="control-label">口号(用户展示):</label>
-			<div class="controls">
-				<form:input path="fairSlogan" htmlEscape="false" maxlength="40" class="input-xlarge required"/>
-				<span class="help-inline"><font color="red">*</font> </span>
-			</div>
-		</div>
-		<div class="control-group">
-			<label class="control-label">头图:</label>
-			<div class="controls">
-				<form:hidden path="headImg" htmlEscape="false" maxlength="255" class="input-xlarge required"/>
-				<sys:ckfinder input="headImg"  type="images" uploadPath="/backgroundImg" selectMultiple="false"/>
-				<span class="help-inline"><font color="red">*</font> </span>
-			</div>
-		</div>
-		<div class="control-group">
-			<label class="control-label">背景图:</label>
-			<div class="controls">
-				<form:hidden path="backgroundImg" htmlEscape="false" maxlength="255" class="input-xlarge required"/>
-				<sys:ckfinder input="backgroundImg"  type="images" uploadPath="/backgroundImg" selectMultiple="false"/>
-				<span class="help-inline"><font color="red">*</font> </span>
-			</div>
-		</div>
-		<div class="control-group">
-			<label class="control-label">底图:</label>
-			<div class="controls">
-				<form:hidden path="bottomImg" htmlEscape="false" maxlength="255" class="input-xlarge required"/>
-				<sys:ckfinder input="bottomImg"  type="images" uploadPath="/backgroundImg" selectMultiple="false"/>
-				<span class="help-inline"><font color="red">*</font> </span>
-			</div>
-		</div>
+<ul class="nav nav-tabs">
+    <li><a href="${ctx}/recruitment/mdeJobFair/">主子表列表</a></li>
+    <li class="active"><a href="${ctx}/recruitment/mdeJobFair/form?id=${mdeJobFair.id}">主子表<shiro:hasPermission
+            name="recruitment:mdeJobFair:edit">${not empty mdeJobFair.id?'修改':'添加'}</shiro:hasPermission><shiro:lacksPermission
+            name="recruitment:mdeJobFair:edit">查看</shiro:lacksPermission></a></li>
+</ul>
+<br/>
+<form:form id="inputForm" modelAttribute="mdeJobFair" action="${ctx}/recruitment/mdeJobFair/save" method="post"
+           class="form-horizontal">
+    <form:hidden path="id"/>
+    <sys:message content="${message}"/>
+    <div class="control-group">
+        <label class="control-label">招聘会类型:</label>
+        <div class="controls">
+            <form:select path="fairType" class="input-xlarge required" onchange="fairTypeChange(this.value);">
+                <form:option value="" label=""/>
+                <form:options items="${fns:getDictList('FAIR_TYPE')}" itemLabel="label" itemValue="value"
+                              htmlEscape="false"/>
+            </form:select>
+            <span class="help-inline"><font color="red">*</font> </span>
+        </div>
+    </div>
+    <div class="control-group">
+        <label class="control-label">标题(内部使用):</label>
+        <div class="controls">
+            <form:input path="fairTitle" htmlEscape="false" maxlength="40" class="input-xlarge required"/>
+            <span class="help-inline"><font color="red">*</font> </span>
+        </div>
+    </div>
+    <div class="control-group">
+        <label class="control-label">口号(用户展示):</label>
+        <div class="controls">
+            <form:input path="fairSlogan" htmlEscape="false" maxlength="40" class="input-xlarge required"/>
+            <span class="help-inline"><font color="red">*</font> </span>
+        </div>
+    </div>
+    <div class="control-group">
+        <label class="control-label">头图:</label>
+        <div class="controls">
+            <form:hidden path="headImg" htmlEscape="false" maxlength="255" class="input-xlarge required"/>
+            <sys:ckfinder input="headImg" type="images" uploadPath="/backgroundImg" selectMultiple="false"/>
+            <span class="help-inline"><font color="red">*</font> </span>
+        </div>
+    </div>
+    <div class="control-group">
+        <label class="control-label">背景图:</label>
+        <div class="controls">
+            <form:hidden path="backgroundImg" htmlEscape="false" maxlength="255" class="input-xlarge required"/>
+            <sys:ckfinder input="backgroundImg" type="images" uploadPath="/backgroundImg" selectMultiple="false"/>
+            <span class="help-inline"><font color="red">*</font> </span>
+        </div>
+    </div>
+    <div class="control-group">
+        <label class="control-label">底图:</label>
+        <div class="controls">
+            <form:hidden path="bottomImg" htmlEscape="false" maxlength="255" class="input-xlarge required"/>
+            <sys:ckfinder input="bottomImg" type="images" uploadPath="/backgroundImg" selectMultiple="false"/>
+            <span class="help-inline"><font color="red">*</font> </span>
+        </div>
+    </div>
 
-		<div class="control-group">
-			<label class="control-label">头图PC:</label>
-			<div class="controls">
-				<form:hidden path="pcHeadImg" htmlEscape="false" maxlength="255" class="input-xlarge required"/>
-				<sys:ckfinder input="pcHeadImg"  type="images" uploadPath="/backgroundImg" selectMultiple="false"/>
-				<span class="help-inline"><font color="red">*</font> </span>
-			</div>
-		</div>
-		<div class="control-group">
-			<label class="control-label">背景图PC:</label>
-			<div class="controls">
-				<form:hidden path="pcBackgroundImg" htmlEscape="false" maxlength="255" class="input-xlarge required"/>
-				<sys:ckfinder input="pcBackgroundImg"  type="images" uploadPath="/backgroundImg" selectMultiple="false"/>
-				<span class="help-inline"><font color="red">*</font> </span>
-			</div>
-		</div>
-		<div class="control-group">
-			<label class="control-label">底图PC:</label>
-			<div class="controls">
-				<form:hidden path="pcBottomImg" htmlEscape="false" maxlength="255" class="input-xlarge required"/>
-				<sys:ckfinder input="pcBottomImg"  type="images" uploadPath="/backgroundImg" selectMultiple="false"/>
-				<span class="help-inline"><font color="red">*</font> </span>
-			</div>
-		</div>
-		<div class="control-group">
-			<label class="control-label">小区块色号:</label>
-			<div class="controls">
-				<form:input path="insideColour" htmlEscape="false" maxlength="50" class="input-xlarge"/>
-			</div>
-		</div>
-		<div class="control-group">
-			<label class="control-label">职位背景色:</label>
-			<div class="controls">
-				<form:input path="jobColour" htmlEscape="false" maxlength="50" class="input-xlarge"/>
-			</div>
-		</div>
-		<div class="control-group">
-			<label class="control-label">背景色色号:</label>
-			<div class="controls">
-				<form:input path="backgroundColour" htmlEscape="false" maxlength="10" class="input-xlarge"/>
-			</div>
-		</div>
-		<div class="control-group">
-			<label class="control-label">分享用图:</label>
-			<div class="controls">
-				<form:hidden path="shareImg" htmlEscape="false" maxlength="255" class="input-xlarge required"/>
-				<sys:ckfinder input="shareImg"  type="images" uploadPath="/backgroundImg" selectMultiple="false"/>
-				<span class="help-inline"><font color="red">*</font> </span>
-			</div>
-		</div>
-		<div class="control-group">
-			<label class="control-label">开始时间:</label>
-			<div class="controls">
-				<input name="startDate" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate required"
-					value="<fmt:formatDate value="${mdeJobFair.startDate}" pattern="yyyy-MM-dd"/>"
-					onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
-				<span class="help-inline"><font color="red">*</font> </span>
-			</div>
-		</div>
-		<div class="control-group">
-			<label class="control-label">结束时间:</label>
-			<div class="controls">
-				<input name="stopDate" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate required"
-					value="<fmt:formatDate value="${mdeJobFair.stopDate}" pattern="yyyy-MM-dd"/>"
-					onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
-				<span class="help-inline"><font color="red">*</font> </span>
-			</div>
-		</div>
-		<div class="control-group">
-			<label class="control-label">底部文案:</label>
-			<div class="controls">
-				<form:textarea path="remarks" htmlEscape="false" rows="5" maxlength="2255" class="input-xxlarge " style="width:1200px"/>
-			</div>
-		</div>
-			<div class="control-group">
-				<label class="control-label">参会企业/职位:</label>
-				<div class="controls">
-					<table id="contentTable" class="table table-striped table-bordered table-condensed" style="width:80%">
-						<thead>
-							<tr>
-								<th class="hide"></th>
-								<th>序号</th>
-								<th>酒店名称 ${mdeJobFair.fairType}</th>
-								<c:if test="${mdeJobFair.fairType eq '2'}">
-									<th>职位名称</th>
-								</c:if>
-								<th>排序</th>
-								<shiro:hasPermission name="recruitment:mdeJobFair:edit"><th width="10">&nbsp;</th></shiro:hasPermission>
-							</tr>
-						</thead>
-						<tbody id="mdeFairDtlList">
-						</tbody>
-						<shiro:hasPermission name="recruitment:mdeJobFair:edit"><tfoot>
-							<tr><td colspan="5"><a href="javascript:" onclick="addRow('#mdeFairDtlList', mdeFairDtlRowIdx, mdeFairDtlTpl);mdeFairDtlRowIdx = mdeFairDtlRowIdx + 1;" class="btn">新增</a></td></tr>
-						</tfoot></shiro:hasPermission>
-					</table>
-					<script type="text/template" id="mdeFairDtlTpl">
-					//<!--
+    <div class="control-group">
+        <label class="control-label">头图PC:</label>
+        <div class="controls">
+            <form:hidden path="pcHeadImg" htmlEscape="false" maxlength="255" class="input-xlarge required"/>
+            <sys:ckfinder input="pcHeadImg" type="images" uploadPath="/backgroundImg" selectMultiple="false"/>
+            <span class="help-inline"><font color="red">*</font> </span>
+        </div>
+    </div>
+    <div class="control-group">
+        <label class="control-label">背景图PC:</label>
+        <div class="controls">
+            <form:hidden path="pcBackgroundImg" htmlEscape="false" maxlength="255" class="input-xlarge required"/>
+            <sys:ckfinder input="pcBackgroundImg" type="images" uploadPath="/backgroundImg" selectMultiple="false"/>
+            <span class="help-inline"><font color="red">*</font> </span>
+        </div>
+    </div>
+    <div class="control-group">
+        <label class="control-label">底图PC:</label>
+        <div class="controls">
+            <form:hidden path="pcBottomImg" htmlEscape="false" maxlength="255" class="input-xlarge required"/>
+            <sys:ckfinder input="pcBottomImg" type="images" uploadPath="/backgroundImg" selectMultiple="false"/>
+            <span class="help-inline"><font color="red">*</font> </span>
+        </div>
+    </div>
+    <div class="control-group">
+        <label class="control-label">小区块色号:</label>
+        <div class="controls">
+            <form:input path="insideColour" htmlEscape="false" maxlength="50" class="input-xlarge"/>
+        </div>
+    </div>
+    <div class="control-group">
+        <label class="control-label">职位背景色:</label>
+        <div class="controls">
+            <form:input path="jobColour" htmlEscape="false" maxlength="50" class="input-xlarge"/>
+        </div>
+    </div>
+    <div class="control-group">
+        <label class="control-label">背景色色号:</label>
+        <div class="controls">
+            <form:input path="backgroundColour" htmlEscape="false" maxlength="10" class="input-xlarge"/>
+        </div>
+    </div>
+    <div class="control-group">
+        <label class="control-label">分享用图:</label>
+        <div class="controls">
+            <form:hidden path="shareImg" htmlEscape="false" maxlength="255" class="input-xlarge required"/>
+            <sys:ckfinder input="shareImg" type="images" uploadPath="/backgroundImg" selectMultiple="false"/>
+            <span class="help-inline"><font color="red">*</font> </span>
+        </div>
+    </div>
+    <div class="control-group">
+        <label class="control-label">开始时间:</label>
+        <div class="controls">
+            <input name="startDate" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate required"
+                   value="<fmt:formatDate value="${mdeJobFair.startDate}" pattern="yyyy-MM-dd"/>"
+                   onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
+            <span class="help-inline"><font color="red">*</font> </span>
+        </div>
+    </div>
+    <div class="control-group">
+        <label class="control-label">结束时间:</label>
+        <div class="controls">
+            <input name="stopDate" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate required"
+                   value="<fmt:formatDate value="${mdeJobFair.stopDate}" pattern="yyyy-MM-dd"/>"
+                   onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
+            <span class="help-inline"><font color="red">*</font> </span>
+        </div>
+    </div>
+    <div class="control-group">
+        <label class="control-label">底部文案:</label>
+        <div class="controls">
+            <form:textarea path="remarks" htmlEscape="false" rows="5" maxlength="2255" class="input-xxlarge "
+                           style="width:1200px"/>
+        </div>
+    </div>
+    <c:if test="${mdeJobFair.fairType eq '1'}">
+        <div class="control-group">
+            <div class="left">
+                <label class="control-label">所购套餐:</label>
+                <div class="controls">
+                    <form:select path="pkgId" data-value="${mdeJobFair.pkgId}" class="input-xlarge required"
+                                 onchange="vipPkgChange(this.value);">
+                        <form:option value="" label="请选择套餐"></form:option>
+                        <form:options items="${vipPkgsList}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+                    </form:select>
+                    <span class="help-inline"><font color="red">*</font> </span>
+                </div>
+            </div>
+        </div>
+        <div class="control-group">
+            <div class="right" style="width: 780px;">
+                <label class="control-label">套餐售价:</label>
+                <div class="controls" style="width: 560px; ">
+                    <form:select path="priceId" data-value="${mdeJobFair.priceId}" class="input-xxlarge required">
+                        <form:option value="" label="请选择套餐售价"></form:option>
+                        <form:options items="${vipPkgPriceList}" itemLabel="pkgTitle" itemValue="priceId"
+                                      htmlEscape="false"/>
+                    </form:select>
+                    <span class="help-inline"><font color="red">*</font> </span>
+                </div>
+            </div>
+        </div>
+    </c:if>
+    <div class="control-group">
+        <label class="control-label">参会企业/职位:</label>
+        <div class="controls">
+            <table id="contentTable" class="table table-striped table-bordered table-condensed" style="width:80%">
+                <thead>
+                <tr>
+                    <th class="hide"></th>
+                    <c:if test="${mdeJobFair.fairType eq '1'}">
+                        <th style="display: flex">
+                            <input id="allAuthorize" type="checkbox">
+                            是否授权
+                        </th>
+                    </c:if>
+                    <th>序号</th>
+                    <c:if test="${mdeJobFair.fairType eq '1'}">
+                        <th>是否会员</th>
+                    </c:if>
+                    <th>酒店名称 ${mdeJobFair.fairType}</th>
+                    <c:if test="${mdeJobFair.fairType eq '2'}">
+                        <th>职位名称</th>
+                    </c:if>
+                    <th>排序</th>
+                    <shiro:hasPermission name="recruitment:mdeJobFair:edit">
+                        <th width="10">&nbsp;</th>
+                    </shiro:hasPermission>
+                </tr>
+                </thead>
+<%--                <tbody id="mdeFairDtlList">--%>
+<%--                </tbody>--%>
+                <tbody id="mdeFairDtlList">
+                <c:forEach items="${mdeJobFair.mdeFairDtlList}" var="fairDtl" varStatus="status">
+                    <tr id="mdeFairDtlList${status.index}">
+                        <td class="hide">
+                            <input id="mdeFairDtlList${status.index}_id" name="mdeFairDtlList[${status.index}].id"
+                                   type="hidden" value="${fairDtl.id}"/>
+                            <input id="mdeFairDtlList${status.index}_dtlId" name="mdeFairDtlList[${status.index}].dtlId"
+                                   type="hidden" value="${fairDtl.dtlId}"/>
+                            <input id="mdeFairDtlList${status.index}_fairType"
+                                   name="mdeFairDtlList[${status.index}].fairType"
+                                   type="hidden" value="${fairDtl.fairType}"/>
+                            <input id="mdeFairDtlList${status.index}_vipFlag"
+                                   name="mdeFairDtlList[${status.index}].vipFlag"
+                                   type="hidden" value="${fairDtl.vipFlag}"/>
+                        </td>
+                        <c:if test="${mdeJobFair.fairType eq '1'}">
+                            <td class="checkbox">
+                                <input name="mdeFairDtlList[${status.index}].authorizeFlag" style="margin: -2px 3px"
+                                       type="checkbox"
+                                       <c:if test="${'1' == fairDtl.authorizeFlag}">checked</c:if>
+                                       value="1"/>
+                            </td>
+                        </c:if>
+                        <td>
+                                ${status.index+1}
+                        </td>
+                        <c:if test="${mdeJobFair.fairType eq '1'}">
+                            <td>
+                                <c:choose>
+                                    <c:when test="${fairDtl.vipFlag ne '0'}">
+                                        是
+                                    </c:when>
+                                    <c:otherwise>
+                                        否
+                                    </c:otherwise>
+                                </c:choose>
+                            </td>
+                        </c:if>
+                        <td>
+                            <select id="mdeFairDtlList${status.index}_hotelId"
+                                    name="mdeFairDtlList[${status.index}].hotelId" data-value="${fairDtl.hotelId}"
+                                    onchange="hotelChange(this.value, 'mdeFairDtlList${status.index}',${status.index});"
+                                    class="input-xxlarge required">
+                                <option value=""></option>
+                                <c:forEach items="${userList}" var="dict" varStatus="dictIndex">
+                                    <option id="mdeFairDtlListOption${status.index}_${dictIndex.index}"
+                                            data-vip="${dict.vipFlag}"
+                                            value="${dict.userCode}"
+                                            <c:if test="${fairDtl.hotelId == dict.userCode}">selected="selected"</c:if>>${dict.name}</option>
+                                </c:forEach>
+                            </select>
+                        </td>
+                        <c:if test="${mdeJobFair.fairType eq '2'}">
+                            <td>
+                                <select id="mdeFairDtlList${status.index}_jobId"
+                                        name="mdeFairDtlList[${status.index}].jobId" value="${fairDtl.jobId}"
+                                        data-value="${fairDtl.jobId}"
+                                        onchange="jobChange(this.value, 'mdeFairDtlList${status.index}',${status.index});"
+                                        class="input-xxlarge required">
+                                    <option value=""></option>
+                                    <c:forEach items="${fairDtl.jobList}" var="dict">
+                                        <option value="${dict.jobId}">${dict.jobName}</option>
+                                    </c:forEach>
+                                </select>
+                            </td>
+                        </c:if>
+                        <td>
+                            <input id="mdeFairDtlList${status.index}_sort" name="mdeFairDtlList[${status.index}].sort"
+                                   type="text" value="${fairDtl.sort}" maxlength="11" class="input-small required"/>
+                        </td>
+                        <shiro:hasPermission name="recruitment:mdeJobFair:edit">
+                            <td class="text-center" width="10">
+                            <span class="close" onclick="delDtlRow(this, '#mdeFairDtlList${status.index}')"
+                                  title="删除">&times;</span>
+                            </td>
+                        </shiro:hasPermission>
+                    </tr>
+                </c:forEach>
+                </tbody>
+
+
+            </table>
+
+            </tbody>
+            <shiro:hasPermission name="recruitment:mdeJobFair:edit">
+                <tfoot>
+                <tr>
+                    <td colspan="5"><a href="javascript:"
+                                       onclick="addRow('#mdeFairDtlList', mdeFairDtlRowIdx, mdeFairDtlTpl);mdeFairDtlRowIdx = mdeFairDtlRowIdx + 1;"
+                                       class="btn">新增</a></td>
+                </tr>
+                </tfoot>
+            </shiro:hasPermission>
+            </table>
+            <script type="text/template" id="mdeFairDtlTpl">
+                //<!--
 						<tr id="mdeFairDtlList{{idx}}">
 							<td class="hide">
 								<input id="mdeFairDtlList{{idx}}_id" name="mdeFairDtlList[{{idx}}].id" type="hidden" value="{{row.id}}"/>
 								<input id="mdeFairDtlList{{idx}}_dtlId" name="mdeFairDtlList[{{idx}}].dtlId" type="hidden" value="{{row.dtlId}}" />
+								<input id="mdeFairDtlList{{idx}}_fairType" name="mdeFairDtlList[{{idx}}].fairType" type="hidden" value="{{row.fairType}}"/>
+                                <input id="mdeFairDtlList{{idx}}_vipFlag" name="mdeFairDtlList[{{idx}}].vipFlag" type="hidden" value="{{row.vipFlag}}"/>
 							</td>
+							<c:if test="${mdeJobFair.fairType eq '1'}">
+							<td class="checkbox">
+                                <input name="mdeFairDtlList[{{idx}}].authorizeFlag" style="margin: -2px 3px" type="checkbox"
+                                     <c:if test="${'1' == fairDtl.authorizeFlag}">checked</c:if>
+                                 value="1" />
+							</td>
+							</c:if>
 							<td>
 								{{rowNo}}
 							</td>
+							<c:if test="${mdeJobFair.fairType eq '1'}">
+                                <td>
+                                    <c:choose>
+                                          <c:when test="${row.vipFlag ne '0'}">
+                                            是
+                                          </c:when>
+                                          <c:otherwise>
+                                            否
+                                          </c:otherwise>
+                                    </c:choose>
+                                </td>
+                            </c:if>
 							<td>
-								<select id="mdeFairDtlList{{idx}}_hotelId" name="mdeFairDtlList[{{idx}}].hotelId" data-value="{{row.hotelId}}" onchange="hotelChange(this.value, 'mdeFairDtlList{{idx}}',{{idx}});" class="input-xxlarge required">
+								<select id="mdeFairDtlList{{idx}}_hotelId"
+								name="mdeFairDtlList[{{idx}}].hotelId" data-value="{{row.hotelId}}"
+								onchange="hotelChange(this.value, 'mdeFairDtlList{{idx}}',{{idx}});"
+								class="input-xxlarge required">
 									<option value=""></option>
-									<c:forEach items="${userList}" var="dict">
-										<option value="${dict.userCode}">${dict.name}</option>
+									<c:forEach items="${userList}" var="dict" varStatus="dictIndex">
+										<option id="mdeFairDtlListOption{{idx}}_${dictIndex.index}" data-vip="${dict.vipFlag}"
+										 value="${dict.userCode}">${dict.name}</option>
 									</c:forEach>
 								</select>
 							</td>
@@ -341,27 +540,32 @@
 								{{#delBtn}}<span class="close" onclick="delDtlRow(this, '#mdeFairDtlList{{idx}}')" title="删除">&times;</span>{{/delBtn}}
 							</td></shiro:hasPermission>
 						</tr>//-->
-					</script>
-					<script type="text/javascript">
-						var mdeFairDtlRowIdx = 0, mdeFairDtlTpl = $("#mdeFairDtlTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
-						$(document).ready(function() {
-							var data = ${fns:toJson(mdeJobFair.mdeFairDtlList)};
-							for (var i=0; i<data.length; i++){
-								addRow('#mdeFairDtlList', mdeFairDtlRowIdx, mdeFairDtlTpl, data[i]);
-								mdeFairDtlRowIdx = mdeFairDtlRowIdx + 1;
-							}
-						});
-					</script>
-				</div>
-			</div>
-		<div class="form-actions">
-			<c:if test="${editFlag ne 'false' }">
-			<shiro:hasPermission name="recruitment:mdeVipPackage:edit">
-			<input id="btnSubmit" class="btn btn-primary" type="submit" onclick="return saveSubmit();" value="保 存"/>&nbsp;
-			</shiro:hasPermission>
-			</c:if>
-			<input id="btnCancel" class="btn" type="button" value="返 回" onclick="history.go(-1)"/>
-		</div>
-	</form:form>
+            </script>
+            <script type="text/javascript">
+                var mdeFairDtlRowIdx = 0,
+                    mdeFairDtlTpl = $("#mdeFairDtlTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g, "");
+                $(document).ready(function () {
+                    var data = ${fns:toJson(mdeJobFair.mdeFairDtlList)};
+                    console.log(data)
+                    for (var i = 0; i < data.length; i++) {
+                        console.log(data[i]);
+                        addRow('', mdeFairDtlRowIdx, mdeFairDtlTpl, data[i],true);
+                        mdeFairDtlRowIdx = mdeFairDtlRowIdx + 1;
+                    }
+
+                });
+            </script>
+        </div>
+    </div>
+    <div class="form-actions">
+        <c:if test="${editFlag ne 'false' }">
+            <shiro:hasPermission name="recruitment:mdeVipPackage:edit">
+                <input id="btnSubmit" class="btn btn-primary" type="submit" onclick="return saveSubmit();"
+                       value="保 存"/>&nbsp;
+            </shiro:hasPermission>
+        </c:if>
+        <input id="btnCancel" class="btn" type="button" value="返 回" onclick="history.go(-1)"/>
+    </div>
+</form:form>
 </body>
 </html>