xubh пре 5 година
родитељ
комит
be5ff799a8

+ 91 - 0
src/main/java/com/minpay/common/util/EmojiFilter.java

@@ -0,0 +1,91 @@
+package com.minpay.common.util;
+
+import org.apache.commons.lang.StringUtils;
+
+public class EmojiFilter {
+    public static boolean containsEmoji(String source) {
+        int len = source.length();
+        boolean isEmoji = false;
+        for (int i = 0; i < len; i++) {
+            char hs = source.charAt(i);
+            if (0xd800 <= hs && hs <= 0xdbff) {
+                if (source.length() > 1) {
+                    char ls = source.charAt(i + 1);
+                    int uc = ((hs - 0xd800) * 0x400) + (ls - 0xdc00) + 0x10000;
+                    if (0x1d000 <= uc && uc <= 0x1f77f) {
+                        return true;
+                    }
+                }
+            } else {
+                // non surrogate
+                if (0x2100 <= hs && hs <= 0x27ff && hs != 0x263b) {
+                    return true;
+                } else if (0x2B05 <= hs && hs <= 0x2b07) {
+                    return true;
+                } else if (0x2934 <= hs && hs <= 0x2935) {
+                    return true;
+                } else if (0x3297 <= hs && hs <= 0x3299) {
+                    return true;
+                } else if (hs == 0xa9 || hs == 0xae || hs == 0x303d
+                        || hs == 0x3030 || hs == 0x2b55 || hs == 0x2b1c
+                        || hs == 0x2b1b || hs == 0x2b50 || hs == 0x231a) {
+                    return true;
+                }
+                if (!isEmoji && source.length() > 1 && i < source.length() - 1) {
+                    char ls = source.charAt(i + 1);
+                    if (ls == 0x20e3) {
+                        return true;
+                    }
+                }
+            }
+        }
+        return isEmoji;
+    }
+
+    private static boolean isEmojiCharacter(char codePoint) {
+        return (codePoint == 0x0) || (codePoint == 0x9) || (codePoint == 0xA)
+                || (codePoint == 0xD)
+                || ((codePoint >= 0x20) && (codePoint <= 0xD7FF))
+                || ((codePoint >= 0xE000) && (codePoint <= 0xFFFD))
+                || ((codePoint >= 0x10000) && (codePoint <= 0x10FFFF));
+    }
+
+    /**
+     * 过滤emoji 或者 其他非文字类型的字符
+     * 
+     * @param source
+     * @return
+     */
+    public static String filterEmoji(String source) {
+        if (StringUtils.isBlank(source)) {
+            return source;
+        }
+        StringBuilder buf = null;
+        int len = source.length();
+        for (int i = 0; i < len; i++) {
+            char codePoint = source.charAt(i);
+            if (isEmojiCharacter(codePoint)) {
+                if (buf == null) {
+                    buf = new StringBuilder(source.length());
+                }
+                buf.append(codePoint);
+            }
+        }
+        if (buf == null) {
+            return source;
+        } else {
+            if (buf.length() == len) {
+                buf = null;
+                return source;
+            } else {
+                return buf.toString();
+            }
+        }
+    }
+    
+    public static void main(String[] args) {
+        String string = "��都嗨��、齐静��给你��";
+        System.out.println(EmojiFilter.containsEmoji(string));
+        System.out.println(EmojiFilter.filterEmoji(string));
+    }
+}

+ 97 - 0
src/main/java/com/minpay/db/table/mapper/VmPersonInfMapper.java

@@ -0,0 +1,97 @@
+package com.minpay.db.table.mapper;
+
+import com.minpay.db.table.model.VmPersonInf;
+import com.minpay.db.table.model.VmPersonInfExample;
+import com.startup.minpay.frame.jdbc.IMINMybatisEntityMapper;
+import java.util.List;
+import org.apache.ibatis.annotations.Param;
+
+public interface VmPersonInfMapper extends IMINMybatisEntityMapper<VmPersonInf, String, VmPersonInfExample> {
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table vm_person_inf
+     *
+     * @mbggenerated
+     */
+    int countByExample(VmPersonInfExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table vm_person_inf
+     *
+     * @mbggenerated
+     */
+    int deleteByExample(VmPersonInfExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table vm_person_inf
+     *
+     * @mbggenerated
+     */
+    int deleteByPrimaryKey(String id);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table vm_person_inf
+     *
+     * @mbggenerated
+     */
+    int insert(VmPersonInf record);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table vm_person_inf
+     *
+     * @mbggenerated
+     */
+    int insertSelective(VmPersonInf record);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table vm_person_inf
+     *
+     * @mbggenerated
+     */
+    List<VmPersonInf> selectByExample(VmPersonInfExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table vm_person_inf
+     *
+     * @mbggenerated
+     */
+    VmPersonInf selectByPrimaryKey(String id);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table vm_person_inf
+     *
+     * @mbggenerated
+     */
+    int updateByExampleSelective(@Param("record") VmPersonInf record, @Param("example") VmPersonInfExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table vm_person_inf
+     *
+     * @mbggenerated
+     */
+    int updateByExample(@Param("record") VmPersonInf record, @Param("example") VmPersonInfExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table vm_person_inf
+     *
+     * @mbggenerated
+     */
+    int updateByPrimaryKeySelective(VmPersonInf record);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table vm_person_inf
+     *
+     * @mbggenerated
+     */
+    int updateByPrimaryKey(VmPersonInf record);
+}

+ 485 - 0
src/main/java/com/minpay/db/table/model/VmPersonInf.java

@@ -0,0 +1,485 @@
+package com.minpay.db.table.model;
+
+import com.startup.minpay.frame.data.AbstractMINBean;
+
+public class VmPersonInf extends AbstractMINBean {
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column vm_person_inf.VCI_ID
+     *
+     * @mbggenerated
+     */
+    private String id;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column vm_person_inf.VCI_CHANNEL
+     *
+     * @mbggenerated
+     */
+    private String channel;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column vm_person_inf.VCI_NAME
+     *
+     * @mbggenerated
+     */
+    private String name;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column vm_person_inf.VCI_TYPE
+     *
+     * @mbggenerated
+     */
+    private String type;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column vm_person_inf.VCI_PHONE
+     *
+     * @mbggenerated
+     */
+    private String phone;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column vm_person_inf.VCI_OPENID
+     *
+     * @mbggenerated
+     */
+    private String openid;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column vm_person_inf.VCI_HEADPATH
+     *
+     * @mbggenerated
+     */
+    private String headpath;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column vm_person_inf.VCI_IS_USER
+     *
+     * @mbggenerated
+     */
+    private String isUser;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column vm_person_inf.VCI_USER_ID
+     *
+     * @mbggenerated
+     */
+    private String userId;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column vm_person_inf.VCI_CREATE_USER
+     *
+     * @mbggenerated
+     */
+    private String createUser;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column vm_person_inf.VCI_CREATE_TIME
+     *
+     * @mbggenerated
+     */
+    private String createTime;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column vm_person_inf.VCI_MODIFY_USER
+     *
+     * @mbggenerated
+     */
+    private String modifyUser;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column vm_person_inf.VCI_MODIFY_TIME
+     *
+     * @mbggenerated
+     */
+    private String modifyTime;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column vm_person_inf.VCI_STATUS
+     *
+     * @mbggenerated
+     */
+    private String status;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column vm_person_inf.VCI_ROLE
+     *
+     * @mbggenerated
+     */
+    private String role;
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column vm_person_inf.VCI_ID
+     *
+     * @return the value of vm_person_inf.VCI_ID
+     *
+     * @mbggenerated
+     */
+    public String getId() {
+        return id;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column vm_person_inf.VCI_ID
+     *
+     * @param id the value for vm_person_inf.VCI_ID
+     *
+     * @mbggenerated
+     */
+    public void setId(String id) {
+        this.id = id == null ? null : id.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column vm_person_inf.VCI_CHANNEL
+     *
+     * @return the value of vm_person_inf.VCI_CHANNEL
+     *
+     * @mbggenerated
+     */
+    public String getChannel() {
+        return channel;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column vm_person_inf.VCI_CHANNEL
+     *
+     * @param channel the value for vm_person_inf.VCI_CHANNEL
+     *
+     * @mbggenerated
+     */
+    public void setChannel(String channel) {
+        this.channel = channel == null ? null : channel.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column vm_person_inf.VCI_NAME
+     *
+     * @return the value of vm_person_inf.VCI_NAME
+     *
+     * @mbggenerated
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column vm_person_inf.VCI_NAME
+     *
+     * @param name the value for vm_person_inf.VCI_NAME
+     *
+     * @mbggenerated
+     */
+    public void setName(String name) {
+        this.name = name == null ? null : name.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column vm_person_inf.VCI_TYPE
+     *
+     * @return the value of vm_person_inf.VCI_TYPE
+     *
+     * @mbggenerated
+     */
+    public String getType() {
+        return type;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column vm_person_inf.VCI_TYPE
+     *
+     * @param type the value for vm_person_inf.VCI_TYPE
+     *
+     * @mbggenerated
+     */
+    public void setType(String type) {
+        this.type = type == null ? null : type.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column vm_person_inf.VCI_PHONE
+     *
+     * @return the value of vm_person_inf.VCI_PHONE
+     *
+     * @mbggenerated
+     */
+    public String getPhone() {
+        return phone;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column vm_person_inf.VCI_PHONE
+     *
+     * @param phone the value for vm_person_inf.VCI_PHONE
+     *
+     * @mbggenerated
+     */
+    public void setPhone(String phone) {
+        this.phone = phone == null ? null : phone.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column vm_person_inf.VCI_OPENID
+     *
+     * @return the value of vm_person_inf.VCI_OPENID
+     *
+     * @mbggenerated
+     */
+    public String getOpenid() {
+        return openid;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column vm_person_inf.VCI_OPENID
+     *
+     * @param openid the value for vm_person_inf.VCI_OPENID
+     *
+     * @mbggenerated
+     */
+    public void setOpenid(String openid) {
+        this.openid = openid == null ? null : openid.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column vm_person_inf.VCI_HEADPATH
+     *
+     * @return the value of vm_person_inf.VCI_HEADPATH
+     *
+     * @mbggenerated
+     */
+    public String getHeadpath() {
+        return headpath;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column vm_person_inf.VCI_HEADPATH
+     *
+     * @param headpath the value for vm_person_inf.VCI_HEADPATH
+     *
+     * @mbggenerated
+     */
+    public void setHeadpath(String headpath) {
+        this.headpath = headpath == null ? null : headpath.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column vm_person_inf.VCI_IS_USER
+     *
+     * @return the value of vm_person_inf.VCI_IS_USER
+     *
+     * @mbggenerated
+     */
+    public String getIsUser() {
+        return isUser;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column vm_person_inf.VCI_IS_USER
+     *
+     * @param isUser the value for vm_person_inf.VCI_IS_USER
+     *
+     * @mbggenerated
+     */
+    public void setIsUser(String isUser) {
+        this.isUser = isUser == null ? null : isUser.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column vm_person_inf.VCI_USER_ID
+     *
+     * @return the value of vm_person_inf.VCI_USER_ID
+     *
+     * @mbggenerated
+     */
+    public String getUserId() {
+        return userId;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column vm_person_inf.VCI_USER_ID
+     *
+     * @param userId the value for vm_person_inf.VCI_USER_ID
+     *
+     * @mbggenerated
+     */
+    public void setUserId(String userId) {
+        this.userId = userId == null ? null : userId.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column vm_person_inf.VCI_CREATE_USER
+     *
+     * @return the value of vm_person_inf.VCI_CREATE_USER
+     *
+     * @mbggenerated
+     */
+    public String getCreateUser() {
+        return createUser;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column vm_person_inf.VCI_CREATE_USER
+     *
+     * @param createUser the value for vm_person_inf.VCI_CREATE_USER
+     *
+     * @mbggenerated
+     */
+    public void setCreateUser(String createUser) {
+        this.createUser = createUser == null ? null : createUser.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column vm_person_inf.VCI_CREATE_TIME
+     *
+     * @return the value of vm_person_inf.VCI_CREATE_TIME
+     *
+     * @mbggenerated
+     */
+    public String getCreateTime() {
+        return createTime;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column vm_person_inf.VCI_CREATE_TIME
+     *
+     * @param createTime the value for vm_person_inf.VCI_CREATE_TIME
+     *
+     * @mbggenerated
+     */
+    public void setCreateTime(String createTime) {
+        this.createTime = createTime == null ? null : createTime.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column vm_person_inf.VCI_MODIFY_USER
+     *
+     * @return the value of vm_person_inf.VCI_MODIFY_USER
+     *
+     * @mbggenerated
+     */
+    public String getModifyUser() {
+        return modifyUser;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column vm_person_inf.VCI_MODIFY_USER
+     *
+     * @param modifyUser the value for vm_person_inf.VCI_MODIFY_USER
+     *
+     * @mbggenerated
+     */
+    public void setModifyUser(String modifyUser) {
+        this.modifyUser = modifyUser == null ? null : modifyUser.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column vm_person_inf.VCI_MODIFY_TIME
+     *
+     * @return the value of vm_person_inf.VCI_MODIFY_TIME
+     *
+     * @mbggenerated
+     */
+    public String getModifyTime() {
+        return modifyTime;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column vm_person_inf.VCI_MODIFY_TIME
+     *
+     * @param modifyTime the value for vm_person_inf.VCI_MODIFY_TIME
+     *
+     * @mbggenerated
+     */
+    public void setModifyTime(String modifyTime) {
+        this.modifyTime = modifyTime == null ? null : modifyTime.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column vm_person_inf.VCI_STATUS
+     *
+     * @return the value of vm_person_inf.VCI_STATUS
+     *
+     * @mbggenerated
+     */
+    public String getStatus() {
+        return status;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column vm_person_inf.VCI_STATUS
+     *
+     * @param status the value for vm_person_inf.VCI_STATUS
+     *
+     * @mbggenerated
+     */
+    public void setStatus(String status) {
+        this.status = status == null ? null : status.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column vm_person_inf.VCI_ROLE
+     *
+     * @return the value of vm_person_inf.VCI_ROLE
+     *
+     * @mbggenerated
+     */
+    public String getRole() {
+        return role;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column vm_person_inf.VCI_ROLE
+     *
+     * @param role the value for vm_person_inf.VCI_ROLE
+     *
+     * @mbggenerated
+     */
+    public void setRole(String role) {
+        this.role = role == null ? null : role.trim();
+    }
+}

Разлика између датотеке није приказан због своје велике величине
+ 1451 - 0
src/main/java/com/minpay/db/table/model/VmPersonInfExample.java


+ 15 - 0
src/main/java/com/minpay/db/table/own/mapper/PersonManageMapper.java

@@ -0,0 +1,15 @@
+package com.minpay.db.table.own.mapper;
+
+import java.util.List;
+import java.util.Map;
+
+import com.minpay.db.table.model.ImUser;
+import com.minpay.db.table.model.ImUserExample;
+import com.startup.minpay.frame.jdbc.IMINMybatisEntityMapper;
+import com.startup.minpay.frame.jdbc.MINRowBounds;
+
+public interface PersonManageMapper extends  IMINMybatisEntityMapper<ImUser, String, ImUserExample> {
+	
+	List<Map<String, String>> personQuery(Map<String, String> m, MINRowBounds row);
+	
+}

+ 1 - 0
src/main/java/com/minpay/huicai/system/action/UserManageAction.java

@@ -297,6 +297,7 @@ public class UserManageAction implements IMINAction {
 		user.setCertno(certno);
 		user.setBranchid(branchid);
 		user.setUserType(Constant.USER_TYPE_0);
+		user.setChannel("V01");
 		user.setCreatedate(new DateTime().toDateTimeString());
 		//String encryedPwd = Service.lookup(ISHA1CodingService.class).SHA1Coding(id + DEFAULT_PASSWORD);
 		String encryedPwd = SHA1.enCoded(id + DEFAULT_PASSWORD);

+ 271 - 0
src/main/java/com/minpay/shouhuo/PersManageAction.java

@@ -0,0 +1,271 @@
+package com.minpay.shouhuo;
+
+import com.minpay.common.bean.User;
+import com.minpay.common.constant.ServConstant;
+import com.minpay.common.format.IFormatService;
+import com.minpay.common.service.ILogService;
+import com.minpay.common.service.IPublicService;
+import com.minpay.common.util.CommonUtil;
+import com.minpay.common.util.DateUtil;
+import com.minpay.common.util.EmojiFilter;
+import com.minpay.common.util.HttpPostUtil;
+import com.minpay.db.table.mapper.VmPersonInfMapper;
+import com.minpay.db.table.model.VmPersonInf;
+import com.minpay.db.table.model.VmPersonInfExample;
+import com.minpay.db.table.own.mapper.PersonManageMapper;
+import com.minpay.db.table.own.mapper.SequenceMapper;
+import com.startup.minpay.frame.business.IMINAction;
+import com.startup.minpay.frame.business.MINHttpServletRequestContext;
+import com.startup.minpay.frame.business.res.MINActionResult;
+import com.startup.minpay.frame.constant.IMINBusinessConstant;
+import com.startup.minpay.frame.data.format.MINCopyFormat;
+import com.startup.minpay.frame.exception.MINBusinessException;
+import com.startup.minpay.frame.jdbc.MINRowBounds;
+import com.startup.minpay.frame.service.base.IMINDataBaseService;
+import com.startup.minpay.frame.service.base.Service;
+import com.startup.minpay.frame.session.MINSession;
+import com.startup.minpay.frame.target.MINAction;
+import com.startup.minpay.frame.target.MINComponent;
+import com.startup.minpay.frame.target.MINParam;
+import net.sf.json.JSONObject;
+
+import javax.servlet.http.HttpServletResponse;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 用户管理
+ * @author xbh
+ *
+ */
+@MINComponent
+public class PersManageAction implements IMINAction {
+	/**用户查询**/
+	public final static String	PERSON_QUERY = "personQuery";
+
+	/**管理员添加**/
+	public final static String	PERSON_ADD = "personAdd";
+
+	/**冻结**/
+	public final static String	PERSON_CANCELLATION = "personCancellation";
+	
+	/**解冻*/
+	private final static String	PERSON_THAW	= "personThaw";
+	
+	/**
+	 * 用户查询
+	 * @param page
+	 * @param limit
+	 * @param dates
+	 * @param perName
+	 * @param state
+	 * @param fapRequest
+	 * @return
+	 * @throws MINBusinessException
+	 */
+	@MINAction(value = PERSON_QUERY)
+	public MINActionResult personQuery(
+			@MINParam(key = "page", defaultValue = "1") int page,
+			@MINParam(key = "limit", defaultValue = "3") int limit,
+			@MINParam(key = "dates") String dates,
+			@MINParam(key = "perName") String perName,
+			@MINParam(key = "state") String state,
+			@MINParam(key = "roleid") String roleid,
+			MINSession session,
+			MINHttpServletRequestContext fapRequest
+			) throws MINBusinessException {
+		
+		MINActionResult res = new MINActionResult();
+		// 创建查询条件
+		Map<String, String> p = new HashMap<String, String>();
+		User u = session.getUser();
+		p.put("dates", dates);     		// 创建日期
+		p.put("perName", perName); 		//用户名称
+		p.put("state", state);     		//状态
+		p.put("channel", u.getChannel());//渠道
+		p.put("roleid", roleid);
+		MINRowBounds rows = new MINRowBounds(page, limit);
+		// 查询
+		List<Map<String, String>> ls = Service.lookup(IMINDataBaseService.class)
+				.getMybatisMapper(PersonManageMapper.class).personQuery(p,rows);
+		ls = Service.lookup(IFormatService.class).formatDateTime(ls, "createTime");
+		ls = Service.lookup(IFormatService.class).formatDateTime(ls, "modifyTime");
+		ls = new MINCopyFormat("{state:'stateDesc',channel:'channelDesc',type:'typeDesc',role:'roleDesc'}").format(ls);
+		ls = Service.lookup(IFormatService.class).formatEnum(ls, "{stateDesc:'PERSON_STATE',channelDesc:'PERSON_CHANNEL',typeDesc:'PERSON_TYPE',roleDesc:'USER_ROLE'}");
+		
+		// 设置返回值
+		res.set(IMINBusinessConstant.F_PAGING_LAY, ls);
+		res.set(IMINBusinessConstant.F_PAGING_COUNT, rows.getCount());
+		return res;
+	}
+	
+	
+	/**
+	 * 注销
+	 * @param session
+	 * @param id
+	 * @return
+	 * @throws MINBusinessException
+	 */
+	@MINAction(value = PERSON_CANCELLATION)
+	public MINActionResult personCancellation(
+			MINSession session,
+			@MINParam(key = "id") String id
+			) throws MINBusinessException {
+		//获取当前用户
+		User user = session.getUser();
+		MINActionResult res = new MINActionResult();
+		VmPersonInf   ps = new VmPersonInf();
+		  ps.setId(id);
+		  ps.setStatus("01");//冻结
+		  ps.setModifyTime(DateUtil.getCurrentDateTimeString());//修改时间
+		  ps.setModifyUser(session.getUser().getId());          //修改人
+		Service.lookup(IMINDataBaseService.class)
+				.getMybatisMapper(VmPersonInfMapper.class).updateByPrimaryKeySelective(ps);
+		String logInfo = "操作员:"+user.getName()+",注销用户,id:"+id;
+		Service.lookup(ILogService.class).logging(session, logInfo);
+		return res;
+	}
+	
+	/**
+	 * 解冻
+	 * @param session
+	 * @param id
+	 * @return
+	 * @throws MINBusinessException
+	 */
+	@MINAction(value = PERSON_THAW)
+	public MINActionResult personThaw(
+			MINSession session,
+			@MINParam(key = "id") String id
+			) throws MINBusinessException {
+		//获取当前用户
+		User user = session.getUser();
+		MINActionResult res = new MINActionResult();
+		VmPersonInf   ps = new VmPersonInf();
+		  ps.setId(id);
+		  ps.setStatus("00");//正常
+		  ps.setModifyTime(DateUtil.getCurrentDateTimeString());//修改时间
+		  ps.setModifyUser(session.getUser().getId());          //修改人
+		Service.lookup(IMINDataBaseService.class)
+				.getMybatisMapper(VmPersonInfMapper.class).updateByPrimaryKeySelective(ps);
+		String logInfo = "操作员:"+user.getName()+",解冻用户,id:"+id;
+		Service.lookup(ILogService.class).logging(session, logInfo);
+		return res;
+	}
+
+
+	@MINAction(value = PERSON_ADD)
+	public MINActionResult personAdd(
+			@MINParam(key = "code") String code,
+			@MINParam(key = "type") String type,
+			@MINParam(key = "channel") String channel,
+			@MINParam(key = "equNo") String equNo,
+			@MINParam(key = "version") String version,
+			HttpServletResponse response,
+			MINHttpServletRequestContext request
+	) throws MINBusinessException {
+		MINActionResult res = new MINActionResult();
+		VmPersonInf person = new VmPersonInf();
+		MINActionResult result = null;
+		String nowTime = DateUtil.getCurrentDateTimeString();
+		if("WX".equals(type)){
+			result = this.getWxPayOpenid(channel, code);
+		}else if("AL".equals(type)){
+			//result = this.getALiPayOpenid(channel, code);
+		}
+		if(CommonUtil.isEmpty((String) result.get("openId"))) {
+			throw new MINBusinessException("JA0001", "非法登录!");
+		}
+		VmPersonInfExample personex = new VmPersonInfExample();
+		personex.createCriteria().andChannelEqualTo(channel).andTypeEqualTo(type).andOpenidEqualTo((String) result.get("openId"));
+		List<VmPersonInf> perLst = Service.lookup(IMINDataBaseService.class).getMybatisMapper(VmPersonInfMapper.class).selectByExample(personex);
+		if(perLst.size() > 1 ){
+			throw new MINBusinessException("用户已存在!");
+		}
+
+		if(perLst.size() == 0) {
+			//获取用户主键
+			String perId = Service.lookup(IMINDataBaseService.class).getMybatisMapper(SequenceMapper.class).getSequence("VM_PERSON_INF_NO");
+			person.setId(perId);
+			person.setName((String) result.get("nickName"));
+			person.setHeadpath((String) result.get("headImgurl"));
+			person.setOpenid((String) result.get("openId"));
+			person.setStatus("00");//正常
+			person.setChannel(channel);
+			person.setIsUser("1");//是否商户0否1是
+			person.setPhone("00000000000");
+			person.setType(type);//类型:WX微信AL支付宝
+			person.setCreateUser(perId);
+			person.setCreateTime(nowTime);
+			person.setModifyUser(perId);
+			person.setModifyTime(nowTime);
+			Service.lookup(IMINDataBaseService.class).getMybatisMapper(VmPersonInfMapper.class).insertSelective(person);
+		}else{
+			VmPersonInf vmPersonInf = perLst.get(0);
+			if("0".equals(vmPersonInf.getIsUser())){
+				vmPersonInf.setIsUser("1");
+				Service.lookup(IMINDataBaseService.class).getMybatisMapper(VmPersonInfMapper.class).updateByPrimaryKeySelective(person);
+			}
+		}
+		return res;
+	}
+
+	/***
+	 * 微信用户授权,获取用户信息
+	 * @param code
+	 * @param channel
+	 * @return
+	 * @throws MINBusinessException
+	 */
+	private  MINActionResult getWxPayOpenid(String channel ,String code) throws MINBusinessException {
+		MINActionResult res = new MINActionResult();
+		//在微信的appId
+		String appId = Service.lookup(IPublicService.class).getSysParValue(channel + "_APP_ID");
+		//在微信的secret
+		String appSecret = Service.lookup(IPublicService.class).getSysParValue(channel + "_APP_SECRET");
+		//微信通用请求路径
+		String openUrl = "https://api.weixin.qq.com/sns/oauth2/access_token";
+		//配置参数
+		StringBuffer paramStr = new StringBuffer();
+		paramStr.append("appid=");
+		paramStr.append(appId);
+		paramStr.append("&secret=");
+		paramStr.append(appSecret);
+		paramStr.append("&code=");
+		paramStr.append(code);
+		paramStr.append("&grant_type=authorization_code");
+		try {
+			//发送请求
+			String jsonObj = HttpPostUtil.sendPost(openUrl, paramStr.toString());
+			JSONObject js = JSONObject.fromObject(jsonObj);
+			//获取openId
+			String openId = js.getString("openid");//用户唯一标识,请注意,在未关注公众号时,用户访问公众号的网页,也会产生一个用户和公众号唯一的OpenID
+			//微信通用请求路径
+			String openUrl2 = "https://api.weixin.qq.com/sns/userinfo";
+			//配置参数
+			StringBuffer paramStr2 = new StringBuffer();
+			paramStr2.append("access_token=");
+			paramStr2.append(js.getString("access_token"));
+			paramStr2.append("&openid=");
+			paramStr2.append(openId);
+			paramStr2.append("&lang=zh_CN");
+			//发送请求
+			String jsonObj2 = HttpPostUtil.sendPost(openUrl2, paramStr2.toString());
+			JSONObject js2 = JSONObject.fromObject(jsonObj2);
+			String nickName = EmojiFilter.filterEmoji(js2.getString("nickname"));
+//			String nickName = js2.getString("nickname");
+			String headImgurl = js2.getString("headimgurl");
+	    	res.set("openId", openId);
+	    	res.set("headImgurl", headImgurl);
+	    	res.set("nickName", nickName);
+
+		} catch (Exception e) {
+			throw new MINBusinessException("PAY10006", "微信获取openId失败!");
+		}
+		return res;
+	}
+
+
+}

+ 429 - 0
src/main/resources/com/minpay/db/table/mapper/VmPersonInfMapper.xml

@@ -0,0 +1,429 @@
+<?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.minpay.db.table.mapper.VmPersonInfMapper">
+  <resultMap id="BaseResultMap" type="com.minpay.db.table.model.VmPersonInf">
+    <!--
+      WARNING - @mbggenerated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    <id column="VCI_ID" jdbcType="VARCHAR" property="id" />
+    <result column="VCI_CHANNEL" jdbcType="VARCHAR" property="channel" />
+    <result column="VCI_NAME" jdbcType="VARCHAR" property="name" />
+    <result column="VCI_TYPE" jdbcType="CHAR" property="type" />
+    <result column="VCI_PHONE" jdbcType="VARCHAR" property="phone" />
+    <result column="VCI_OPENID" jdbcType="VARCHAR" property="openid" />
+    <result column="VCI_HEADPATH" jdbcType="VARCHAR" property="headpath" />
+    <result column="VCI_IS_USER" jdbcType="VARCHAR" property="isUser" />
+    <result column="VCI_USER_ID" jdbcType="VARCHAR" property="userId" />
+    <result column="VCI_CREATE_USER" jdbcType="VARCHAR" property="createUser" />
+    <result column="VCI_CREATE_TIME" jdbcType="VARCHAR" property="createTime" />
+    <result column="VCI_MODIFY_USER" jdbcType="VARCHAR" property="modifyUser" />
+    <result column="VCI_MODIFY_TIME" jdbcType="VARCHAR" property="modifyTime" />
+    <result column="VCI_STATUS" jdbcType="CHAR" property="status" />
+    <result column="VCI_ROLE" jdbcType="VARCHAR" property="role" />
+  </resultMap>
+  <sql id="Example_Where_Clause">
+    <!--
+      WARNING - @mbggenerated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    <where>
+      <foreach collection="oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Update_By_Example_Where_Clause">
+    <!--
+      WARNING - @mbggenerated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    <where>
+      <foreach collection="example.oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Base_Column_List">
+    <!--
+      WARNING - @mbggenerated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    VCI_ID, VCI_CHANNEL, VCI_NAME, VCI_TYPE, VCI_PHONE, VCI_OPENID, VCI_HEADPATH, VCI_IS_USER, 
+    VCI_USER_ID, VCI_CREATE_USER, VCI_CREATE_TIME, VCI_MODIFY_USER, VCI_MODIFY_TIME, 
+    VCI_STATUS, VCI_ROLE
+  </sql>
+  <select id="selectByExample" parameterType="com.minpay.db.table.model.VmPersonInfExample" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbggenerated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from vm_person_inf
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+  </select>
+  <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbggenerated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    select 
+    <include refid="Base_Column_List" />
+    from vm_person_inf
+    where VCI_ID = #{id,jdbcType=VARCHAR}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
+    <!--
+      WARNING - @mbggenerated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    delete from vm_person_inf
+    where VCI_ID = #{id,jdbcType=VARCHAR}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.minpay.db.table.model.VmPersonInfExample">
+    <!--
+      WARNING - @mbggenerated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    delete from vm_person_inf
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.minpay.db.table.model.VmPersonInf">
+    <!--
+      WARNING - @mbggenerated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    insert into vm_person_inf (VCI_ID, VCI_CHANNEL, VCI_NAME, 
+      VCI_TYPE, VCI_PHONE, VCI_OPENID, VCI_HEADPATH, 
+      VCI_IS_USER, VCI_USER_ID, VCI_CREATE_USER, 
+      VCI_CREATE_TIME, VCI_MODIFY_USER, VCI_MODIFY_TIME, 
+      VCI_STATUS, VCI_ROLE)
+    values (#{id,jdbcType=VARCHAR}, #{channel,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, 
+      #{type,jdbcType=CHAR}, #{phone,jdbcType=VARCHAR}, #{openid,jdbcType=VARCHAR}, #{headpath,jdbcType=VARCHAR}, 
+      #{isUser,jdbcType=VARCHAR}, #{userId,jdbcType=VARCHAR}, #{createUser,jdbcType=VARCHAR}, 
+      #{createTime,jdbcType=VARCHAR}, #{modifyUser,jdbcType=VARCHAR}, #{modifyTime,jdbcType=VARCHAR}, 
+      #{status,jdbcType=CHAR}, #{role,jdbcType=VARCHAR})
+  </insert>
+  <insert id="insertSelective" parameterType="com.minpay.db.table.model.VmPersonInf">
+    <!--
+      WARNING - @mbggenerated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    insert into vm_person_inf
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        VCI_ID,
+      </if>
+      <if test="channel != null">
+        VCI_CHANNEL,
+      </if>
+      <if test="name != null">
+        VCI_NAME,
+      </if>
+      <if test="type != null">
+        VCI_TYPE,
+      </if>
+      <if test="phone != null">
+        VCI_PHONE,
+      </if>
+      <if test="openid != null">
+        VCI_OPENID,
+      </if>
+      <if test="headpath != null">
+        VCI_HEADPATH,
+      </if>
+      <if test="isUser != null">
+        VCI_IS_USER,
+      </if>
+      <if test="userId != null">
+        VCI_USER_ID,
+      </if>
+      <if test="createUser != null">
+        VCI_CREATE_USER,
+      </if>
+      <if test="createTime != null">
+        VCI_CREATE_TIME,
+      </if>
+      <if test="modifyUser != null">
+        VCI_MODIFY_USER,
+      </if>
+      <if test="modifyTime != null">
+        VCI_MODIFY_TIME,
+      </if>
+      <if test="status != null">
+        VCI_STATUS,
+      </if>
+      <if test="role != null">
+        VCI_ROLE,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=VARCHAR},
+      </if>
+      <if test="channel != null">
+        #{channel,jdbcType=VARCHAR},
+      </if>
+      <if test="name != null">
+        #{name,jdbcType=VARCHAR},
+      </if>
+      <if test="type != null">
+        #{type,jdbcType=CHAR},
+      </if>
+      <if test="phone != null">
+        #{phone,jdbcType=VARCHAR},
+      </if>
+      <if test="openid != null">
+        #{openid,jdbcType=VARCHAR},
+      </if>
+      <if test="headpath != null">
+        #{headpath,jdbcType=VARCHAR},
+      </if>
+      <if test="isUser != null">
+        #{isUser,jdbcType=VARCHAR},
+      </if>
+      <if test="userId != null">
+        #{userId,jdbcType=VARCHAR},
+      </if>
+      <if test="createUser != null">
+        #{createUser,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null">
+        #{createTime,jdbcType=VARCHAR},
+      </if>
+      <if test="modifyUser != null">
+        #{modifyUser,jdbcType=VARCHAR},
+      </if>
+      <if test="modifyTime != null">
+        #{modifyTime,jdbcType=VARCHAR},
+      </if>
+      <if test="status != null">
+        #{status,jdbcType=CHAR},
+      </if>
+      <if test="role != null">
+        #{role,jdbcType=VARCHAR},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.minpay.db.table.model.VmPersonInfExample" resultType="java.lang.Integer">
+    <!--
+      WARNING - @mbggenerated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    select count(*) from vm_person_inf
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map">
+    <!--
+      WARNING - @mbggenerated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    update vm_person_inf
+    <set>
+      <if test="record.id != null">
+        VCI_ID = #{record.id,jdbcType=VARCHAR},
+      </if>
+      <if test="record.channel != null">
+        VCI_CHANNEL = #{record.channel,jdbcType=VARCHAR},
+      </if>
+      <if test="record.name != null">
+        VCI_NAME = #{record.name,jdbcType=VARCHAR},
+      </if>
+      <if test="record.type != null">
+        VCI_TYPE = #{record.type,jdbcType=CHAR},
+      </if>
+      <if test="record.phone != null">
+        VCI_PHONE = #{record.phone,jdbcType=VARCHAR},
+      </if>
+      <if test="record.openid != null">
+        VCI_OPENID = #{record.openid,jdbcType=VARCHAR},
+      </if>
+      <if test="record.headpath != null">
+        VCI_HEADPATH = #{record.headpath,jdbcType=VARCHAR},
+      </if>
+      <if test="record.isUser != null">
+        VCI_IS_USER = #{record.isUser,jdbcType=VARCHAR},
+      </if>
+      <if test="record.userId != null">
+        VCI_USER_ID = #{record.userId,jdbcType=VARCHAR},
+      </if>
+      <if test="record.createUser != null">
+        VCI_CREATE_USER = #{record.createUser,jdbcType=VARCHAR},
+      </if>
+      <if test="record.createTime != null">
+        VCI_CREATE_TIME = #{record.createTime,jdbcType=VARCHAR},
+      </if>
+      <if test="record.modifyUser != null">
+        VCI_MODIFY_USER = #{record.modifyUser,jdbcType=VARCHAR},
+      </if>
+      <if test="record.modifyTime != null">
+        VCI_MODIFY_TIME = #{record.modifyTime,jdbcType=VARCHAR},
+      </if>
+      <if test="record.status != null">
+        VCI_STATUS = #{record.status,jdbcType=CHAR},
+      </if>
+      <if test="record.role != null">
+        VCI_ROLE = #{record.role,jdbcType=VARCHAR},
+      </if>
+    </set>
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExample" parameterType="map">
+    <!--
+      WARNING - @mbggenerated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    update vm_person_inf
+    set VCI_ID = #{record.id,jdbcType=VARCHAR},
+      VCI_CHANNEL = #{record.channel,jdbcType=VARCHAR},
+      VCI_NAME = #{record.name,jdbcType=VARCHAR},
+      VCI_TYPE = #{record.type,jdbcType=CHAR},
+      VCI_PHONE = #{record.phone,jdbcType=VARCHAR},
+      VCI_OPENID = #{record.openid,jdbcType=VARCHAR},
+      VCI_HEADPATH = #{record.headpath,jdbcType=VARCHAR},
+      VCI_IS_USER = #{record.isUser,jdbcType=VARCHAR},
+      VCI_USER_ID = #{record.userId,jdbcType=VARCHAR},
+      VCI_CREATE_USER = #{record.createUser,jdbcType=VARCHAR},
+      VCI_CREATE_TIME = #{record.createTime,jdbcType=VARCHAR},
+      VCI_MODIFY_USER = #{record.modifyUser,jdbcType=VARCHAR},
+      VCI_MODIFY_TIME = #{record.modifyTime,jdbcType=VARCHAR},
+      VCI_STATUS = #{record.status,jdbcType=CHAR},
+      VCI_ROLE = #{record.role,jdbcType=VARCHAR}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.minpay.db.table.model.VmPersonInf">
+    <!--
+      WARNING - @mbggenerated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    update vm_person_inf
+    <set>
+      <if test="channel != null">
+        VCI_CHANNEL = #{channel,jdbcType=VARCHAR},
+      </if>
+      <if test="name != null">
+        VCI_NAME = #{name,jdbcType=VARCHAR},
+      </if>
+      <if test="type != null">
+        VCI_TYPE = #{type,jdbcType=CHAR},
+      </if>
+      <if test="phone != null">
+        VCI_PHONE = #{phone,jdbcType=VARCHAR},
+      </if>
+      <if test="openid != null">
+        VCI_OPENID = #{openid,jdbcType=VARCHAR},
+      </if>
+      <if test="headpath != null">
+        VCI_HEADPATH = #{headpath,jdbcType=VARCHAR},
+      </if>
+      <if test="isUser != null">
+        VCI_IS_USER = #{isUser,jdbcType=VARCHAR},
+      </if>
+      <if test="userId != null">
+        VCI_USER_ID = #{userId,jdbcType=VARCHAR},
+      </if>
+      <if test="createUser != null">
+        VCI_CREATE_USER = #{createUser,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null">
+        VCI_CREATE_TIME = #{createTime,jdbcType=VARCHAR},
+      </if>
+      <if test="modifyUser != null">
+        VCI_MODIFY_USER = #{modifyUser,jdbcType=VARCHAR},
+      </if>
+      <if test="modifyTime != null">
+        VCI_MODIFY_TIME = #{modifyTime,jdbcType=VARCHAR},
+      </if>
+      <if test="status != null">
+        VCI_STATUS = #{status,jdbcType=CHAR},
+      </if>
+      <if test="role != null">
+        VCI_ROLE = #{role,jdbcType=VARCHAR},
+      </if>
+    </set>
+    where VCI_ID = #{id,jdbcType=VARCHAR}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.minpay.db.table.model.VmPersonInf">
+    <!--
+      WARNING - @mbggenerated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    update vm_person_inf
+    set VCI_CHANNEL = #{channel,jdbcType=VARCHAR},
+      VCI_NAME = #{name,jdbcType=VARCHAR},
+      VCI_TYPE = #{type,jdbcType=CHAR},
+      VCI_PHONE = #{phone,jdbcType=VARCHAR},
+      VCI_OPENID = #{openid,jdbcType=VARCHAR},
+      VCI_HEADPATH = #{headpath,jdbcType=VARCHAR},
+      VCI_IS_USER = #{isUser,jdbcType=VARCHAR},
+      VCI_USER_ID = #{userId,jdbcType=VARCHAR},
+      VCI_CREATE_USER = #{createUser,jdbcType=VARCHAR},
+      VCI_CREATE_TIME = #{createTime,jdbcType=VARCHAR},
+      VCI_MODIFY_USER = #{modifyUser,jdbcType=VARCHAR},
+      VCI_MODIFY_TIME = #{modifyTime,jdbcType=VARCHAR},
+      VCI_STATUS = #{status,jdbcType=CHAR},
+      VCI_ROLE = #{role,jdbcType=VARCHAR}
+    where VCI_ID = #{id,jdbcType=VARCHAR}
+  </update>
+</mapper>

+ 43 - 0
src/main/resources/com/minpay/db/table/own/mapper/PersonManageMapper.xml

@@ -0,0 +1,43 @@
+<?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.minpay.db.table.own.mapper.PersonManageMapper">
+	<select id="personQuery" resultType="hashmap" parameterType="java.lang.String">
+		SELECT
+			         per.VCI_ID    			"id",
+			         per.VCI_CHANNEL    	"channel",
+			         per.VCI_NAME       	"perName",
+			         per.VCI_TYPE       	"type",
+			         per.VCI_PHONE          "phone",
+			         per.VCI_OPENID     	"openId",
+			         per.VCI_STATUS     	"state",
+			         per.VCI_CREATE_TIME    "createTime",
+			         per.VCI_MODIFY_TIME    "modifyTime",
+			         u.USR_NAME             "createUser",
+			         e.USR_NAME             "modifyUser",
+					per.VCI_ROLE             "role"
+		  FROM  vm_person_inf  per
+		  left  join im_user    u
+		  on    u.USR_ID = per.VCI_CREATE_USER
+		  left  join im_user    e
+		  on    e.USR_ID = per.VCI_MODIFY_USER
+		  where 1=1 
+		  <if test="perName!=null  and perName != ''">
+	     	and   (per.VCI_NAME  like  concat('%', #{perName,jdbcType=VARCHAR},'%'))
+	   		</if>
+		 <if test="state!=null  and state != ''">
+	     	and   (per.VCI_STATUS =  #{state,jdbcType=VARCHAR})
+	   	 	</if>
+	   	 <if test="channel!=null  and channel != ''">
+	     	and   (per.VCI_CHANNEL =  #{channel,jdbcType=VARCHAR})
+	   	 	</if>
+		<if test="roleid!=null  and roleid != ''">
+			and   (per.VCI_ROLE  =  #{roleid,jdbcType=VARCHAR})
+		</if>
+	   	 <if test="dates!=null  and dates != ''">
+	     	and substr(per.VCI_CREATE_TIME ,1,8) between substr((#{dates,jdbcType=VARCHAR}),1,8)
+	       		and substr((#{dates,jdbcType=VARCHAR}),12,19)
+	   	 	</if>	
+		  order by per.VCI_CREATE_TIME desc
+	</select>
+	
+</mapper>

+ 37 - 0
src/main/webapp/admin/wxuserManage/addUserwx.html

@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="utf-8">
+    <title>增加操作员</title>
+    <meta name="renderer" content="webkit">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
+</head>
+<script>
+</script>
+<body class="content">
+    <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
+    </fieldset>
+    <form class="layui-form" action="">
+		<div style="padding-bottom:60px; ">
+			<div class="layui-form-item">
+				<label class="layui-form-label">单选框</label>
+				<div class="layui-input-block">
+					<input type="radio" name="role" value="00" title="补货员" checked="">
+					<input type="radio" name="role" value="01" title="电机检测员">
+					<input type="radio" name="role" value="02" title="核账员">
+				</div>
+			</div>
+		</div>
+    </form>
+    <script src="../../js/min-loader-next.js"></script>
+    <script>
+		layui.use(['form', 'layedit', 'laydate'], function() {
+			var form = layui.form
+					, layer = layui.layer
+					, layedit = layui.layedit
+					, laydate = layui.laydate;
+		})
+    </script>
+</body>
+</html>

+ 185 - 0
src/main/webapp/admin/wxuserManage/editUser.html

@@ -0,0 +1,185 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="utf-8">
+    <title>编辑用户</title>
+    <meta name="renderer" content="webkit">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
+</head>
+<body class="content">
+    <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
+    </fieldset>
+<form class="layui-form" action="">
+	<div style="padding-bottom:60px; ">
+		<div class="layui-form-item" style="display: none">
+            <label class="layui-form-label" style = "width: 150px;">ID:</label>
+            <div class="layui-input-block">
+                <input type="text" id = "editid" name="id" lay-verify="title" autocomplete="off"class="layui-input" >
+            </div>
+        </div>
+        <div class="layui-form-item">
+         	<div class="layui-inline">
+	            <label class="layui-form-label" style = "width: 150px;">登录名:</label>
+	            <div class="layui-input-inline">
+	                <input type="tel" name="logonname"id="editlogonname"autocomplete="off" lay-verify="logonname"  class="layui-input" disabled>
+	            </div>
+            </div>
+        </div>
+        <div class="layui-form-item">
+	         <div class="layui-inline">
+	         	<label class="layui-form-label" style = "width: 150px;">姓名:</label>
+	     		<div class="layui-input-inline">
+	                <input type="tel" name="name" id="editname"autocomplete="off" maxlength="20"  lay-verify="name"  class="layui-input">
+	            </div>
+	       </div>
+      	</div>
+        <div class="layui-form-item">
+            <label class="layui-form-label" style = "width: 150px;">所属角色:</label>
+            <div class="layui-input-inline" id ="zcySelect">
+           	</div>
+        </div>
+		<div class="layui-form-item">
+            <label class="layui-form-label" style = "width: 150px;">状态:</label>
+            <div class="layui-input-inline" id ="stt">
+           	</div>
+        </div>
+        <div class="layui-form-item">
+            <div class="layui-inline">
+                <label class="layui-form-label" style = "width: 150px;">手机号:</label>
+                <div class="layui-input-inline">
+                    <input  type="tel" name="phone" maxlength="11" lay-verify="phone" id="editphone"autocomplete="off" class="layui-input">
+                </div>
+            </div>
+        </div>
+        <div class="layui-form-item">
+            <label class="layui-form-label" style = "width: 150px;">地址:</label>
+          	<div class="layui-input-inline">
+                <input type="tel" name="address" lay-verify="address" maxlength="60" id="editaddress" autocomplete="off" placeholder="" class="layui-input">
+            </div>
+        </div>
+        <div class="layui-form-item box-button" >
+            <div class="layui-input-block">
+                <button class="layui-btn" lay-submit="" lay-filter="demo1">提交</button>
+          		<button  class="layui-btn"  id="cancel" onclick = "testNewPage()">取消</button>
+            </div>
+        </div>
+    </div>
+</form>
+    <script src="../../js/min-loader-next.js"></script>
+    <script>
+	    function testNewPage() {
+			// 打开新增页面
+			deleteTabPage('315002-02');
+		}
+    	//反现
+       layui.use('form', function(){
+    	    var rowData = layui.sessionData("ROW_DATA").NOW_ROW;
+    	    var roleid ;
+    	    var editaddress ;
+    	    layui.each(rowData, function(index, item){ 
+    	    	if(index=="stt"){
+    	    		 initSelect('stt', "IM_USER_STATE", "stt", item, true);
+    	    	}
+    	    	if(index=="roleid"){
+    	    		roleid = item;
+    	    	}
+				if(index=="identity"){
+    	    		initSelect('isCustManage', "IS_SUSTOMER_MANAGER", "isCustManage", item, true);
+	   	    	}
+    	    	$("#edit"+index+"").val(item);
+    	    })
+	    	var form = layui.form; //只有执行了这一步,部分表单元素才会自动修饰成功
+	    	$.request({
+				action : '../../RoleManageAction/roleQueryByBranchId',
+				data : {id : rowData.branchid},
+				success : function(data) {
+					var selectName ="roleid";
+					var html = '<select name="';
+					html = html + selectName;
+					html = html + '" lay-filter="';
+					html = html + '"';
+					html = html + 'lay-search=""';
+					html = html + '>';
+					$.each(data.MINQueryResult, function(i, j) {
+					      if( j.id == roleid){
+					    	  html = html + '<option ';
+							  html = html + 'selected value="';
+						      html = html + j.id + '">';
+						      html = html + j.name+ '</option>';
+					      }else{
+					    	  html = html + '<option ';
+							  html = html + 'value="';
+						      html = html + j.id + '">';
+						      html = html + j.name+ '</option>';
+					      }
+					}) 
+					html = html + '</select>';
+					$("#zcySelect").html(html);
+					  form.render();
+				},
+			});	
+    	});  
+
+    layui.use(['form', 'layedit', 'laydate'], function() {
+            var form = layui.form,
+                layer = layui.layer,
+                layedit = layui.layedit,
+                laydate = layui.laydate;
+
+          //创建一个编辑器
+          var editIndex = layedit.build('LAY_demo_editor');
+          //自定义验证规则
+          form.verify({
+            	logonname: function(value) {
+                    if (isEmpty(value)) {
+                 		return   '用户名不能为空!';
+                 	} 
+                },
+                name: function(valueb) {
+                    if (isEmpty(valueb)) {
+                 		return   '姓名不能为空!';
+                 	} 
+                },
+                stt: function(valuec) {
+                    if (isEmpty(valuec)) {
+                 		return   '请选择状态!';
+                 	} 
+                },
+				isCustManage: function(valuec) {
+                    if (isEmpty(valuec)) {
+                 		return   '请选择是否客户经理!';
+                 	} 
+                },
+                phone: function(value) {
+            		if(isEmpty(value)){
+    		    		return '请输入联系人手机号!';
+                    }
+                    if(!new RegExp("^1[0-9]{10}$").test(value)){
+    		    		return '联系人电话格式不正确!';
+                    }
+                }
+            });
+    		//监听提交
+            form.on('submit(demo1)', function(data) {
+            	console.log(data);
+              $.request({
+					action : '../../UserManageAction/userModify',
+					data :  data.field ,
+					success : function(data) {
+						 layer.alert('操作成功!',  function(){
+// 							 window.parent.location.reload(); 
+// 			                 parent. layer.close(layer.index);  
+			                 deleteTabPage('315002-02');
+						}); 	
+					},
+					error : function(data) {
+						 $.ErrorAlert(data.msg);
+					}
+				});	
+                return false;
+            });
+      });
+    </script>
+</body>
+</html>

+ 286 - 0
src/main/webapp/admin/wxuserManage/wxuserManage.html

@@ -0,0 +1,286 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="utf-8">
+    <title>操作员管理</title>
+    <script src="../../js/min-loader-next.js"></script>
+</head>
+<body class="content">
+    <div class="order-body">
+	<div class="order-tiaojian back-gray">
+			<div class="tiaojian-part1" id = "conditions">
+				<div class="fl f12-gray4-op mt4">所选条件:</div>
+			</div>
+			<div class="tiaojian-part2 fr  demoTable">
+				<button class="layui-btn order-bnt1"  data-type="reload" >搜索</button>
+				<button class="layui-btn  order-bnt2" data-type="reset">重置</button>
+				<button class="layui-btn order-bnt2" id = "addUser">添加</button>
+				<a href="#" id="toggle" class="top">收起</a>
+			</div>
+		</div>
+		<form class="layui-form"  action="javascript:void(0)"  id = "formName">
+			<div class="order-select back-border" id="content">
+				<div class="layui-inline">
+					<label class="f12-gray4">用户名:</label>
+					<input onchange = "changeSelectCon(0,this,'inp')" class="search-select" type="tel" name="perName" id ="perName" value="" placeholder="请输入用户名" />
+				</div>
+				<div class="layui-inline">
+					<label class="f12-gray4">角色:</label>
+					<div class=""  style="display:inline-block" id = 'roleid'></div>
+				</div>
+			</div>
+		</form>
+				
+	</div>
+	
+	<div class="shadow-content" style="margin:1.5rem;">
+			<table id="userManage" lay-filter="tableFilter"></table>
+	</div>
+    
+    
+    <!--操作功能-->
+    <script type="text/html" id="barDemo">
+      	<a class="layui-btn layui-btn-xs" lay-event="detail">查看</a>
+		{{#  if(d.state == '01'){ }}
+		<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="enable">解冻</a>
+		{{#  }; }}
+		{{#  if(d.state == '00'){ }}
+	     	<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">冻结</a>
+	    {{#  }; }}
+
+   </script>
+<script>
+	$("#toggle").click(function() {
+		$(this).html($("#content").is(":hidden") ? "收起" + "<i class='iconfont up iconSelect_drop-down'/></i>" : "展开" +
+			"<i class='iconfont up iconSelect_drop-down'/></i>");
+		$("#content").slideToggle();
+	});
+	layui.use(['table','laydate','form'], function(){
+		var laydate = layui.laydate;
+		form = layui.form;
+
+		initSelect('roleid', "USER_ROLE", "roleid", ' ', true);
+		form.on('select(roleid)', function(data){
+			changeSelectCon(1, data.elem, "sel","roleid");
+		});
+		 form.render();
+	})
+
+	var table;
+	layui.use('table', function(){
+		table = layui.table;
+		table.render({
+			//tbname:'userManage',
+			id : 'userManage'
+		    ,elem: '#userManage'
+		    ,limit:10
+		    ,url: 'PersManageAction/personQuery' //数据接口
+		    ,method: 'post'
+		    ,where:{MINView:"JSON", token: 'sasasas'}
+		    ,page: true //开启分页
+		    ,cols: [[ //表头
+			{type:'numbers',title: '序号',width:"5%"}
+			, {field: 'id', title: '用户编号', width:"10%", sort: true}
+			,{field: 'perName', title: '微信号', width:"12%"}
+			,{field: 'channelDesc', title: '渠道', width:"9%"}
+			,{field: 'roleDesc', title: '角色', width:"12%"}
+			,{field: 'createTime', title: '创建时间',width:"16%"}
+			,{field: 'stateDesc', title: '状态',width:"16%"}
+			,{field: 'operate', title: '操作',width:"12%", toolbar: '#barDemo', fixed: 'right'}
+		]]
+		    ,done: function(res, curr, count){
+		        //如果是异步请求数据方式,res即为你接口返回的信息。
+		        console.log(res);
+		        //得到当前页码
+		        console.log(curr); 
+		        //得到数据总量
+		        console.log(count);
+		      }
+		    ,even: true //开启隔行背景
+		  });
+		  
+		 // 监听工具条(操作)
+		 table.on('tool(tableFilter)', function(obj){ //注:tool是工具条事件名,tableFilter是table原始容器的属性 lay-filter="对应的值"
+			var data = obj.data; //获得当前行数据
+		    var layEvent = obj.event; //获得 lay-event 对应的值(也可以是表头的 event 参数对应的值)
+		    var tr = obj.tr; //获得当前行 tr 的DOM对象
+		    var id = data.id;
+		    if(layEvent == 'detail'){ //查看
+		    	showDetail(data);
+		    } else if(layEvent == 'del'){ //删除
+				layer.confirm('真的要冻结吗', function(index){
+			    	$.request({
+						action : '../../PersManageAction/personCancellation',
+						data : {
+							id : id //用户名
+						},
+						success : function(data) {
+							 //成功后刷新
+							 var btn=$(".layui-laypage-btn")[0];
+							 btn.click();
+							 layer.alert('操作成功!', {
+									icon: 6,
+									title: "提示"
+							}); 	
+						},
+						error : function(data) {
+							 layer.alert('操作失败!', {
+								icon: 5,
+								title: "提示"
+							}); 
+						}
+					});	
+		      	});
+			} else if(layEvent =='enable'){
+				layer.confirm('确定要解冻吗?', function(index){
+					$.request({
+						action : '../../PersManageAction/personThaw',
+						data : {
+							id : id,
+							state : '0'
+						},
+						success : function(data) {
+							//成功后刷新
+							$(".layui-laypage-btn")[0].click();
+							 layer.alert('操作成功!', {
+									icon: 6,
+									title: "提示"
+							}); 	
+						},
+						error : function(data) {
+							 layer.alert(data.MINErrorMessage, {
+								icon: 5,
+								title: "提示"
+							}); 
+						}
+					});
+				});
+			}
+		});
+		var $ = layui.$, active = {
+ 		    reload: function(){
+ 		    	reLoadFun();
+ 		    }
+ 		    ,reset: function(){
+ 		    	$('#formName')[0].reset();
+				$("#conditions").html('<div class="fl f12-gray4-op mt4">所选条件:</div>');
+ 		    }
+	 	};
+		$('.layui-btn').on('click', function(){
+		  	var type = $(this).data('type');
+		  	active[type] ? active[type].call(this) : '';
+		});
+	});
+	
+	function reLoadFun() {
+    	var perName = $('#perName').val();
+    	var roleid = $("select[name='roleid']").val();
+    	var dates = $("#dates").val();
+         //执行重载
+     	table.reload('userManage', {
+	        page: {
+	          curr: 1 //重新从第 1 页开始
+	        }
+	        ,where: {
+	        	name : name,
+	        	perName : perName,
+	        	roleid : roleid,
+	        }
+      	});
+	}
+	
+	function showDetail(data) {
+		var params = {};
+		params.columnNumber = 2; //每行显示两个字段
+	    	// 要显示的数据
+		params.fields = [
+           	   {field: 'id', title: 'ID'}
+ 		      ,{field: 'perName', title: '用户名'}
+ 		      ,{field: 'roleDesc', title: '角色'}
+ 		      ,{field: 'channelDesc', title: '渠道'}
+ 		      ,{field: 'createTime', title: '创建日期'}
+ 		      ,{field: 'stateDesc', title: '状态'}
+    	                 ];
+		// 寄存当前数据
+		setNowRowData(data, params);
+		layer.open({
+	   	      type: 2,
+	   	      title: '用户详情',
+	   	      shadeClose: true,
+	   	      shade: 0.8,
+	   	      //maxmin: true, //开启最大化最小化按钮
+	   	      area: ['800px', '500px'],
+	   	      content: '../../web/showDetail.html'
+		});
+	}
+	//添加操作员
+	$(document).on('click','#addUser',function(){
+		openMainTabPage('101007-01', ' 增加操作员', 'wxuserManage/addUserwx.html', '', '101007', reLoadFun);
+	});
+	function changeSelectCon(index, t, type, dateValue){
+		if (type == 'inp') {
+			if (isEmpty($(t).val())) {
+				$("#search" + index).remove();
+			} else {
+				$("#search" + index).remove();
+				if (isEmpty($("#search" + index).attr("name"))) {
+					$("#conditions").append(getSelectConHtml(index, t, type));
+				}
+			}
+		} else {
+			if (isEmpty($(t).val())) {
+				$("#search" + index).remove();
+			} else {
+				$("#search" + index).remove();
+				if (isEmpty($("#search" + index).attr("name"))) {
+					$(t).attr("id",dateValue);
+					$("#conditions").append(getSelectConHtml(index, t, type,dateValue));
+				}
+			}
+		}
+	}
+	var array = new Array('用户名','角色');
+	function getSelectConHtml(index, t, type,dateValue){
+		var name;
+		var value;
+		if(type == "inp"){
+			value = t.value.substr(0,5)+"..";
+		}
+		if (type == "date") {
+			value = dateValue;
+		}
+		if(type == "sel" && dateValue =="state"){
+			value = $("#state").find("option:selected").text();
+		}
+		if(type == "sel" && dateValue =="roleid"){
+			value = $("#roleid").find("option:selected").text();
+		}
+		if (type == "date") {
+			name = $("#"+t).attr("id");
+		} else {
+			name = $(t).attr("id");
+		}
+		var html = '<div class="fl xuanzhong-active" id = "search' + index + '" name = "' + name + '" onclick = "removeSearch(this)">' +
+						'<div class="fl">' + array[index] + '</div>' +
+						':<i class="iconfont">'+value+'</i>' +
+						'<svg class="icon" aria-hidden="true">' +
+						  '<use xlink:href="#iconicon_close1"></use>' +
+						'</svg>' +
+					'</div>';
+		return html;
+	}
+	function removeSearch(t) {
+		if ($(t).attr("name") == 'roleid') {
+
+			initSelect('roleid', "USER_ROLE", "roleid", ' ', true);
+			form.render();
+			$(t).remove();
+			
+		} else {
+			$("#"+$(t).attr("name")).val('');
+			$(t).remove();
+		}
+	}
+</script>
+</body>
+</html>