Commit 9c3f464e by qwmqiuwenmin

fix

parent 900cff73
......@@ -51,6 +51,10 @@ public class MaidianLogDTO implements Serializable{
private String storeId;
private String clerkCode;
private String clerkId;
private String enterpriseId;
private Date createTime;
......@@ -257,6 +261,22 @@ public class MaidianLogDTO implements Serializable{
public void setClerkCode(String 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;
}
......
......@@ -53,6 +53,10 @@ public class TabHaobanMaidianLog implements Serializable {
private Date createTime;
private Date updateTime;
private String clerkId;
private String enterpriseId;
private static final long serialVersionUID = 1L;
......@@ -255,6 +259,22 @@ public class TabHaobanMaidianLog implements Serializable {
public void setClerkCode(String 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 @@
<result column="stay_time" property="stayTime" jdbcType="INTEGER" />
<result column="track_sign" property="trackSign" 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="store_status" property="storeStatus" jdbcType="INTEGER" />
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
......@@ -31,7 +33,7 @@
<sql id="Base_Column_List" >
maidian_id, staff_id, wx_enterprise_id, phone_number, device_date, options, event,
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>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
select
......@@ -50,7 +52,7 @@
scene, platform, model,
brand, hbversion, system,
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},
#{phoneNumber,jdbcType=VARCHAR}, #{deviceDate,jdbcType=TIMESTAMP}, #{options,jdbcType=VARCHAR},
......@@ -59,7 +61,7 @@
#{brand,jdbcType=VARCHAR}, #{hbversion,jdbcType=VARCHAR}, #{system,jdbcType=VARCHAR},
#{sdkVersion,jdbcType=VARCHAR}, #{version,jdbcType=VARCHAR}, #{systemInfo,jdbcType=VARCHAR},
#{stayTime,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},#{trackSign},
#{storeStatus},#{clerkCode},#{storeId}
#{storeStatus},#{clerkCode},#{storeId},#{clerkId},#{enterpriseId}
)
</insert>
<insert id="insertSelective" parameterType="com.gic.haoban.manage.service.entity.TabHaobanMaidianLog" >
......@@ -131,6 +133,12 @@
<if test="trackSign != null" >
track_sign,
</if>
<if test="clerkId != null" >
clerk_id,
</if>
<if test="enterpriseId != null" >
enterprise_id,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="maidianId != null" >
......@@ -199,6 +207,12 @@
<if test="trackSign != null" >
#{trackSign},
</if>
<if test="clerkId != null" >
#{clerkId},
</if>
<if test="enterpriseId != null" >
#{enterpriseId},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.haoban.manage.service.entity.TabHaobanMaidianLog" >
......
......@@ -8,6 +8,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.alibaba.fastjson.JSON;
import com.gic.clerk.api.service.ClerkService;
import com.gic.haoban.common.utils.HaobanResponse;
import com.gic.haoban.manage.api.dto.MaidianLogDTO;
import com.gic.haoban.manage.api.service.MaidianLogApiService;
......@@ -18,6 +19,8 @@ public class MaidianLogController extends WebBaseController{
@Autowired
private MaidianLogApiService maidianLogApiService;
@Autowired
private ClerkService clerkService;
@RequestMapping("save-maidian-log")
public HaobanResponse saveUserLoginLog(String maidianLogStr) {
......@@ -30,6 +33,10 @@ public class MaidianLogController extends WebBaseController{
if(StringUtils.isNotBlank(options) && options.length() > 2000){
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);
}
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