Browse Source

微信消息推送开发

anderx 4 years ago
parent
commit
7b8ec78fe3
23 changed files with 2142 additions and 10 deletions
  1. 1 1
      GeneratorConfig.xml
  2. 42 0
      src/main/java/com/goafanti/admin/bo/InputPublicRelease.java
  3. 28 0
      src/main/java/com/goafanti/admin/bo/InputPublicReleaseList.java
  4. 62 0
      src/main/java/com/goafanti/admin/bo/OutPublicReleaseList.java
  5. 41 0
      src/main/java/com/goafanti/admin/bo/outPublicReleaseLog.java
  6. 28 2
      src/main/java/com/goafanti/admin/controller/AdminApiController.java
  7. 134 0
      src/main/java/com/goafanti/admin/controller/AdminReleaseApiController.java
  8. 26 0
      src/main/java/com/goafanti/admin/service/PublicReleaseService.java
  9. 121 0
      src/main/java/com/goafanti/admin/service/impl/PublicReleaseServiceImpl.java
  10. 2 0
      src/main/java/com/goafanti/common/dao/AdminMapper.java
  11. 47 0
      src/main/java/com/goafanti/common/dao/PublicReleaseLogMapper.java
  12. 64 0
      src/main/java/com/goafanti/common/dao/PublicReleaseMapper.java
  13. 6 0
      src/main/java/com/goafanti/common/mapper/AdminMapper.xml
  14. 152 0
      src/main/java/com/goafanti/common/mapper/PublicReleaseLogMapper.xml
  15. 455 0
      src/main/java/com/goafanti/common/mapper/PublicReleaseMapper.xml
  16. 10 0
      src/main/java/com/goafanti/common/model/Admin.java
  17. 609 0
      src/main/java/com/goafanti/common/model/PublicRelease.java
  18. 166 0
      src/main/java/com/goafanti/common/model/PublicReleaseLog.java
  19. 54 0
      src/main/java/com/goafanti/common/utils/AsyncUtils.java
  20. 83 0
      src/main/java/com/goafanti/common/utils/HttpUtils.java
  21. 2 0
      src/main/java/com/goafanti/customer/bo/FollowBusinessBo.java
  22. 1 1
      src/main/java/com/goafanti/customer/service/impl/CustomerServiceImpl.java
  23. 8 6
      src/main/resources/props/config_local.properties

+ 1 - 1
GeneratorConfig.xml

@@ -43,7 +43,7 @@
     <property name="enableSubPackages" value="false"/>
      <property name="nullCatalogMeansCurrent" value="true"/>
     </javaClientGenerator>
-    <table schema="aft" tableName="user_service_follow"
+    <table schema="aft" tableName="public_release_log"
 	enableCountByExample="false" enableUpdateByExample="false"
 	enableDeleteByExample="false" enableSelectByExample="false"
 	selectByExampleQueryId="false" enableSelectByPrimaryKey="true"

+ 42 - 0
src/main/java/com/goafanti/admin/bo/InputPublicRelease.java

@@ -0,0 +1,42 @@
+package com.goafanti.admin.bo;
+
+import com.goafanti.common.model.PublicRelease;
+
+public class InputPublicRelease extends PublicRelease {
+
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = 1L;
+	
+	private String releaseStarts;
+	
+	private String releaseEnds;
+	
+	private String ocbId;
+
+	public String getReleaseStarts() {
+		return releaseStarts;
+	}
+
+	public void setReleaseStarts(String releaseStarts) {
+		this.releaseStarts = releaseStarts;
+	}
+
+	public String getReleaseEnds() {
+		return releaseEnds;
+	}
+
+	public void setReleaseEnds(String releaseEnds) {
+		this.releaseEnds = releaseEnds;
+	}
+
+	public String getOcbId() {
+		return ocbId;
+	}
+
+	public void setOcbId(String ocbId) {
+		this.ocbId = ocbId;
+	}
+
+}

+ 28 - 0
src/main/java/com/goafanti/admin/bo/InputPublicReleaseList.java

@@ -0,0 +1,28 @@
+package com.goafanti.admin.bo;
+
+public class InputPublicReleaseList {
+	
+	private Integer pageSize;
+	private Integer pageNo;
+	private Integer type;
+	public Integer getPageSize() {
+		return pageSize;
+	}
+	public void setPageSize(Integer pageSize) {
+		this.pageSize = pageSize;
+	}
+	public Integer getPageNo() {
+		return pageNo;
+	}
+	public void setPageNo(Integer pageNo) {
+		this.pageNo = pageNo;
+	}
+	public Integer getType() {
+		return type;
+	}
+	public void setType(Integer type) {
+		this.type = type;
+	}
+	
+
+}

+ 62 - 0
src/main/java/com/goafanti/admin/bo/OutPublicReleaseList.java

@@ -0,0 +1,62 @@
+package com.goafanti.admin.bo;
+
+public class OutPublicReleaseList {
+	
+	private String id;
+	private String nickname;
+	private String userName;
+	private String aname;
+	private String releaseStarts;
+	private String releaseEnds;
+	private String createTimes;
+	private Integer status;
+	public String getId() {
+		return id;
+	}
+	public void setId(String id) {
+		this.id = id;
+	}
+	public String getNickname() {
+		return nickname;
+	}
+	public void setNickname(String nickname) {
+		this.nickname = nickname;
+	}
+	public String getAname() {
+		return aname;
+	}
+	public void setAname(String aname) {
+		this.aname = aname;
+	}
+	public String getReleaseStarts() {
+		return releaseStarts;
+	}
+	public void setReleaseStarts(String releaseStarts) {
+		this.releaseStarts = releaseStarts;
+	}
+	public String getReleaseEnds() {
+		return releaseEnds;
+	}
+	public void setReleaseEnds(String releaseEnds) {
+		this.releaseEnds = releaseEnds;
+	}
+	public String getCreateTimes() {
+		return createTimes;
+	}
+	public void setCreateTimes(String createTimes) {
+		this.createTimes = createTimes;
+	}
+	public Integer getStatus() {
+		return status;
+	}
+	public void setStatus(Integer status) {
+		this.status = status;
+	}
+	public String getUserName() {
+		return userName;
+	}
+	public void setUserName(String userName) {
+		this.userName = userName;
+	}
+	
+}

+ 41 - 0
src/main/java/com/goafanti/admin/bo/outPublicReleaseLog.java

@@ -0,0 +1,41 @@
+package com.goafanti.admin.bo;
+
+import java.util.Date;
+
+import com.goafanti.common.model.PublicReleaseLog;
+
+public class outPublicReleaseLog extends PublicReleaseLog{
+
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = 1L;
+
+	public outPublicReleaseLog(Integer id, String aid, Integer status, String remarks, Date date) {
+		super(id, aid, status, remarks, date);
+		
+	}
+	public outPublicReleaseLog() {
+		super();
+	}
+	
+	public String getAname() {
+		return aname;
+	}
+
+	public void setAname(String aname) {
+		this.aname = aname;
+	}
+
+	public String getCreateTimes() {
+		return createTimes;
+	}
+
+	public void setCreateTimes(String createTimes) {
+		this.createTimes = createTimes;
+	}
+
+	private String aname;
+
+	private String createTimes;
+}

+ 28 - 2
src/main/java/com/goafanti/admin/controller/AdminApiController.java

@@ -16,13 +16,14 @@ import javax.servlet.http.HttpServletResponse;
 import javax.validation.Valid;
 
 import org.springframework.beans.BeanUtils;
-import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Controller;
 import org.springframework.validation.BindingResult;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.RequestParam;
 
+import com.alibaba.fastjson.JSONObject;
 import com.goafanti.admin.service.AdminService;
 import com.goafanti.cognizance.bo.ActivityNumberBo;
 import com.goafanti.cognizance.bo.AnnualReportBo;
@@ -31,7 +32,6 @@ import com.goafanti.cognizance.bo.InputApplyCognizance;
 import com.goafanti.cognizance.bo.InputOrgActivity;
 import com.goafanti.cognizance.bo.InputOrgActivityCost;
 import com.goafanti.cognizance.bo.InputOrgAnnualReport;
-import com.goafanti.cognizance.bo.InputOrgCognizance;
 import com.goafanti.cognizance.bo.InputOrgFinance;
 import com.goafanti.cognizance.bo.InputOrgHonorDatum;
 import com.goafanti.cognizance.bo.InputOrgHumanResource;
@@ -113,6 +113,7 @@ import com.goafanti.common.model.User;
 import com.goafanti.common.model.UserAbility;
 import com.goafanti.common.model.UserIdentity;
 import com.goafanti.common.utils.DateUtils;
+import com.goafanti.common.utils.HttpUtils;
 import com.goafanti.common.utils.PasswordUtil;
 import com.goafanti.common.utils.StringUtils;
 import com.goafanti.copyright.bo.CopyrightInfoDetail;
@@ -181,6 +182,13 @@ public class AdminApiController extends CertifyApiController {
 	private CopyrightInfoService			copyrightInfoService;
 	@Resource
 	private OrgCognizanceProportionService	orgCognizanceProportionService;
+	
+	
+	
+	@Value(value = "${wx.appId}")
+	private String appId;
+	@Value(value = "${wx.appSecret}")
+	private String appSecret;
 
 
 	/**
@@ -3041,5 +3049,23 @@ public class AdminApiController extends CertifyApiController {
 		res.setData(adminService.deleteFrequentContacts(id));
 		return res;
 	}
+	@RequestMapping(value ="/setOpenId" , method = RequestMethod.POST)
+	public Result setOpenId(String code) {
+		Result res =new Result();
+		String url = "https://api.weixin.qq.com/sns/jscode2session?";
+		url=url+"appid="+appId+"&secret="+appSecret+"&js_code="+code+"&grant_type=authorization_code";
+		JSONObject json= HttpUtils.httpGet(url);
+		String openid=json.getString("openid");
+		if (StringUtils.isNotBlank(openid)) {
+			Admin a=new Admin();
+			a.setId(TokenManager.getAdminId());
+			a.setOpenId(openid);
+			adminService.updateByPrimaryKey(a);
+			res.data(1);
+		}else {
+			res.getError().add(buildError("openid绑定失败"));
+		}
+		return res;
+	}
 	
 }

+ 134 - 0
src/main/java/com/goafanti/admin/controller/AdminReleaseApiController.java

@@ -0,0 +1,134 @@
+package com.goafanti.admin.controller;
+
+
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletRequest;
+
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RestController;
+
+import com.goafanti.admin.bo.InputPublicRelease;
+import com.goafanti.admin.bo.InputPublicReleaseList;
+import com.goafanti.admin.service.PublicReleaseService;
+import com.goafanti.common.bo.Result;
+import com.goafanti.common.constant.ErrorConstants;
+import com.goafanti.common.controller.CertifyApiController;
+import com.goafanti.common.utils.StringUtils;
+
+@RestController
+@RequestMapping(value = "/api/admin/release")
+public class AdminReleaseApiController extends CertifyApiController{
+	
+	@Resource
+	private PublicReleaseService publicReleaseService;
+	
+	/**
+	 * 发起外出申请
+	 * @return
+	 */
+	@RequestMapping(value = "/addPublicRelease", method = RequestMethod.POST)
+	public Result addPublicRelease(InputPublicRelease in){
+		Result res = new Result();
+		if (StringUtils.isBlank(in.getUid())) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"用户编号"));
+			return res;
+		}
+		if (StringUtils.isBlank(in.getReleaseStarts())) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"公出时间"));
+			return res;
+		}
+		if (StringUtils.isBlank(in.getUserName())) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"公出地点"));
+			return res;
+		}
+		
+		res.setData(publicReleaseService.addPublicRelease(in));
+		return res;
+	}
+	
+	/**
+	 * 修改外出申请
+	 * @return
+	 */
+	@RequestMapping(value = "/updatePublicRelease", method = RequestMethod.POST)
+	public Result updatePublicRelease(InputPublicRelease in){
+		Result res = new Result();
+		if (StringUtils.isBlank(in.getUid())) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"用户编号"));
+			return res;
+		}
+		if (StringUtils.isBlank(in.getReleaseStarts())) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"公出时间"));
+			return res;
+		}
+		if (StringUtils.isBlank(in.getUserName())) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"公出地点"));
+			return res;
+		}
+		
+		res.setData(publicReleaseService.updatePublicRelease(in));
+		return res;
+	}
+
+	/**
+	 * 修改外出申请
+	 * @return
+	 */
+	@RequestMapping(value = "/publicReleaseClockIn", method = RequestMethod.POST)
+	public Result publicReleaseClockIn(Integer id){
+		Result res =new Result();
+		res.setData(publicReleaseService.pushPublicReleaseClockIn(id));
+		return res;
+	}
+	/**
+	 * 外出申请列表
+	 * @return
+	 */
+	@RequestMapping(value = "/listPublicRelease", method = RequestMethod.GET)
+	public Result listPublicRelease(InputPublicReleaseList in){
+		Result res =new Result();
+		res.setData(publicReleaseService.listPublicRelease(in));
+		return res;
+	}
+	
+	/**
+	 * 外出审核
+	 * @return
+	 */
+	@RequestMapping(value = "/examinePublicRelease", method = RequestMethod.POST)
+	public Result examinePublicRelease(Integer id ,Integer status,String remarks){
+		Result res =new Result();
+		if (id==null) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"公出编号"));
+			return res;
+		}
+		if (status!=0&&status!=2) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"审核状态"));
+			return res;
+		}
+		res.setData(publicReleaseService.pushExaminePublicRelease( id , status, remarks));
+		return res;
+	}
+	
+	/**
+	 * 外出审核列表
+	 * @return
+	 */
+	@RequestMapping(value = "/listPublicReleaseLog", method = RequestMethod.GET)
+	public Result listPublicReleaseLog(Integer id){
+		Result res =new Result();
+		res.data(publicReleaseService.listPublicReleaseLog(id));
+		return res;
+	}
+	
+	
+	/** 上传图片 **/
+	@RequestMapping(value = "/upload", method = RequestMethod.POST)
+	public Result uploadOrderInvoiceFile(HttpServletRequest req){
+		Result res = new Result();
+		res.setData(handleFile(res, "/publicRelease/", false, req, "publicRelease"));
+		return res;
+	}
+	
+}

+ 26 - 0
src/main/java/com/goafanti/admin/service/PublicReleaseService.java

@@ -0,0 +1,26 @@
+package com.goafanti.admin.service;
+
+import java.util.List;
+
+import com.goafanti.admin.bo.InputPublicRelease;
+import com.goafanti.admin.bo.InputPublicReleaseList;
+import com.goafanti.admin.bo.outPublicReleaseLog;
+
+public interface PublicReleaseService {
+
+	int addPublicRelease(InputPublicRelease in);
+
+	Object listPublicRelease(InputPublicReleaseList in);
+
+
+	int pushExaminePublicRelease(Integer id, Integer status, String remarks);
+
+
+	List<outPublicReleaseLog> listPublicReleaseLog(Integer id);
+
+	int updatePublicRelease(InputPublicRelease in);
+
+	int pushPublicReleaseClockIn(Integer id);
+
+
+}

+ 121 - 0
src/main/java/com/goafanti/admin/service/impl/PublicReleaseServiceImpl.java

@@ -0,0 +1,121 @@
+package com.goafanti.admin.service.impl;
+
+import java.text.ParseException;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import com.goafanti.admin.bo.InputPublicRelease;
+import com.goafanti.admin.bo.InputPublicReleaseList;
+import com.goafanti.admin.bo.OutPublicReleaseList;
+import com.goafanti.admin.bo.outPublicReleaseLog;
+import com.goafanti.admin.service.PublicReleaseService;
+import com.goafanti.common.constant.AFTConstants;
+import com.goafanti.common.dao.AdminMapper;
+import com.goafanti.common.dao.PublicReleaseLogMapper;
+import com.goafanti.common.dao.PublicReleaseMapper;
+import com.goafanti.common.error.BusinessException;
+import com.goafanti.common.model.PublicRelease;
+import com.goafanti.common.model.PublicReleaseLog;
+import com.goafanti.common.utils.AsyncUtils;
+import com.goafanti.common.utils.DateUtils;
+import com.goafanti.core.mybatis.BaseMybatisDao;
+import com.goafanti.core.mybatis.page.Pagination;
+import com.goafanti.core.shiro.token.TokenManager;
+import com.goafanti.customer.bo.FollowBusinessBo;
+import com.goafanti.customer.service.CustomerService;
+
+@Service
+public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper> implements PublicReleaseService {
+	@Autowired
+	private PublicReleaseMapper	publicReleaseMapper; 
+	@Autowired
+	private PublicReleaseLogMapper publicReleaseLogMapper;
+	@Autowired
+	private CustomerService customerService;
+	@Autowired
+	private AsyncUtils asyncUtils;
+	@Autowired
+	private AdminMapper adminMapper;
+	
+	@Override
+	public int addPublicRelease(InputPublicRelease in) {
+		Date date =new Date();
+		in.setCreateTime(date);
+		in.setAid(TokenManager.getAdminId());
+		try {
+			in.setReleaseStart(DateUtils.parseDate(in.getReleaseStarts(), AFTConstants.YYYYMMDDHHMMSS));
+			in.setReleaseEnd(DateUtils.parseDate(in.getReleaseEnds(), AFTConstants.YYYYMMDDHHMMSS));
+		} catch (ParseException e) {
+			e.printStackTrace();
+			throw new BusinessException("转换异常");
+		}
+		publicReleaseMapper.insertSelectiveGetId(in);
+		String openid=adminMapper.selectByOpeid(TokenManager.getAdminId());
+		asyncUtils.addWechatNotice(openid);
+		return 1;
+	}
+	
+	@Override
+	public int updatePublicRelease(InputPublicRelease in) {
+		try {
+			in.setReleaseStart(DateUtils.parseDate(in.getReleaseStarts(), AFTConstants.YYYYMMDDHHMMSS));
+			in.setReleaseEnd(DateUtils.parseDate(in.getReleaseEnds(), AFTConstants.YYYYMMDDHHMMSS));
+		} catch (ParseException e) {
+			e.printStackTrace();
+			throw new BusinessException("转换异常");
+		}
+		publicReleaseMapper.updateByPrimaryKeySelective(in);
+		return 1;
+	}
+
+	@SuppressWarnings("unchecked")
+	@Override
+	public Pagination<OutPublicReleaseList> listPublicRelease(InputPublicReleaseList in) {
+		Map<String,Object> map =new HashMap<String, Object>();
+		map.put("type", in.getType()==null?0:in.getType());
+		map.put("aid", TokenManager.getAdminId());
+		return (Pagination<OutPublicReleaseList>) findPage("listPublicRelease", "countPublicRelease", map, in.getPageNo(), in.getPageSize());
+	}
+
+	@Override
+	public int pushExaminePublicRelease(Integer id, Integer status, String remarks) {
+		PublicRelease p=new PublicRelease();
+		p.setId(id);
+		p.setStatus(status);
+		publicReleaseMapper.updateByPrimaryKeySelective(p);
+		PublicReleaseLog log=new PublicReleaseLog(id,TokenManager.getAdminId(),status,remarks,new Date());
+		publicReleaseLogMapper.insertSelective(log);
+		return 1;
+	}
+
+	@Override
+	public List<outPublicReleaseLog> listPublicReleaseLog(Integer id) {
+		return publicReleaseLogMapper.listPublicReleaseLog(id);
+	}
+
+	@Override
+	public int pushPublicReleaseClockIn(Integer id) {
+		PublicRelease p=new PublicRelease();
+		PublicRelease use=publicReleaseMapper.selectByPrimaryKey(id);
+		p.setId(id);
+		p.setClockIn(1);
+		p.setClockInTime(new Date());
+		publicReleaseMapper.updateByPrimaryKeySelective(p);
+		FollowBusinessBo fbb=new FollowBusinessBo();
+		fbb.setUid(use.getUid());
+		fbb.setContactType("0");
+		fbb.setResult(use.getRemarks());
+		fbb.setFollowTime(DateUtils.formatDate(use.getClockInTime(), AFTConstants.YYYYMMDDHHMMSS));
+		customerService.addFollow(fbb);
+		return 1;
+	}
+
+	
+
+
+}

+ 2 - 0
src/main/java/com/goafanti/common/dao/AdminMapper.java

@@ -201,5 +201,7 @@ public interface AdminMapper {
 	void getAllDep();
 
 	List<String> getAdminRoleListByAid(String id);
+
+	String selectByOpeid(String aid);
 	
 }

+ 47 - 0
src/main/java/com/goafanti/common/dao/PublicReleaseLogMapper.java

@@ -0,0 +1,47 @@
+package com.goafanti.common.dao;
+
+import java.util.List;
+
+import com.goafanti.admin.bo.outPublicReleaseLog;
+import com.goafanti.common.model.PublicReleaseLog;
+
+public interface PublicReleaseLogMapper {
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table public_release_log
+	 * @mbg.generated  Tue Jun 01 15:52:56 CST 2021
+	 */
+	int deleteByPrimaryKey(Integer id);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table public_release_log
+	 * @mbg.generated  Tue Jun 01 15:52:56 CST 2021
+	 */
+	int insert(PublicReleaseLog record);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table public_release_log
+	 * @mbg.generated  Tue Jun 01 15:52:56 CST 2021
+	 */
+	int insertSelective(PublicReleaseLog record);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table public_release_log
+	 * @mbg.generated  Tue Jun 01 15:52:56 CST 2021
+	 */
+	PublicReleaseLog selectByPrimaryKey(Integer id);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table public_release_log
+	 * @mbg.generated  Tue Jun 01 15:52:56 CST 2021
+	 */
+	int updateByPrimaryKeySelective(PublicReleaseLog record);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table public_release_log
+	 * @mbg.generated  Tue Jun 01 15:52:56 CST 2021
+	 */
+	int updateByPrimaryKey(PublicReleaseLog record);
+
+	List<outPublicReleaseLog> listPublicReleaseLog(Integer id);
+}

+ 64 - 0
src/main/java/com/goafanti/common/dao/PublicReleaseMapper.java

@@ -0,0 +1,64 @@
+package com.goafanti.common.dao;
+
+import com.goafanti.admin.bo.InputPublicRelease;
+import com.goafanti.common.model.PublicRelease;
+
+public interface PublicReleaseMapper {
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table public_release
+     *
+     * @mbg.generated Tue Jun 01 11:29:31 CST 2021
+     */
+    int deleteByPrimaryKey(Integer id);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table public_release
+     *
+     * @mbg.generated Tue Jun 01 11:29:31 CST 2021
+     */
+    int insert(PublicRelease record);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table public_release
+     *
+     * @mbg.generated Tue Jun 01 11:29:31 CST 2021
+     */
+    int insertSelective(PublicRelease record);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table public_release
+     *
+     * @mbg.generated Tue Jun 01 11:29:31 CST 2021
+     */
+    PublicRelease selectByPrimaryKey(Integer id);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table public_release
+     *
+     * @mbg.generated Tue Jun 01 11:29:31 CST 2021
+     */
+    int updateByPrimaryKeySelective(PublicRelease record);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table public_release
+     *
+     * @mbg.generated Tue Jun 01 11:29:31 CST 2021
+     */
+    int updateByPrimaryKeyWithBLOBs(PublicRelease record);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table public_release
+     *
+     * @mbg.generated Tue Jun 01 11:29:31 CST 2021
+     */
+    int updateByPrimaryKey(PublicRelease record);
+
+	void insertSelectiveGetId(PublicRelease in);
+}

+ 6 - 0
src/main/java/com/goafanti/common/mapper/AdminMapper.xml

@@ -23,6 +23,7 @@
     <result column="user_no" jdbcType="VARCHAR" property="userNo" />
     <result column="duty" jdbcType="VARCHAR" property="duty" />
     <result column="district" jdbcType="VARCHAR" property="district" />
+    <result column="open_id" jdbcType="VARCHAR" property="openId" />
     <result column="head_portrait_url" jdbcType="VARCHAR" property="headPortraitUrl" />
     <result column="contact_mobile" jdbcType="VARCHAR" property="contactMobile" />
     <result column="last_login_time" jdbcType="TIMESTAMP" property="lastLoginTime" />
@@ -1227,4 +1228,9 @@ select a.id,a.nickname as name,a.source,c.name contacts,c.mobile as contactMobil
 	left join role c on b.rid =c.id 
 	where a.id= #{id}
   </select>
+  
+  <select id="selectByOpeid" resultType="java.lang.String">
+  select b.open_id from admin a left join admin b on a.superior_id =b.id
+	where a.id= #{aid}
+  </select>
 </mapper>

+ 152 - 0
src/main/java/com/goafanti/common/mapper/PublicReleaseLogMapper.xml

@@ -0,0 +1,152 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.goafanti.common.dao.PublicReleaseLogMapper">
+  <resultMap id="BaseResultMap" type="com.goafanti.common.model.PublicReleaseLog">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Jun 01 15:52:56 CST 2021.
+    -->
+    <id column="id" jdbcType="INTEGER" property="id" />
+    <result column="prid" jdbcType="INTEGER" property="prid" />
+    <result column="aid" jdbcType="VARCHAR" property="aid" />
+    <result column="remarks" jdbcType="VARCHAR" property="remarks" />
+    <result column="status" jdbcType="INTEGER" property="status" />
+    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
+  </resultMap>
+  <sql id="Base_Column_List">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Jun 01 15:52:56 CST 2021.
+    -->
+    id, prid, aid, remarks, `status`, create_time
+  </sql>
+  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Jun 01 15:52:56 CST 2021.
+    -->
+    select 
+    <include refid="Base_Column_List" />
+    from public_release_log
+    where id = #{id,jdbcType=INTEGER}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Jun 01 15:52:56 CST 2021.
+    -->
+    delete from public_release_log
+    where id = #{id,jdbcType=INTEGER}
+  </delete>
+  <insert id="insert" parameterType="com.goafanti.common.model.PublicReleaseLog">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Jun 01 15:52:56 CST 2021.
+    -->
+    insert into public_release_log (id, prid, aid, 
+      remarks, `status`, create_time
+      )
+    values (#{id,jdbcType=INTEGER}, #{prid,jdbcType=INTEGER}, #{aid,jdbcType=VARCHAR}, 
+      #{remarks,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}
+      )
+  </insert>
+  <insert id="insertSelective" parameterType="com.goafanti.common.model.PublicReleaseLog">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Jun 01 15:52:56 CST 2021.
+    -->
+    insert into public_release_log
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        id,
+      </if>
+      <if test="prid != null">
+        prid,
+      </if>
+      <if test="aid != null">
+        aid,
+      </if>
+      <if test="remarks != null">
+        remarks,
+      </if>
+      <if test="status != null">
+        `status`,
+      </if>
+      <if test="createTime != null">
+        create_time,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=INTEGER},
+      </if>
+      <if test="prid != null">
+        #{prid,jdbcType=INTEGER},
+      </if>
+      <if test="aid != null">
+        #{aid,jdbcType=VARCHAR},
+      </if>
+      <if test="remarks != null">
+        #{remarks,jdbcType=VARCHAR},
+      </if>
+      <if test="status != null">
+        #{status,jdbcType=INTEGER},
+      </if>
+      <if test="createTime != null">
+        #{createTime,jdbcType=TIMESTAMP},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.PublicReleaseLog">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Jun 01 15:52:56 CST 2021.
+    -->
+    update public_release_log
+    <set>
+      <if test="prid != null">
+        prid = #{prid,jdbcType=INTEGER},
+      </if>
+      <if test="aid != null">
+        aid = #{aid,jdbcType=VARCHAR},
+      </if>
+      <if test="remarks != null">
+        remarks = #{remarks,jdbcType=VARCHAR},
+      </if>
+      <if test="status != null">
+        `status` = #{status,jdbcType=INTEGER},
+      </if>
+      <if test="createTime != null">
+        create_time = #{createTime,jdbcType=TIMESTAMP},
+      </if>
+    </set>
+    where id = #{id,jdbcType=INTEGER}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.PublicReleaseLog">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Jun 01 15:52:56 CST 2021.
+    -->
+    update public_release_log
+    set prid = #{prid,jdbcType=INTEGER},
+      aid = #{aid,jdbcType=VARCHAR},
+      remarks = #{remarks,jdbcType=VARCHAR},
+      `status` = #{status,jdbcType=INTEGER},
+      create_time = #{createTime,jdbcType=TIMESTAMP}
+    where id = #{id,jdbcType=INTEGER}
+  </update>
+  <select id="listPublicReleaseLog" resultType="com.goafanti.admin.bo.outPublicReleaseLog">
+  select a.id,a.aid ,a.prid ,a.remarks ,a.status ,b.name aname,
+	date_format(a.create_time ,'%Y-%m-%d %H:%i:%S') createTimes
+	from public_release_log a left join admin b on a.aid =b.id 
+	where a.prid = #{id}
+  </select>
+</mapper>

+ 455 - 0
src/main/java/com/goafanti/common/mapper/PublicReleaseMapper.xml

@@ -0,0 +1,455 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.goafanti.common.dao.PublicReleaseMapper">
+  <resultMap id="BaseResultMap" type="com.goafanti.common.model.PublicRelease">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Jun 01 11:29:31 CST 2021.
+    -->
+    <id column="id" jdbcType="INTEGER" property="id" />
+    <result column="uid" jdbcType="VARCHAR" property="uid" />
+    <result column="aid" jdbcType="VARCHAR" property="aid" />
+    <result column="release_start" jdbcType="TIMESTAMP" property="releaseStart" />
+    <result column="release_end" jdbcType="TIMESTAMP" property="releaseEnd" />
+    <result column="remarks" jdbcType="VARCHAR" property="remarks" />
+    <result column="user_name" jdbcType="VARCHAR" property="userName" />
+    <result column="longitude" jdbcType="VARCHAR" property="longitude" />
+    <result column="latitude" jdbcType="VARCHAR" property="latitude" />
+    <result column="status" jdbcType="INTEGER" property="status" />
+    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
+    <result column="clock_in" jdbcType="INTEGER" property="clockIn" />
+    <result column="clock_in_time" jdbcType="TIMESTAMP" property="clockInTime" />
+    <result column="pid" jdbcType="VARCHAR" property="pid" />
+    <result column="pname" jdbcType="VARCHAR" property="pname" />
+  </resultMap>
+  <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.goafanti.common.model.PublicRelease">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Jun 01 11:29:31 CST 2021.
+    -->
+    <result column="annex_url" jdbcType="LONGVARCHAR" property="annexUrl" />
+    <result column="photo_url" jdbcType="LONGVARCHAR" property="photoUrl" />
+  </resultMap>
+  <sql id="Base_Column_List">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Jun 01 11:29:31 CST 2021.
+    -->
+    id, `uid`, aid, release_start, release_end, remarks, user_name, longitude, latitude, 
+    `status`, create_time, clock_in, clock_in_time, pid, pname
+  </sql>
+  <sql id="Blob_Column_List">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Jun 01 11:29:31 CST 2021.
+    -->
+    annex_url, photo_url
+  </sql>
+  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="ResultMapWithBLOBs">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Jun 01 11:29:31 CST 2021.
+    -->
+    select 
+    <include refid="Base_Column_List" />
+    ,
+    <include refid="Blob_Column_List" />
+    from public_release
+    where id = #{id,jdbcType=INTEGER}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Jun 01 11:29:31 CST 2021.
+    -->
+    delete from public_release
+    where id = #{id,jdbcType=INTEGER}
+  </delete>
+  <insert id="insert" parameterType="com.goafanti.common.model.PublicRelease">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Jun 01 11:29:31 CST 2021.
+    -->
+    insert into public_release (id, `uid`, aid, 
+      release_start, release_end, remarks, 
+      user_name, longitude, latitude, 
+      `status`, create_time, clock_in, 
+      clock_in_time, pid, pname, 
+      annex_url, photo_url)
+    values (#{id,jdbcType=INTEGER}, #{uid,jdbcType=VARCHAR}, #{aid,jdbcType=VARCHAR}, 
+      #{releaseStart,jdbcType=TIMESTAMP}, #{releaseEnd,jdbcType=TIMESTAMP}, #{remarks,jdbcType=VARCHAR}, 
+      #{userName,jdbcType=VARCHAR}, #{longitude,jdbcType=VARCHAR}, #{latitude,jdbcType=VARCHAR}, 
+      #{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{clockIn,jdbcType=INTEGER}, 
+      #{clockInTime,jdbcType=TIMESTAMP}, #{pid,jdbcType=VARCHAR}, #{pname,jdbcType=VARCHAR}, 
+      #{annexUrl,jdbcType=LONGVARCHAR}, #{photoUrl,jdbcType=LONGVARCHAR})
+  </insert>
+  <insert id="insertSelective" parameterType="com.goafanti.common.model.PublicRelease">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Jun 01 11:29:31 CST 2021.
+    -->
+    insert into public_release
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        id,
+      </if>
+      <if test="uid != null">
+        `uid`,
+      </if>
+      <if test="aid != null">
+        aid,
+      </if>
+      <if test="releaseStart != null">
+        release_start,
+      </if>
+      <if test="releaseEnd != null">
+        release_end,
+      </if>
+      <if test="remarks != null">
+        remarks,
+      </if>
+      <if test="userName != null">
+        user_name,
+      </if>
+      <if test="longitude != null">
+        longitude,
+      </if>
+      <if test="latitude != null">
+        latitude,
+      </if>
+      <if test="status != null">
+        `status`,
+      </if>
+      <if test="createTime != null">
+        create_time,
+      </if>
+      <if test="clockIn != null">
+        clock_in,
+      </if>
+      <if test="clockInTime != null">
+        clock_in_time,
+      </if>
+      <if test="pid != null">
+        pid,
+      </if>
+      <if test="pname != null">
+        pname,
+      </if>
+      <if test="annexUrl != null">
+        annex_url,
+      </if>
+      <if test="photoUrl != null">
+        photo_url,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=INTEGER},
+      </if>
+      <if test="uid != null">
+        #{uid,jdbcType=VARCHAR},
+      </if>
+      <if test="aid != null">
+        #{aid,jdbcType=VARCHAR},
+      </if>
+      <if test="releaseStart != null">
+        #{releaseStart,jdbcType=TIMESTAMP},
+      </if>
+      <if test="releaseEnd != null">
+        #{releaseEnd,jdbcType=TIMESTAMP},
+      </if>
+      <if test="remarks != null">
+        #{remarks,jdbcType=VARCHAR},
+      </if>
+      <if test="userName != null">
+        #{userName,jdbcType=VARCHAR},
+      </if>
+      <if test="longitude != null">
+        #{longitude,jdbcType=VARCHAR},
+      </if>
+      <if test="latitude != null">
+        #{latitude,jdbcType=VARCHAR},
+      </if>
+      <if test="status != null">
+        #{status,jdbcType=INTEGER},
+      </if>
+      <if test="createTime != null">
+        #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="clockIn != null">
+        #{clockIn,jdbcType=INTEGER},
+      </if>
+      <if test="clockInTime != null">
+        #{clockInTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="pid != null">
+        #{pid,jdbcType=VARCHAR},
+      </if>
+      <if test="pname != null">
+        #{pname,jdbcType=VARCHAR},
+      </if>
+      <if test="annexUrl != null">
+        #{annexUrl,jdbcType=LONGVARCHAR},
+      </if>
+      <if test="photoUrl != null">
+        #{photoUrl,jdbcType=LONGVARCHAR},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.PublicRelease">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Jun 01 11:29:31 CST 2021.
+    -->
+    update public_release
+    <set>
+      <if test="uid != null">
+        `uid` = #{uid,jdbcType=VARCHAR},
+      </if>
+      <if test="aid != null">
+        aid = #{aid,jdbcType=VARCHAR},
+      </if>
+      <if test="releaseStart != null">
+        release_start = #{releaseStart,jdbcType=TIMESTAMP},
+      </if>
+      <if test="releaseEnd != null">
+        release_end = #{releaseEnd,jdbcType=TIMESTAMP},
+      </if>
+      <if test="remarks != null">
+        remarks = #{remarks,jdbcType=VARCHAR},
+      </if>
+      <if test="userName != null">
+        user_name = #{userName,jdbcType=VARCHAR},
+      </if>
+      <if test="longitude != null">
+        longitude = #{longitude,jdbcType=VARCHAR},
+      </if>
+      <if test="latitude != null">
+        latitude = #{latitude,jdbcType=VARCHAR},
+      </if>
+      <if test="status != null">
+        `status` = #{status,jdbcType=INTEGER},
+      </if>
+      <if test="createTime != null">
+        create_time = #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="clockIn != null">
+        clock_in = #{clockIn,jdbcType=INTEGER},
+      </if>
+      <if test="clockInTime != null">
+        clock_in_time = #{clockInTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="pid != null">
+        pid = #{pid,jdbcType=VARCHAR},
+      </if>
+      <if test="pname != null">
+        pname = #{pname,jdbcType=VARCHAR},
+      </if>
+      <if test="annexUrl != null">
+        annex_url = #{annexUrl,jdbcType=LONGVARCHAR},
+      </if>
+      <if test="photoUrl != null">
+        photo_url = #{photoUrl,jdbcType=LONGVARCHAR},
+      </if>
+    </set>
+    where id = #{id,jdbcType=INTEGER}
+  </update>
+  <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.goafanti.common.model.PublicRelease">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Jun 01 11:29:31 CST 2021.
+    -->
+    update public_release
+    set `uid` = #{uid,jdbcType=VARCHAR},
+      aid = #{aid,jdbcType=VARCHAR},
+      release_start = #{releaseStart,jdbcType=TIMESTAMP},
+      release_end = #{releaseEnd,jdbcType=TIMESTAMP},
+      remarks = #{remarks,jdbcType=VARCHAR},
+      user_name = #{userName,jdbcType=VARCHAR},
+      longitude = #{longitude,jdbcType=VARCHAR},
+      latitude = #{latitude,jdbcType=VARCHAR},
+      `status` = #{status,jdbcType=INTEGER},
+      create_time = #{createTime,jdbcType=TIMESTAMP},
+      clock_in = #{clockIn,jdbcType=INTEGER},
+      clock_in_time = #{clockInTime,jdbcType=TIMESTAMP},
+      pid = #{pid,jdbcType=VARCHAR},
+      pname = #{pname,jdbcType=VARCHAR},
+      annex_url = #{annexUrl,jdbcType=LONGVARCHAR},
+      photo_url = #{photoUrl,jdbcType=LONGVARCHAR}
+    where id = #{id,jdbcType=INTEGER}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.PublicRelease">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Jun 01 11:29:31 CST 2021.
+    -->
+    update public_release
+    set `uid` = #{uid,jdbcType=VARCHAR},
+      aid = #{aid,jdbcType=VARCHAR},
+      release_start = #{releaseStart,jdbcType=TIMESTAMP},
+      release_end = #{releaseEnd,jdbcType=TIMESTAMP},
+      remarks = #{remarks,jdbcType=VARCHAR},
+      user_name = #{userName,jdbcType=VARCHAR},
+      longitude = #{longitude,jdbcType=VARCHAR},
+      latitude = #{latitude,jdbcType=VARCHAR},
+      `status` = #{status,jdbcType=INTEGER},
+      create_time = #{createTime,jdbcType=TIMESTAMP},
+      clock_in = #{clockIn,jdbcType=INTEGER},
+      clock_in_time = #{clockInTime,jdbcType=TIMESTAMP},
+      pid = #{pid,jdbcType=VARCHAR},
+      pname = #{pname,jdbcType=VARCHAR}
+    where id = #{id,jdbcType=INTEGER}
+  </update>
+  
+   <insert id="insertSelectiveGetId" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.PublicRelease" useGeneratedKeys="true">
+   insert into public_release
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        id,
+      </if>
+      <if test="uid != null">
+        `uid`,
+      </if>
+      <if test="aid != null">
+        aid,
+      </if>
+      <if test="releaseStart != null">
+        release_start,
+      </if>
+      <if test="releaseEnd != null">
+        release_end,
+      </if>
+      <if test="remarks != null">
+        remarks,
+      </if>
+      <if test="userName != null">
+        user_name,
+      </if>
+      <if test="longitude != null">
+        longitude,
+      </if>
+      <if test="latitude != null">
+        latitude,
+      </if>
+      <if test="status != null">
+        `status`,
+      </if>
+      <if test="createTime != null">
+        create_time,
+      </if>
+      <if test="clockIn != null">
+        clock_in,
+      </if>
+      <if test="clockInTime != null">
+        clock_in_time,
+      </if>
+      <if test="pid != null">
+        pid,
+      </if>
+      <if test="pname != null">
+        pname,
+      </if>
+      <if test="annexUrl != null">
+        annex_url,
+      </if>
+      <if test="photoUrl != null">
+        photo_url,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=INTEGER},
+      </if>
+      <if test="uid != null">
+        #{uid,jdbcType=VARCHAR},
+      </if>
+      <if test="aid != null">
+        #{aid,jdbcType=VARCHAR},
+      </if>
+      <if test="releaseStart != null">
+        #{releaseStart,jdbcType=TIMESTAMP},
+      </if>
+      <if test="releaseEnd != null">
+        #{releaseEnd,jdbcType=TIMESTAMP},
+      </if>
+      <if test="remarks != null">
+        #{remarks,jdbcType=VARCHAR},
+      </if>
+      <if test="userName != null">
+        #{userName,jdbcType=VARCHAR},
+      </if>
+      <if test="longitude != null">
+        #{longitude,jdbcType=VARCHAR},
+      </if>
+      <if test="latitude != null">
+        #{latitude,jdbcType=VARCHAR},
+      </if>
+      <if test="status != null">
+        #{status,jdbcType=INTEGER},
+      </if>
+      <if test="createTime != null">
+        #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="clockIn != null">
+        #{clockIn,jdbcType=INTEGER},
+      </if>
+      <if test="clockInTime != null">
+        #{clockInTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="pid != null">
+        #{pid,jdbcType=VARCHAR},
+      </if>
+      <if test="pname != null">
+        #{pname,jdbcType=VARCHAR},
+      </if>
+      <if test="annexUrl != null">
+        #{annexUrl,jdbcType=LONGVARCHAR},
+      </if>
+      <if test="photoUrl != null">
+        #{photoUrl,jdbcType=LONGVARCHAR},
+      </if>
+    </trim>
+    <selectKey keyProperty="id" order="AFTER" resultType="int">
+        SELECT LAST_INSERT_ID()
+    </selectKey>
+  </insert>
+  
+  <select id="listPublicRelease" resultType="com.goafanti.admin.bo.OutPublicReleaseList">
+  select  a.id,b.nickname ,c.name  aname,date_format(a.release_start,'%Y-%m-%d %H:%i:%S') releaseStarts,a.user_name userName,
+date_format(a.release_end ,'%Y-%m-%d %H:%i:%S') releaseEnds,date_format(a.create_time ,'%Y-%m-%d %H:%i:%S') createTimes,a.status
+	from public_release a left join `user` b on a.uid =b.id left join admin c on a.aid =c.id
+	where 1=1
+	<if test="type==0">
+	and a.aid= #{aid} 
+	</if>
+	<if test="type==1">
+	and c.superior_id = #{aid}
+	</if>
+	order by a.status,a.create_time 
+  	<if test="page_sql!=null">
+			${page_sql}
+	</if>
+  </select>
+  <select id="countPublicRelease" resultType="java.lang.Integer">
+  select  count(*)
+	from public_release a  left join admin c on a.aid =c.id
+	where 1=1
+	<if test="type==0">
+	and a.aid= #{aid} 
+	</if>
+	<if test="type==1">
+	and c.superior_id = #{aid}
+	</if>
+  </select>
+</mapper>

