Commit 1b996ca0 by qwmqiuwenmin

fix

parent e513c345
package com.gic.haoban.manage.api.dto;
import java.io.Serializable;
import java.util.Date;
public class UserLoginLogDTO implements Serializable {
private String userLoginLog;
private String wxEnterpriseId;
private String version;
private String sdkVersion;
private String system;
private String brand;
private String model;
private String platform;
private String systemInfo;
private Integer status;
private String wxUserId;
private Date createTime;
private Date updateTime;
private static final long serialVersionUID = 1L;
public String getUserLoginLog() {
return userLoginLog;
}
public void setUserLoginLog(String userLoginLog) {
this.userLoginLog = userLoginLog == null ? null : userLoginLog.trim();
}
public String getWxEnterpriseId() {
return wxEnterpriseId;
}
public void setWxEnterpriseId(String wxEnterpriseId) {
this.wxEnterpriseId = wxEnterpriseId == null ? null : wxEnterpriseId.trim();
}
public String getVersion() {
return version;
}
public void setVersion(String version) {
this.version = version == null ? null : version.trim();
}
public String getSdkVersion() {
return sdkVersion;
}
public void setSdkVersion(String sdkVersion) {
this.sdkVersion = sdkVersion == null ? null : sdkVersion.trim();
}
public String getSystem() {
return system;
}
public void setSystem(String system) {
this.system = system == null ? null : system.trim();
}
public String getBrand() {
return brand;
}
public void setBrand(String brand) {
this.brand = brand == null ? null : brand.trim();
}
public String getModel() {
return model;
}
public void setModel(String model) {
this.model = model == null ? null : model.trim();
}
public String getPlatform() {
return platform;
}
public void setPlatform(String platform) {
this.platform = platform == null ? null : platform.trim();
}
public String getSystemInfo() {
return systemInfo;
}
public void setSystemInfo(String systemInfo) {
this.systemInfo = systemInfo == null ? null : systemInfo.trim();
}
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
public String getWxUserId() {
return wxUserId;
}
public void setWxUserId(String wxUserId) {
this.wxUserId = wxUserId == null ? null : wxUserId.trim();
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
}
\ No newline at end of file
...@@ -7,6 +7,7 @@ import com.gic.haoban.base.api.common.BasePageInfo; ...@@ -7,6 +7,7 @@ import com.gic.haoban.base.api.common.BasePageInfo;
import com.gic.haoban.common.utils.HaobanResponse; import com.gic.haoban.common.utils.HaobanResponse;
import com.gic.haoban.manage.api.dto.StaffDTO; import com.gic.haoban.manage.api.dto.StaffDTO;
import com.gic.haoban.manage.api.dto.StaffDepartmentRelatedDTO; import com.gic.haoban.manage.api.dto.StaffDepartmentRelatedDTO;
import com.gic.haoban.manage.api.dto.UserLoginLogDTO;
public interface StaffApiService { public interface StaffApiService {
...@@ -48,4 +49,6 @@ public interface StaffApiService { ...@@ -48,4 +49,6 @@ public interface StaffApiService {
public List<String> listUnBindClerk(String storeId); public List<String> listUnBindClerk(String storeId);
public void cleanGicClerk(String clerkCode, String departmentId); public void cleanGicClerk(String clerkCode, String departmentId);
public String insertUserLoginLog(UserLoginLogDTO userLoginLogDTO);
} }
package com.gic.haoban.manage.service.dao.mapper;
import com.gic.haoban.manage.service.entity.TabUserLoginLog;
public interface TabUserLoginLogMapper {
int deleteByPrimaryKey(String userLoginLog);
int insert(TabUserLoginLog record);
int insertSelective(TabUserLoginLog record);
TabUserLoginLog selectByPrimaryKey(String userLoginLog);
int updateByPrimaryKeySelective(TabUserLoginLog record);
int updateByPrimaryKey(TabUserLoginLog record);
}
\ No newline at end of file
package com.gic.haoban.manage.service.entity;
import java.io.Serializable;
import java.util.Date;
public class TabUserLoginLog implements Serializable {
private String userLoginLog;
private String wxEnterpriseId;
private String version;
private String sdkVersion;
private String system;
private String brand;
private String model;
private String platform;
private String systemInfo;
private Integer status;
private String wxUserId;
private Date createTime;
private Date updateTime;
private static final long serialVersionUID = 1L;
public String getUserLoginLog() {
return userLoginLog;
}
public void setUserLoginLog(String userLoginLog) {
this.userLoginLog = userLoginLog == null ? null : userLoginLog.trim();
}
public String getWxEnterpriseId() {
return wxEnterpriseId;
}
public void setWxEnterpriseId(String wxEnterpriseId) {
this.wxEnterpriseId = wxEnterpriseId == null ? null : wxEnterpriseId.trim();
}
public String getVersion() {
return version;
}
public void setVersion(String version) {
this.version = version == null ? null : version.trim();
}
public String getSdkVersion() {
return sdkVersion;
}
public void setSdkVersion(String sdkVersion) {
this.sdkVersion = sdkVersion == null ? null : sdkVersion.trim();
}
public String getSystem() {
return system;
}
public void setSystem(String system) {
this.system = system == null ? null : system.trim();
}
public String getBrand() {
return brand;
}
public void setBrand(String brand) {
this.brand = brand == null ? null : brand.trim();
}
public String getModel() {
return model;
}
public void setModel(String model) {
this.model = model == null ? null : model.trim();
}
public String getPlatform() {
return platform;
}
public void setPlatform(String platform) {
this.platform = platform == null ? null : platform.trim();
}
public String getSystemInfo() {
return systemInfo;
}
public void setSystemInfo(String systemInfo) {
this.systemInfo = systemInfo == null ? null : systemInfo.trim();
}
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
public String getWxUserId() {
return wxUserId;
}
public void setWxUserId(String wxUserId) {
this.wxUserId = wxUserId == null ? null : wxUserId.trim();
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
}
\ No newline at end of file
package com.gic.haoban.manage.service.service;
import com.gic.haoban.manage.api.dto.UserLoginLogDTO;
public interface UserLoginLogService {
String insertUserLoginLog(UserLoginLogDTO userLoginLogDTO);
}
package com.gic.haoban.manage.service.service.impl;
import java.util.Date;
import org.springframework.beans.factory.annotation.Autowired;
import com.gic.commons.util.EntityUtil;
import com.gic.haoban.common.utils.StringUtil;
import com.gic.haoban.manage.api.dto.UserLoginLogDTO;
import com.gic.haoban.manage.service.dao.mapper.TabUserLoginLogMapper;
import com.gic.haoban.manage.service.entity.TabUserLoginLog;
import com.gic.haoban.manage.service.service.UserLoginLogService;
public class UserLoginLogServiceImpl implements UserLoginLogService {
@Autowired
private TabUserLoginLogMapper mapper;
@Override
public String insertUserLoginLog(UserLoginLogDTO userLoginLogDTO) {
String userLoginLog = StringUtil.randomUUID();
userLoginLogDTO.setCreateTime(new Date());
userLoginLogDTO.setUpdateTime(userLoginLogDTO.getCreateTime());
userLoginLogDTO.setStatus(1);
userLoginLogDTO.setUserLoginLog(userLoginLog);
mapper.insert(EntityUtil.changeEntityByJSON(TabUserLoginLog.class, userLoginLog));
return userLoginLog;
}
}
...@@ -39,6 +39,7 @@ import com.gic.haoban.manage.api.dto.DepartmentDTO; ...@@ -39,6 +39,7 @@ import com.gic.haoban.manage.api.dto.DepartmentDTO;
import com.gic.haoban.manage.api.dto.StaffDTO; import com.gic.haoban.manage.api.dto.StaffDTO;
import com.gic.haoban.manage.api.dto.StaffDepartmentRelatedDTO; import com.gic.haoban.manage.api.dto.StaffDepartmentRelatedDTO;
import com.gic.haoban.manage.api.dto.SyncJsonColumnDTO; import com.gic.haoban.manage.api.dto.SyncJsonColumnDTO;
import com.gic.haoban.manage.api.dto.UserLoginLogDTO;
import com.gic.haoban.manage.api.dto.WxEnterpriseDTO; import com.gic.haoban.manage.api.dto.WxEnterpriseDTO;
import com.gic.haoban.manage.api.service.StaffApiService; import com.gic.haoban.manage.api.service.StaffApiService;
import com.gic.haoban.manage.service.dao.mapper.StaffDepartmentRelatedMapper; import com.gic.haoban.manage.service.dao.mapper.StaffDepartmentRelatedMapper;
...@@ -50,6 +51,7 @@ import com.gic.haoban.manage.service.entity.TabHaobanWxApplication; ...@@ -50,6 +51,7 @@ import com.gic.haoban.manage.service.entity.TabHaobanWxApplication;
import com.gic.haoban.manage.service.service.DepartmentService; import com.gic.haoban.manage.service.service.DepartmentService;
import com.gic.haoban.manage.service.service.StaffDepartmentRelatedService; import com.gic.haoban.manage.service.service.StaffDepartmentRelatedService;
import com.gic.haoban.manage.service.service.StaffService; import com.gic.haoban.manage.service.service.StaffService;
import com.gic.haoban.manage.service.service.UserLoginLogService;
import com.gic.haoban.manage.service.service.WxApplicationService; import com.gic.haoban.manage.service.service.WxApplicationService;
import com.gic.haoban.manage.service.service.WxEnterpriseService; import com.gic.haoban.manage.service.service.WxEnterpriseService;
import com.gic.wechat.api.dto.qywx.UserDTO; import com.gic.wechat.api.dto.qywx.UserDTO;
...@@ -85,6 +87,8 @@ public class StaffApiServiceImpl implements StaffApiService { ...@@ -85,6 +87,8 @@ public class StaffApiServiceImpl implements StaffApiService {
private StoreService storeService; private StoreService storeService;
@Autowired @Autowired
private StoreGroupService storeGroupService; private StoreGroupService storeGroupService;
@Autowired
private UserLoginLogService userLoginLogService;
@Override @Override
public StaffDTO selectById(String staffId) { public StaffDTO selectById(String staffId) {
...@@ -728,4 +732,10 @@ public class StaffApiServiceImpl implements StaffApiService { ...@@ -728,4 +732,10 @@ public class StaffApiServiceImpl implements StaffApiService {
return unBindList; return unBindList;
} }
@Override
public String insertUserLoginLog(UserLoginLogDTO userLoginLogDTO) {
return userLoginLogService.insertUserLoginLog(userLoginLogDTO);
}
} }
<?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.gic.haoban.manage.service.dao.mapper.TabUserLoginLogMapper" >
<resultMap id="BaseResultMap" type="com.gic.haoban.manage.service.entity.TabUserLoginLog" >
<id column="user_login_log" property="userLoginLog" jdbcType="VARCHAR" />
<result column="wx_enterprise_id" property="wxEnterpriseId" jdbcType="VARCHAR" />
<result column="version" property="version" jdbcType="VARCHAR" />
<result column="SDK_version" property="sdkVersion" jdbcType="VARCHAR" />
<result column="system" property="system" jdbcType="VARCHAR" />
<result column="brand" property="brand" jdbcType="VARCHAR" />
<result column="model" property="model" jdbcType="VARCHAR" />
<result column="platform" property="platform" jdbcType="VARCHAR" />
<result column="system_info" property="systemInfo" jdbcType="VARCHAR" />
<result column="status" property="status" jdbcType="INTEGER" />
<result column="wx_user_id" property="wxUserId" jdbcType="VARCHAR" />
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
<result column="update_time" property="updateTime" jdbcType="TIMESTAMP" />
</resultMap>
<sql id="Base_Column_List" >
user_login_log, wx_enterprise_id, version, SDK_version, system, brand, model, platform,
system_info, status, wx_user_id, create_time, update_time
</sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
select
<include refid="Base_Column_List" />
from tab_haoban_user_login_log
where user_login_log = #{userLoginLog,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
delete from tab_haoban_user_login_log
where user_login_log = #{userLoginLog,jdbcType=VARCHAR}
</delete>
<insert id="insert" parameterType="com.gic.haoban.manage.service.entity.TabUserLoginLog" >
insert into tab_haoban_user_login_log (user_login_log, wx_enterprise_id, version,
SDK_version, system, brand,
model, platform, system_info,
status, wx_user_id, create_time,
update_time)
values (#{userLoginLog,jdbcType=VARCHAR}, #{wxEnterpriseId,jdbcType=VARCHAR}, #{version,jdbcType=VARCHAR},
#{sdkVersion,jdbcType=VARCHAR}, #{system,jdbcType=VARCHAR}, #{brand,jdbcType=VARCHAR},
#{model,jdbcType=VARCHAR}, #{platform,jdbcType=VARCHAR}, #{systemInfo,jdbcType=VARCHAR},
#{status,jdbcType=INTEGER}, #{wxUserId,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="com.gic.haoban.manage.service.entity.TabUserLoginLog" >
insert into tab_haoban_user_login_log
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="userLoginLog != null" >
user_login_log,
</if>
<if test="wxEnterpriseId != null" >
wx_enterprise_id,
</if>
<if test="version != null" >
version,
</if>
<if test="sdkVersion != null" >
SDK_version,
</if>
<if test="system != null" >
system,
</if>
<if test="brand != null" >
brand,
</if>
<if test="model != null" >
model,
</if>
<if test="platform != null" >
platform,
</if>
<if test="systemInfo != null" >
system_info,
</if>
<if test="status != null" >
status,
</if>
<if test="wxUserId != null" >
wx_user_id,
</if>
<if test="createTime != null" >
create_time,
</if>
<if test="updateTime != null" >
update_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="userLoginLog != null" >
#{userLoginLog,jdbcType=VARCHAR},
</if>
<if test="wxEnterpriseId != null" >
#{wxEnterpriseId,jdbcType=VARCHAR},
</if>
<if test="version != null" >
#{version,jdbcType=VARCHAR},
</if>
<if test="sdkVersion != null" >
#{sdkVersion,jdbcType=VARCHAR},
</if>
<if test="system != null" >
#{system,jdbcType=VARCHAR},
</if>
<if test="brand != null" >
#{brand,jdbcType=VARCHAR},
</if>
<if test="model != null" >
#{model,jdbcType=VARCHAR},
</if>
<if test="platform != null" >
#{platform,jdbcType=VARCHAR},
</if>
<if test="systemInfo != null" >
#{systemInfo,jdbcType=VARCHAR},
</if>
<if test="status != null" >
#{status,jdbcType=INTEGER},
</if>
<if test="wxUserId != null" >
#{wxUserId,jdbcType=VARCHAR},
</if>
<if test="createTime != null" >
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null" >
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.haoban.manage.service.entity.TabUserLoginLog" >
update tab_haoban_user_login_log
<set >
<if test="wxEnterpriseId != null" >
wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR},
</if>
<if test="version != null" >
version = #{version,jdbcType=VARCHAR},
</if>
<if test="sdkVersion != null" >
SDK_version = #{sdkVersion,jdbcType=VARCHAR},
</if>
<if test="system != null" >
system = #{system,jdbcType=VARCHAR},
</if>
<if test="brand != null" >
brand = #{brand,jdbcType=VARCHAR},
</if>
<if test="model != null" >
model = #{model,jdbcType=VARCHAR},
</if>
<if test="platform != null" >
platform = #{platform,jdbcType=VARCHAR},
</if>
<if test="systemInfo != null" >
system_info = #{systemInfo,jdbcType=VARCHAR},
</if>
<if test="status != null" >
status = #{status,jdbcType=INTEGER},
</if>
<if test="wxUserId != null" >
wx_user_id = #{wxUserId,jdbcType=VARCHAR},
</if>
<if test="createTime != null" >
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null" >
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where user_login_log = #{userLoginLog,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="com.gic.haoban.manage.service.entity.TabUserLoginLog" >
update tab_haoban_user_login_log
set wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR},
version = #{version,jdbcType=VARCHAR},
SDK_version = #{sdkVersion,jdbcType=VARCHAR},
system = #{system,jdbcType=VARCHAR},
brand = #{brand,jdbcType=VARCHAR},
model = #{model,jdbcType=VARCHAR},
platform = #{platform,jdbcType=VARCHAR},
system_info = #{systemInfo,jdbcType=VARCHAR},
status = #{status,jdbcType=INTEGER},
wx_user_id = #{wxUserId,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where user_login_log = #{userLoginLog,jdbcType=VARCHAR}
</update>
</mapper>
\ No newline at end of file
...@@ -9,6 +9,7 @@ import org.springframework.web.bind.annotation.RestController; ...@@ -9,6 +9,7 @@ import org.springframework.web.bind.annotation.RestController;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.gic.haoban.common.utils.HaobanResponse; import com.gic.haoban.common.utils.HaobanResponse;
import com.gic.haoban.manage.api.dto.StaffDTO; import com.gic.haoban.manage.api.dto.StaffDTO;
import com.gic.haoban.manage.api.dto.UserLoginLogDTO;
import com.gic.haoban.manage.api.dto.WxEnterpriseDTO; import com.gic.haoban.manage.api.dto.WxEnterpriseDTO;
import com.gic.haoban.manage.api.service.StaffApiService; import com.gic.haoban.manage.api.service.StaffApiService;
import com.gic.haoban.manage.api.service.WxEnterpriseApiService; import com.gic.haoban.manage.api.service.WxEnterpriseApiService;
...@@ -69,4 +70,11 @@ public class InfoController extends WebBaseController{ ...@@ -69,4 +70,11 @@ public class InfoController extends WebBaseController{
} }
@RequestMapping("save-user-login-log")
public HaobanResponse saveUserLoginLog(UserLoginLogDTO userLoginLogDTO) {
staffApiService.insertUserLoginLog(userLoginLogDTO);
return resultResponse(HaoBanErrCode.ERR_1);
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment