Commit 9c3f464e by qwmqiuwenmin

fix

parent 900cff73
...@@ -52,6 +52,10 @@ public class MaidianLogDTO implements Serializable{ ...@@ -52,6 +52,10 @@ public class MaidianLogDTO implements Serializable{
private String clerkCode; private String clerkCode;
private String clerkId;
private String enterpriseId;
private Date createTime; private Date createTime;
private Date updateTime; private Date updateTime;
...@@ -258,6 +262,22 @@ public class MaidianLogDTO implements Serializable{ ...@@ -258,6 +262,22 @@ public class MaidianLogDTO implements Serializable{
this.clerkCode = clerkCode; this.clerkCode = clerkCode;
} }
public String getClerkId() {
return clerkId;
}
public void setClerkId(String clerkId) {
this.clerkId = clerkId;
}
public String getEnterpriseId() {
return enterpriseId;
}
public void setEnterpriseId(String enterpriseId) {
this.enterpriseId = enterpriseId;
}
} }
...@@ -54,6 +54,10 @@ public class TabHaobanMaidianLog implements Serializable { ...@@ -54,6 +54,10 @@ public class TabHaobanMaidianLog implements Serializable {
private Date updateTime; private Date updateTime;
private String clerkId;
private String enterpriseId;
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
public Integer getMaidianId() { public Integer getMaidianId() {
...@@ -256,5 +260,21 @@ public class TabHaobanMaidianLog implements Serializable { ...@@ -256,5 +260,21 @@ public class TabHaobanMaidianLog implements Serializable {
this.clerkCode = clerkCode; this.clerkCode = clerkCode;
} }
public String getClerkId() {
return clerkId;
}
public void setClerkId(String clerkId) {
this.clerkId = clerkId;
}
public String getEnterpriseId() {
return enterpriseId;
}
public void setEnterpriseId(String enterpriseId) {
this.enterpriseId = enterpriseId;
}
} }
\ No newline at end of file
...@@ -23,6 +23,8 @@ ...@@ -23,6 +23,8 @@
<result column="stay_time" property="stayTime" jdbcType="INTEGER" /> <result column="stay_time" property="stayTime" jdbcType="INTEGER" />
<result column="track_sign" property="trackSign" jdbcType="VARCHAR" /> <result column="track_sign" property="trackSign" jdbcType="VARCHAR" />
<result column="store_id" property="storeId" jdbcType="VARCHAR" /> <result column="store_id" property="storeId" jdbcType="VARCHAR" />
<result column="clerk_id" property="clerkId" jdbcType="VARCHAR" />
<result column="enterprise_id" property="enterpriseId" jdbcType="VARCHAR" />
<result column="clerk_code" property="clerkCode" jdbcType="VARCHAR" /> <result column="clerk_code" property="clerkCode" jdbcType="VARCHAR" />
<result column="store_status" property="storeStatus" jdbcType="INTEGER" /> <result column="store_status" property="storeStatus" jdbcType="INTEGER" />
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" /> <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
...@@ -31,7 +33,7 @@ ...@@ -31,7 +33,7 @@
<sql id="Base_Column_List" > <sql id="Base_Column_List" >
maidian_id, staff_id, wx_enterprise_id, phone_number, device_date, options, event, maidian_id, staff_id, wx_enterprise_id, phone_number, device_date, options, event,
url, context, scene, platform, model, brand, hbversion, system, sdk_version, version, url, context, scene, platform, model, brand, hbversion, system, sdk_version, version,
system_info, stay_time, create_time, update_time,track_sign,store_id,,store_status,clerk_code system_info, stay_time, create_time, update_time,track_sign,store_id,,store_status,clerk_code,clerk_id,enterprise_id
</sql> </sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" > <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
select select
...@@ -50,7 +52,7 @@ ...@@ -50,7 +52,7 @@
scene, platform, model, scene, platform, model,
brand, hbversion, system, brand, hbversion, system,
sdk_version, version, system_info, sdk_version, version, system_info,
stay_time, create_time, update_time,track_sign,store_status,clerk_code,store_id stay_time, create_time, update_time,track_sign,store_status,clerk_code,store_id,clerk_id,enterprise_id
) )
values (#{maidianId,jdbcType=INTEGER}, #{staffId,jdbcType=VARCHAR}, #{wxEnterpriseId,jdbcType=VARCHAR}, values (#{maidianId,jdbcType=INTEGER}, #{staffId,jdbcType=VARCHAR}, #{wxEnterpriseId,jdbcType=VARCHAR},
#{phoneNumber,jdbcType=VARCHAR}, #{deviceDate,jdbcType=TIMESTAMP}, #{options,jdbcType=VARCHAR}, #{phoneNumber,jdbcType=VARCHAR}, #{deviceDate,jdbcType=TIMESTAMP}, #{options,jdbcType=VARCHAR},
...@@ -59,7 +61,7 @@ ...@@ -59,7 +61,7 @@
#{brand,jdbcType=VARCHAR}, #{hbversion,jdbcType=VARCHAR}, #{system,jdbcType=VARCHAR}, #{brand,jdbcType=VARCHAR}, #{hbversion,jdbcType=VARCHAR}, #{system,jdbcType=VARCHAR},
#{sdkVersion,jdbcType=VARCHAR}, #{version,jdbcType=VARCHAR}, #{systemInfo,jdbcType=VARCHAR}, #{sdkVersion,jdbcType=VARCHAR}, #{version,jdbcType=VARCHAR}, #{systemInfo,jdbcType=VARCHAR},
#{stayTime,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},#{trackSign}, #{stayTime,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},#{trackSign},
#{storeStatus},#{clerkCode},#{storeId} #{storeStatus},#{clerkCode},#{storeId},#{clerkId},#{enterpriseId}
) )
</insert> </insert>
<insert id="insertSelective" parameterType="com.gic.haoban.manage.service.entity.TabHaobanMaidianLog" > <insert id="insertSelective" parameterType="com.gic.haoban.manage.service.entity.TabHaobanMaidianLog" >
...@@ -131,6 +133,12 @@ ...@@ -131,6 +133,12 @@
<if test="trackSign != null" > <if test="trackSign != null" >
track_sign, track_sign,
</if> </if>
<if test="clerkId != null" >
clerk_id,
</if>
<if test="enterpriseId != null" >
enterprise_id,
</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides="," > <trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="maidianId != null" > <if test="maidianId != null" >
...@@ -199,6 +207,12 @@ ...@@ -199,6 +207,12 @@
<if test="trackSign != null" > <if test="trackSign != null" >
#{trackSign}, #{trackSign},
</if> </if>
<if test="clerkId != null" >
#{clerkId},
</if>
<if test="enterpriseId != null" >
#{enterpriseId},
</if>
</trim> </trim>
</insert> </insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.haoban.manage.service.entity.TabHaobanMaidianLog" > <update id="updateByPrimaryKeySelective" parameterType="com.gic.haoban.manage.service.entity.TabHaobanMaidianLog" >
......
...@@ -8,6 +8,7 @@ import org.springframework.web.bind.annotation.RequestMapping; ...@@ -8,6 +8,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.gic.clerk.api.service.ClerkService;
import com.gic.haoban.common.utils.HaobanResponse; import com.gic.haoban.common.utils.HaobanResponse;
import com.gic.haoban.manage.api.dto.MaidianLogDTO; import com.gic.haoban.manage.api.dto.MaidianLogDTO;
import com.gic.haoban.manage.api.service.MaidianLogApiService; import com.gic.haoban.manage.api.service.MaidianLogApiService;
...@@ -18,6 +19,8 @@ public class MaidianLogController extends WebBaseController{ ...@@ -18,6 +19,8 @@ public class MaidianLogController extends WebBaseController{
@Autowired @Autowired
private MaidianLogApiService maidianLogApiService; private MaidianLogApiService maidianLogApiService;
@Autowired
private ClerkService clerkService;
@RequestMapping("save-maidian-log") @RequestMapping("save-maidian-log")
public HaobanResponse saveUserLoginLog(String maidianLogStr) { public HaobanResponse saveUserLoginLog(String maidianLogStr) {
...@@ -30,6 +33,10 @@ public class MaidianLogController extends WebBaseController{ ...@@ -30,6 +33,10 @@ public class MaidianLogController extends WebBaseController{
if(StringUtils.isNotBlank(options) && options.length() > 2000){ if(StringUtils.isNotBlank(options) && options.length() > 2000){
maidianLogDTO.setOptions(options.substring(0,1999)); maidianLogDTO.setOptions(options.substring(0,1999));
} }
com.gic.clerk.api.dto.ClerkDTO clerkDTO = clerkService.getClerkByClerkCode(maidianLogDTO.getEnterpriseId(), maidianLogDTO.getClerkCode());
if(clerkDTO != null){
maidianLogDTO.setClerkId(clerkDTO.getClerkId());
}
maidianLogApiService.insert(maidianLogDTO); maidianLogApiService.insert(maidianLogDTO);
} }
return resultResponse(HaoBanErrCode.ERR_1); 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