+ 10 - 0
src/main/java/com/goafanti/common/model/Admin.java

@@ -93,6 +93,8 @@ public class Admin extends BaseModel implements AftUser {
 	 * 用户头像
 	 */
 	private String 				headPortraitUrl;	
+	
+	private String	openId;
 
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column admin.contact_mobile
@@ -304,4 +306,12 @@ public class Admin extends BaseModel implements AftUser {
 	public void setLastLoginTime(Date lastLoginTime) {
 		this.lastLoginTime = lastLoginTime;
 	}
+
+	public String getOpenId() {
+		return openId;
+	}
+
+	public void setOpenId(String openId) {
+		this.openId = openId;
+	}
 }

+ 609 - 0
src/main/java/com/goafanti/common/model/PublicRelease.java

@@ -0,0 +1,609 @@
+package com.goafanti.common.model;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class PublicRelease implements Serializable {
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column public_release.id
+     *
+     * @mbg.generated Tue Jun 01 11:29:31 CST 2021
+     */
+    private Integer id;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column public_release.uid
+     *
+     * @mbg.generated Tue Jun 01 11:29:31 CST 2021
+     */
+    private String uid;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column public_release.aid
+     *
+     * @mbg.generated Tue Jun 01 11:29:31 CST 2021
+     */
+    private String aid;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column public_release.release_start
+     *
+     * @mbg.generated Tue Jun 01 11:29:31 CST 2021
+     */
+    private Date releaseStart;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column public_release.release_end
+     *
+     * @mbg.generated Tue Jun 01 11:29:31 CST 2021
+     */
+    private Date releaseEnd;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column public_release.remarks
+     *
+     * @mbg.generated Tue Jun 01 11:29:31 CST 2021
+     */
+    private String remarks;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column public_release.user_name
+     *
+     * @mbg.generated Tue Jun 01 11:29:31 CST 2021
+     */
+    private String userName;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column public_release.longitude
+     *
+     * @mbg.generated Tue Jun 01 11:29:31 CST 2021
+     */
+    private String longitude;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column public_release.latitude
+     *
+     * @mbg.generated Tue Jun 01 11:29:31 CST 2021
+     */
+    private String latitude;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column public_release.status
+     *
+     * @mbg.generated Tue Jun 01 11:29:31 CST 2021
+     */
+    private Integer status;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column public_release.create_time
+     *
+     * @mbg.generated Tue Jun 01 11:29:31 CST 2021
+     */
+    private Date createTime;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column public_release.clock_in
+     *
+     * @mbg.generated Tue Jun 01 11:29:31 CST 2021
+     */
+    private Integer clockIn;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column public_release.clock_in_time
+     *
+     * @mbg.generated Tue Jun 01 11:29:31 CST 2021
+     */
+    private Date clockInTime;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column public_release.pid
+     *
+     * @mbg.generated Tue Jun 01 11:29:31 CST 2021
+     */
+    private String pid;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column public_release.pname
+     *
+     * @mbg.generated Tue Jun 01 11:29:31 CST 2021
+     */
+    private String pname;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column public_release.annex_url
+     *
+     * @mbg.generated Tue Jun 01 11:29:31 CST 2021
+     */
+    private String annexUrl;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column public_release.photo_url
+     *
+     * @mbg.generated Tue Jun 01 11:29:31 CST 2021
+     */
+    private String photoUrl;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table public_release
+     *
+     * @mbg.generated Tue Jun 01 11:29:31 CST 2021
+     */
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column public_release.id
+     *
+     * @return the value of public_release.id
+     *
+     * @mbg.generated Tue Jun 01 11:29:31 CST 2021
+     */
+    public Integer getId() {
+        return id;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column public_release.id
+     *
+     * @param id the value for public_release.id
+     *
+     * @mbg.generated Tue Jun 01 11:29:31 CST 2021
+     */
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column public_release.uid
+     *
+     * @return the value of public_release.uid
+     *
+     * @mbg.generated Tue Jun 01 11:29:31 CST 2021
+     */
+    public String getUid() {
+        return uid;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column public_release.uid
+     *
+     * @param uid the value for public_release.uid
+     *
+     * @mbg.generated Tue Jun 01 11:29:31 CST 2021
+     */
+    public void setUid(String uid) {
+        this.uid = uid == null ? null : uid.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column public_release.aid
+     *
+     * @return the value of public_release.aid
+     *
+     * @mbg.generated Tue Jun 01 11:29:31 CST 2021
+     */
+    public String getAid() {
+        return aid;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column public_release.aid
+     *
+     * @param aid the value for public_release.aid
+     *
+     * @mbg.generated Tue Jun 01 11:29:31 CST 2021
+     */
+    public void setAid(String aid) {
+        this.aid = aid == null ? null : aid.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column public_release.release_start
+     *
+     * @return the value of public_release.release_start
+     *
+     * @mbg.generated Tue Jun 01 11:29:31 CST 2021
+     */
+    public Date getReleaseStart() {
+        return releaseStart;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column public_release.release_start
+     *
+     * @param releaseStart the value for public_release.release_start
+     *
+     * @mbg.generated Tue Jun 01 11:29:31 CST 2021
+     */
+    public void setReleaseStart(Date releaseStart) {
+        this.releaseStart = releaseStart;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column public_release.release_end
+     *
+     * @return the value of public_release.release_end
+     *
+     * @mbg.generated Tue Jun 01 11:29:31 CST 2021
+     */
+    public Date getReleaseEnd() {
+        return releaseEnd;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column public_release.release_end
+     *
+     * @param releaseEnd the value for public_release.release_end
+     *
+     * @mbg.generated Tue Jun 01 11:29:31 CST 2021
+     */
+    public void setReleaseEnd(Date releaseEnd) {
+        this.releaseEnd = releaseEnd;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column public_release.remarks
+     *
+     * @return the value of public_release.remarks
+     *
+     * @mbg.generated Tue Jun 01 11:29:31 CST 2021
+     */
+    public String getRemarks() {
+        return remarks;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column public_release.remarks
+     *
+     * @param remarks the value for public_release.remarks
+     *
+     * @mbg.generated Tue Jun 01 11:29:31 CST 2021
+     */
+    public void setRemarks(String remarks) {
+        this.remarks = remarks == null ? null : remarks.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column public_release.user_name
+     *
+     * @return the value of public_release.user_name
+     *
+     * @mbg.generated Tue Jun 01 11:29:31 CST 2021
+     */
+    public String getUserName() {
+        return userName;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column public_release.user_name
+     *
+     * @param userName the value for public_release.user_name
+     *
+     * @mbg.generated Tue Jun 01 11:29:31 CST 2021
+     */
+    public void setUserName(String userName) {
+        this.userName = userName == null ? null : userName.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column public_release.longitude
+     *
+     * @return the value of public_release.longitude
+     *
+     * @mbg.generated Tue Jun 01 11:29:31 CST 2021
+     */
+    public String getLongitude() {
+        return longitude;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column public_release.longitude
+     *
+     * @param longitude the value for public_release.longitude
+     *
+     * @mbg.generated Tue Jun 01 11:29:31 CST 2021
+     */
+    public void setLongitude(String longitude) {
+        this.longitude = longitude == null ? null : longitude.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column public_release.latitude
+     *
+     * @return the value of public_release.latitude
+     *
+     * @mbg.generated Tue Jun 01 11:29:31 CST 2021
+     */
+    public String getLatitude() {
+        return latitude;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column public_release.latitude
+     *
+     * @param latitude the value for public_release.latitude
+     *
+     * @mbg.generated Tue Jun 01 11:29:31 CST 2021
+     */
+    public void setLatitude(String latitude) {
+        this.latitude = latitude == null ? null : latitude.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column public_release.status
+     *
+     * @return the value of public_release.status
+     *
+     * @mbg.generated Tue Jun 01 11:29:31 CST 2021
+     */
+    public Integer getStatus() {
+        return status;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column public_release.status
+     *
+     * @param status the value for public_release.status
+     *
+     * @mbg.generated Tue Jun 01 11:29:31 CST 2021
+     */
+    public void setStatus(Integer status) {
+        this.status = status;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column public_release.create_time
+     *
+     * @return the value of public_release.create_time
+     *
+     * @mbg.generated Tue Jun 01 11:29:31 CST 2021
+     */
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column public_release.create_time
+     *
+     * @param createTime the value for public_release.create_time
+     *
+     * @mbg.generated Tue Jun 01 11:29:31 CST 2021
+     */
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column public_release.clock_in
+     *
+     * @return the value of public_release.clock_in
+     *
+     * @mbg.generated Tue Jun 01 11:29:31 CST 2021
+     */
+    public Integer getClockIn() {
+        return clockIn;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column public_release.clock_in
+     *
+     * @param clockIn the value for public_release.clock_in
+     *
+     * @mbg.generated Tue Jun 01 11:29:31 CST 2021
+     */
+    public void setClockIn(Integer clockIn) {
+        this.clockIn = clockIn;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column public_release.clock_in_time
+     *
+     * @return the value of public_release.clock_in_time
+     *
+     * @mbg.generated Tue Jun 01 11:29:31 CST 2021
+     */
+    public Date getClockInTime() {
+        return clockInTime;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column public_release.clock_in_time
+     *
+     * @param clockInTime the value for public_release.clock_in_time
+     *
+     * @mbg.generated Tue Jun 01 11:29:31 CST 2021
+     */
+    public void setClockInTime(Date clockInTime) {
+        this.clockInTime = clockInTime;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column public_release.pid
+     *
+     * @return the value of public_release.pid
+     *
+     * @mbg.generated Tue Jun 01 11:29:31 CST 2021
+     */
+    public String getPid() {
+        return pid;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column public_release.pid
+     *
+     * @param pid the value for public_release.pid
+     *
+     * @mbg.generated Tue Jun 01 11:29:31 CST 2021
+     */
+    public void setPid(String pid) {
+        this.pid = pid == null ? null : pid.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column public_release.pname
+     *
+     * @return the value of public_release.pname
+     *
+     * @mbg.generated Tue Jun 01 11:29:31 CST 2021
+     */
+    public String getPname() {
+        return pname;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column public_release.pname
+     *
+     * @param pname the value for public_release.pname
+     *
+     * @mbg.generated Tue Jun 01 11:29:31 CST 2021
+     */
+    public void setPname(String pname) {
+        this.pname = pname == null ? null : pname.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column public_release.annex_url
+     *
+     * @return the value of public_release.annex_url
+     *
+     * @mbg.generated Tue Jun 01 11:29:31 CST 2021
+     */
+    public String getAnnexUrl() {
+        return annexUrl;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column public_release.annex_url
+     *
+     * @param annexUrl the value for public_release.annex_url
+     *
+     * @mbg.generated Tue Jun 01 11:29:31 CST 2021
+     */
+    public void setAnnexUrl(String annexUrl) {
+        this.annexUrl = annexUrl == null ? null : annexUrl.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column public_release.photo_url
+     *
+     * @return the value of public_release.photo_url
+     *
+     * @mbg.generated Tue Jun 01 11:29:31 CST 2021
+     */
+    public String getPhotoUrl() {
+        return photoUrl;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column public_release.photo_url
+     *
+     * @param photoUrl the value for public_release.photo_url
+     *
+     * @mbg.generated Tue Jun 01 11:29:31 CST 2021
+     */
+    public void setPhotoUrl(String photoUrl) {
+        this.photoUrl = photoUrl == null ? null : photoUrl.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table public_release
+     *
+     * @mbg.generated Tue Jun 01 11:29:31 CST 2021
+     */
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", id=").append(id);
+        sb.append(", uid=").append(uid);
+        sb.append(", aid=").append(aid);
+        sb.append(", releaseStart=").append(releaseStart);
+        sb.append(", releaseEnd=").append(releaseEnd);
+        sb.append(", remarks=").append(remarks);
+        sb.append(", userName=").append(userName);
+        sb.append(", longitude=").append(longitude);
+        sb.append(", latitude=").append(latitude);
+        sb.append(", status=").append(status);
+        sb.append(", createTime=").append(createTime);
+        sb.append(", clockIn=").append(clockIn);
+        sb.append(", clockInTime=").append(clockInTime);
+        sb.append(", pid=").append(pid);
+        sb.append(", pname=").append(pname);
+        sb.append(", annexUrl=").append(annexUrl);
+        sb.append(", photoUrl=").append(photoUrl);
+        sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 166 - 0
src/main/java/com/goafanti/common/model/PublicReleaseLog.java

@@ -0,0 +1,166 @@
+package com.goafanti.common.model;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class PublicReleaseLog implements Serializable {
+    /**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column public_release_log.id
+	 * @mbg.generated  Tue Jun 01 15:52:56 CST 2021
+	 */
+	private Integer id;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column public_release_log.prid
+	 * @mbg.generated  Tue Jun 01 15:52:56 CST 2021
+	 */
+	private Integer prid;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column public_release_log.aid
+	 * @mbg.generated  Tue Jun 01 15:52:56 CST 2021
+	 */
+	private String aid;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column public_release_log.remarks
+	 * @mbg.generated  Tue Jun 01 15:52:56 CST 2021
+	 */
+	private String remarks;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column public_release_log.status
+	 * @mbg.generated  Tue Jun 01 15:52:56 CST 2021
+	 */
+	private Integer status;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column public_release_log.create_time
+	 * @mbg.generated  Tue Jun 01 15:52:56 CST 2021
+	 */
+	private Date createTime;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database table public_release_log
+	 * @mbg.generated  Tue Jun 01 15:52:56 CST 2021
+	 */
+	private static final long serialVersionUID = 1L;
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column public_release_log.id
+	 * @return  the value of public_release_log.id
+	 * @mbg.generated  Tue Jun 01 15:52:56 CST 2021
+	 */
+	public Integer getId() {
+		return id;
+	}
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column public_release_log.id
+	 * @param id  the value for public_release_log.id
+	 * @mbg.generated  Tue Jun 01 15:52:56 CST 2021
+	 */
+	public void setId(Integer id) {
+		this.id = id;
+	}
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column public_release_log.prid
+	 * @return  the value of public_release_log.prid
+	 * @mbg.generated  Tue Jun 01 15:52:56 CST 2021
+	 */
+	public Integer getPrid() {
+		return prid;
+	}
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column public_release_log.prid
+	 * @param prid  the value for public_release_log.prid
+	 * @mbg.generated  Tue Jun 01 15:52:56 CST 2021
+	 */
+	public void setPrid(Integer prid) {
+		this.prid = prid;
+	}
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column public_release_log.aid
+	 * @return  the value of public_release_log.aid
+	 * @mbg.generated  Tue Jun 01 15:52:56 CST 2021
+	 */
+	public String getAid() {
+		return aid;
+	}
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column public_release_log.aid
+	 * @param aid  the value for public_release_log.aid
+	 * @mbg.generated  Tue Jun 01 15:52:56 CST 2021
+	 */
+	public void setAid(String aid) {
+		this.aid = aid == null ? null : aid.trim();
+	}
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column public_release_log.remarks
+	 * @return  the value of public_release_log.remarks
+	 * @mbg.generated  Tue Jun 01 15:52:56 CST 2021
+	 */
+	public String getRemarks() {
+		return remarks;
+	}
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column public_release_log.remarks
+	 * @param remarks  the value for public_release_log.remarks
+	 * @mbg.generated  Tue Jun 01 15:52:56 CST 2021
+	 */
+	public void setRemarks(String remarks) {
+		this.remarks = remarks == null ? null : remarks.trim();
+	}
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column public_release_log.status
+	 * @return  the value of public_release_log.status
+	 * @mbg.generated  Tue Jun 01 15:52:56 CST 2021
+	 */
+	public Integer getStatus() {
+		return status;
+	}
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column public_release_log.status
+	 * @param status  the value for public_release_log.status
+	 * @mbg.generated  Tue Jun 01 15:52:56 CST 2021
+	 */
+	public void setStatus(Integer status) {
+		this.status = status;
+	}
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column public_release_log.create_time
+	 * @return  the value of public_release_log.create_time
+	 * @mbg.generated  Tue Jun 01 15:52:56 CST 2021
+	 */
+	public Date getCreateTime() {
+		return createTime;
+	}
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column public_release_log.create_time
+	 * @param createTime  the value for public_release_log.create_time
+	 * @mbg.generated  Tue Jun 01 15:52:56 CST 2021
+	 */
+	public void setCreateTime(Date createTime) {
+		this.createTime = createTime;
+	}
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table public_release_log
+	 * @mbg.generated  Tue Jun 01 15:52:56 CST 2021
+	 */
+	@Override
+	public String toString() {
+		StringBuilder sb = new StringBuilder();
+		sb.append(getClass().getSimpleName());
+		sb.append(" [");
+		sb.append("Hash = ").append(hashCode());
+		sb.append(", id=").append(id);
+		sb.append(", prid=").append(prid);
+		sb.append(", aid=").append(aid);
+		sb.append(", remarks=").append(remarks);
+		sb.append(", status=").append(status);
+		sb.append(", createTime=").append(createTime);
+		sb.append(", serialVersionUID=").append(serialVersionUID);
+		sb.append("]");
+		return sb.toString();
+	}
+	public PublicReleaseLog() {}
+    public PublicReleaseLog(Integer id,String aid,Integer status, String remarks, Date date) {
+		this.prid=id;
+		this.aid=aid;
+		this.status=status;
+		this.remarks=remarks;
+		this.createTime=date;
+	}
+}

+ 54 - 0
src/main/java/com/goafanti/common/utils/AsyncUtils.java

@@ -1,24 +1,35 @@
 package com.goafanti.common.utils;
 
 import java.io.UnsupportedEncodingException;
+import java.util.Date;
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 
 import javax.mail.MessagingException;
 
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.scheduling.annotation.Async;
 import org.springframework.stereotype.Component;
 
+import com.alibaba.fastjson.JSONObject;
 import com.goafanti.common.bo.EmailBo;
 import com.goafanti.common.dao.NoticeMapper;
 import com.goafanti.common.enums.NoticeTypes;
+import com.goafanti.common.error.BusinessException;
 import com.goafanti.common.model.Notice;
+import com.goafanti.core.shiro.token.TokenManager;
 
 @Component
 @Async
 public class AsyncUtils {
 	@Autowired
 	private NoticeMapper noticeMapper;
+	@Value(value = "${wx.appId}")
+	private String appId;
+	@Value(value = "${wx.appSecret}")
+	private String appSecret;
 
 	
 	public void patentSend(EmailBo bo) throws UnsupportedEncodingException, MessagingException {
@@ -43,4 +54,47 @@ public class AsyncUtils {
 		noticeMapper.insertBatch(list);
 		
 	}
+
+
+	public void addWechatNotice(String openid) {
+		Map<String, Object> map=new HashMap<String, Object>();
+//		String accessToken=getAccessToken();
+//		map.put("accessToken", accessToken);
+		map.put("touser", openid);
+		Map<String, Object> we=new HashMap<String, Object>();
+		we.put("template_id", "Z630pmux5w-2ryn1MK3x6jZwZbxLV0_jdhOni6Wa_Yg");
+		we.put("page", "/index.html");
+		we.put("form_id", "/index.html");
+		we.put("form_id", "/index.html");
+		we.put("data", "/index.html");
+		we.put("emphasis_keyword", "/index.html");
+		
+		map.put("weapp_template_msg", we);
+		JSONObject json=HttpUtils.httpPost("https://api.weixin.qq.com/cgi-bin/message/wxopen/template/uniform_send?access_token=ACCESS_TOKEN", map);
+		
+	}
+	
+	  public String getAccessToken() {
+	    	String access_token=(String) TokenManager.getVal2Session("access_token");
+	    	String expires_in= (String) TokenManager.getVal2Session("expires_in");
+	    	if (access_token!=null&&expires_in!=null) {
+	    		expires_in=expires_in+7200;
+	    		if (new Date().getTime()<Long.valueOf(expires_in)) {
+	    			return access_token;
+				}
+			}
+			String url = String.format(
+					"https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=%s&secret=%s", appId,
+					appSecret);
+			JSONObject js = HttpUtils.httpGet(url);
+			String errcode =js.getString("errcode");
+			if (errcode!=null) {
+				throw new  BusinessException("获取AccessToekn失败!");
+			}
+			access_token = js.getString("access_token");
+			expires_in = js.getString("expires_in");
+			TokenManager.setVal2Session("access_token", access_token);
+			TokenManager.setVal2Session("expires_in", expires_in);
+			return access_token;
+	    }
 }

+ 83 - 0
src/main/java/com/goafanti/common/utils/HttpUtils.java

@@ -0,0 +1,83 @@
+package com.goafanti.common.utils;
+
+import java.io.IOException;
+import java.nio.charset.Charset;
+import java.util.Map;
+
+import org.apache.http.HttpResponse;
+import org.apache.http.HttpStatus;
+import org.apache.http.ParseException;
+import org.apache.http.client.ClientProtocolException;
+import org.apache.http.client.HttpClient;
+import org.apache.http.client.methods.HttpGet;
+import org.apache.http.client.methods.HttpPost;
+import org.apache.http.entity.StringEntity;
+import org.apache.http.impl.client.HttpClientBuilder;
+import org.apache.http.util.EntityUtils;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
+
+public class HttpUtils {
+	
+	
+	
+	 public static JSONObject httpGet(String url) {
+			JSONObject jsonResult = null;
+			try {
+			HttpClient client = HttpClientBuilder.create().build();//获取DefaultHttpClient请求
+			HttpGet request = new HttpGet(url);
+			HttpResponse response = client.execute(request);
+			if (response.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
+			String strResult = EntityUtils.toString(response.getEntity(),"UTF-8");//此处设定编码格式
+			jsonResult = JSON.parseObject(strResult);
+			} else {
+			LoggerUtils.error(HttpUtils.class,"HttpStatus异常");
+			}
+			} catch (IOException e) {
+			e.printStackTrace();
+			}
+			return jsonResult;
+		}
+	    
+		 /**
+		  *  
+		  * @param url 地址
+		  * @param map 参数
+		  * @return
+		  */
+		public static JSONObject httpPost(String url,Map<String, Object>map){
+			HttpClient httpClient = HttpClientBuilder.create().build();
+			HttpPost httpPost = new HttpPost(url);
+			httpPost.addHeader("Content-type", "application/json");
+			httpPost.setHeader("Accept", "application/json");
+			httpPost.setEntity(new StringEntity(JSON.toJSONString(map), Charset.forName("UTF-8")));
+			HttpResponse response = null;
+			try {
+				response = httpClient.execute(httpPost);
+			if (null == response || response.getStatusLine() == null) {
+				throw new Exception("Post Request For Url[{}] is not ok. Response is null");
+			} else if (response.getStatusLine().getStatusCode() != HttpStatus.SC_OK) {
+				throw new Exception("Post Request For Url[{}] is not ok. Response Status Code is {"+response.getStatusLine().getStatusCode()+"}");
+			}
+			} catch (ClientProtocolException e) {
+				e.printStackTrace();
+			} catch (IOException e) {
+				e.printStackTrace();
+			} catch (Exception e) {
+				e.printStackTrace();
+			}
+			String resultString=null;
+			try {
+				resultString = EntityUtils.toString(response.getEntity());
+			} catch (ParseException | IOException e) {
+				e.printStackTrace();
+			}
+			JSONObject jsonObj = JSONObject.parseObject(resultString);
+			return jsonObj;
+			}
+
+
+		
+
+}

+ 2 - 0
src/main/java/com/goafanti/customer/bo/FollowBusinessBo.java

@@ -1,5 +1,6 @@
 package com.goafanti.customer.bo;
 
+import java.util.Date;
 import java.util.List;
 
 /**
@@ -97,4 +98,5 @@ public class FollowBusinessBo {
 	public void setUserBusinessList(List<BusinessListBo> userBusinessList) {
 		this.userBusinessList = userBusinessList;
 	}
+	
 }

+ 1 - 1
src/main/java/com/goafanti/customer/service/impl/CustomerServiceImpl.java

@@ -655,7 +655,7 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 		// 判断是跟进还是签单
 		int x = 0;
 		// 检查客户锁定情况
-		if (fbb.getUserBusinessList().size() > 0) {
+		if (fbb.getUserBusinessList()!=null&&fbb.getUserBusinessList().size() > 0) {
 			boolean isUserOwner = false;
 			List<LockingReleaseBo> userLockedList = userMapper.selectLockedProject(fbb.getUid(),
 					TokenManager.getAdminId(), null, 0, UserLockReleaseStatus.LOCKED.getCode());

+ 8 - 6
src/main/resources/props/config_local.properties

@@ -1,13 +1,13 @@
 #Driver
 jdbc.driverClassName=com.mysql.jdbc.Driver
 #本地
-#jdbc.url=jdbc\:mysql://localhost:3306/aft?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false
-#jdbc.username=root
-#jdbc.password=123456
-#测试
-jdbc.url=jdbc:mysql://101.37.32.31:3306/aft?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false
+jdbc.url=jdbc\:mysql://localhost:3306/aft?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false
 jdbc.username=root
-jdbc.password=aftdev
+jdbc.password=123456
+#测试
+#jdbc.url=jdbc:mysql://101.37.32.31:3306/aft?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false
+#jdbc.username=root
+#jdbc.password=aftdev
 #\u68c0\u6d4b\u6570\u636e\u5e93\u94fe\u63a5\u662f\u5426\u6709\u6548\uff0c\u5fc5\u987b\u914d\u7f6e
 jdbc.validationQuery=SELECT 'x'
 #\u521d\u59cb\u8fde\u63a5\u6570
@@ -67,6 +67,8 @@ avatar.upload.host=//sb.jishutao.com/upload
 #static.host=//172.16.0.253/1.1.74
 #avatar.host=//172.16.0.253
 
+wx.appId=wxff2f5720ed7d7f63
+wx.appSecret=9c9912bdd381f2a412a23dd560c2f77e
 avatar.host=//static.jishutao.com
 static.host=//static.jishutao.com/1.1.74