Commit 4ce27d53 authored by wangyihao's avatar wangyihao

新增 店铺表 字段

parent 9a1ba06c
......@@ -93,6 +93,7 @@ public class WebShopController {
for(Store list:storeList) {
Map<String,Object> map = new HashMap<>();
map.put("storeId", list.getStoreId());
map.put("countyId", list.getCountyId());
map.put("county", list.getCounty());
listQuery.add(map);
}
......
......@@ -91,6 +91,14 @@ public class Store extends Entity<String> {
private Integer isAvailable;
//店铺管理员名称
private String administratorsName;
//市名称
private String cityName;
//市ID
private String cityId;
//省ID
private String provinceId;
//区ID
private String countyId;
/*Auto generated properties end*/
......@@ -107,6 +115,38 @@ public class Store extends Entity<String> {
return administratorsName;
}
public String getCityName() {
return cityName;
}
public void setCityName(String cityName) {
this.cityName = cityName;
}
public String getCityId() {
return cityId;
}
public void setCityId(String cityId) {
this.cityId = cityId;
}
public String getProvinceId() {
return provinceId;
}
public void setProvinceId(String provinceId) {
this.provinceId = provinceId;
}
public String getCountyId() {
return countyId;
}
public void setCountyId(String countyId) {
this.countyId = countyId;
}
public void setAdministratorsName(String administratorsName) {
this.administratorsName = administratorsName;
}
......@@ -445,6 +485,7 @@ public class Store extends Entity<String> {
+ ", createTimeEnd=" + createTimeEnd + ", updateTime=" + updateTime + ", updateTimeStart="
+ updateTimeStart + ", updateTimeEnd=" + updateTimeEnd + ", operatorId=" + operatorId
+ ", operatorType=" + operatorType + ", serialNumber=" + serialNumber + ", isDeleted=" + isDeleted
+ ", isAvailable=" + isAvailable + ", administratorsName=" + administratorsName + "]";
+ ", isAvailable=" + isAvailable + ", administratorsName=" + administratorsName + ", cityName="
+ cityName + ", cityId=" + cityId + ", provinceId=" + provinceId + ", countyId=" + countyId + "]";
}
}
......@@ -100,6 +100,13 @@ public class StoreServiceImpl implements StoreService {
try {
//调用dao,根据主键查询
obj = storeDao.get(id);
if(null != obj) {
Store store = new Store();
store.setStoreId(obj.getStoreId());
store.setClicks(obj.getClicks()+1);
storeDao.update(obj);
}
} catch (Exception e) {
log.error(e.getMessage(), e);
}
......
......@@ -100,6 +100,12 @@ public class WorkerServiceImpl implements WorkerService {
try {
//调用dao,根据主键查询
obj = workerDao.get(id);
if(null != obj) {
Worker worker = new Worker();
worker.setWorkerId(obj.getWorkerId());
worker.setClicks(obj.getClicks()+1);
workerDao.update(worker);
}
} catch (Exception e) {
log.error(e.getMessage(), e);
}
......
......@@ -34,6 +34,10 @@
<result column="IS_DELETED" property="isDeleted" javaType="java.lang.Integer" jdbcType="TINYINT"/>
<result column="IS_AVAILABLE" property="isAvailable" javaType="java.lang.Integer" jdbcType="TINYINT"/>
<result column="ADMINISTRATORS_NAME" property="administratorsName" javaType="java.lang.String" jdbcType="VARCHAR"/>
<result column="CITY_NAME" property="cityName" javaType="java.lang.String" jdbcType="VARCHAR"/>
<result column="CITY_ID" property="cityId" javaType="java.lang.String" jdbcType="VARCHAR"/>
<result column="PROVINCE_ID" property="provinceId" javaType="java.lang.String" jdbcType="VARCHAR"/>
<result column="COUNTY_ID" property="countyId" javaType="java.lang.String" jdbcType="VARCHAR"/>
</resultMap>
......@@ -43,7 +47,8 @@ STORE_ID,STORE_NAME,CONTACT_NUMBER,CONTACTS,QQ,WECHAT,PROVINCE,
ADMINISTRATORS_ID,COUNTY,STORE_POSITION,STORE_BUSINESS_TIME_START,STORE_BUSINESS_TIME_END,CONSUME_INTERVAL,
STORE_DETAILS,QR_CODE,STORE_HOME_PIC,STORE_PIC,IS_AUDITING,IS_SHOPPING,
UPLOAD_TIME,MATURE_TIME,CLICKS,IS_RECOMMEND,CREATE_TIME,UPDATE_TIME,
OPERATOR_ID,OPERATOR_TYPE,SERIAL_NUMBER,IS_DELETED,IS_AVAILABLE,ADMINISTRATORS_NAME
OPERATOR_ID,OPERATOR_TYPE,SERIAL_NUMBER,IS_DELETED,IS_AVAILABLE,ADMINISTRATORS_NAME,
CITY_NAME,CITY_ID,PROVINCE_ID,COUNTY_ID
</sql>
<!-- 常见字段,一般用于列表查询,可能不包含备注之类的字段 -->
......@@ -52,7 +57,8 @@ STORE_ID,STORE_NAME,CONTACT_NUMBER,CONTACTS,QQ,WECHAT,PROVINCE,
ADMINISTRATORS_ID,COUNTY,STORE_POSITION,STORE_BUSINESS_TIME_START,STORE_BUSINESS_TIME_END,CONSUME_INTERVAL,
STORE_DETAILS,QR_CODE,STORE_HOME_PIC,STORE_PIC,IS_AUDITING,IS_SHOPPING,
UPLOAD_TIME,MATURE_TIME,CLICKS,IS_RECOMMEND,CREATE_TIME,UPDATE_TIME,
OPERATOR_ID,OPERATOR_TYPE,SERIAL_NUMBER,IS_DELETED,IS_AVAILABLE,ADMINISTRATORS_NAME
OPERATOR_ID,OPERATOR_TYPE,SERIAL_NUMBER,IS_DELETED,IS_AVAILABLE,ADMINISTRATORS_NAME,
CITY_NAME,CITY_ID,PROVINCE_ID,COUNTY_ID
</sql>
<insert id="add" parameterType="Store" useGeneratedKeys="true" keyProperty="storeId">
......@@ -89,7 +95,11 @@ OPERATOR_ID,OPERATOR_TYPE,SERIAL_NUMBER,IS_DELETED,IS_AVAILABLE,ADMINISTRATORS_N
SERIAL_NUMBER,
IS_DELETED,
IS_AVAILABLE,
ADMINISTRATORS_NAME
ADMINISTRATORS_NAME,
CITY_NAME,
CITY_ID,
PROVINCE_ID,
COUNTY_ID
) values (
<if test="storeId!=null">
#{storeId,jdbcType = VARCHAR},
......@@ -123,7 +133,11 @@ OPERATOR_ID,OPERATOR_TYPE,SERIAL_NUMBER,IS_DELETED,IS_AVAILABLE,ADMINISTRATORS_N
#{serialNumber,jdbcType = INTEGER},
#{isDeleted,jdbcType = TINYINT},
#{isAvailable,jdbcType = TINYINT},
#{administratorsName,jdbcType = VARCHAR}
#{administratorsName,jdbcType = VARCHAR},
#{cityName,jdbcType = VARCHAR},
#{cityId,jdbcType = VARCHAR},
#{provinceId,jdbcType = VARCHAR},
#{countyId,jdbcType = VARCHAR}
)
</insert>
......@@ -220,6 +234,18 @@ OPERATOR_ID,OPERATOR_TYPE,SERIAL_NUMBER,IS_DELETED,IS_AVAILABLE,ADMINISTRATORS_N
<if test="administratorsName!=null and administratorsName!=''">
ADMINISTRATORS_NAME=#{administratorsName,jdbcType = VARCHAR},
</if>
<if test="cityName!=null and cityName!=''">
CITY_NAME=#{cityName,jdbcType = VARCHAR},
</if>
<if test="cityId!=null and cityId!=''">
CITY_ID=#{cityId,jdbcType = VARCHAR},
</if>
<if test="provinceId!=null and provinceId!=''">
PROVINCE_ID=#{provinceId,jdbcType = VARCHAR},
</if>
<if test="countyId!=null and countyId!=''">
COUNTY_ID=#{countyId,jdbcType = VARCHAR},
</if>
</set>
<where>
AND STORE_ID=#{storeId}
......@@ -390,6 +416,18 @@ OPERATOR_ID,OPERATOR_TYPE,SERIAL_NUMBER,IS_DELETED,IS_AVAILABLE,ADMINISTRATORS_N
<if test="q.administratorsName!=null and q.administratorsName!=''">
AND ADMINISTRATORS_NAME=#{q.administratorsName}
</if>
<if test="q.cityName!=null and q.cityName!=''">
AND CITY_NAME=#{q.cityName}
</if>
<if test="q.cityId!=null and q.cityId!=''">
AND CITY_ID=#{q.cityId}
</if>
<if test="q.provinceId!=null and q.provinceId!=''">
AND PROVINCE_ID=#{q.provinceId}
</if>
<if test="q.countyId!=null and q.countyId!=''">
AND COUNTY_ID=#{q.countyId}
</if>
</if>
</sql>
......@@ -515,6 +553,18 @@ OPERATOR_ID,OPERATOR_TYPE,SERIAL_NUMBER,IS_DELETED,IS_AVAILABLE,ADMINISTRATORS_N
<if test="q.administratorsName!=null and q.administratorsName!=''">
AND ADMINISTRATORS_NAME=#{q.administratorsName}
</if>
<if test="q.cityName!=null and q.cityName!=''">
AND CITY_NAME=#{q.cityName}
</if>
<if test="q.cityId!=null and q.cityId!=''">
AND CITY_ID=#{q.cityId}
</if>
<if test="q.provinceId!=null and q.provinceId!=''">
AND PROVINCE_ID=#{q.provinceId}
</if>
<if test="q.countyId!=null and q.countyId!=''">
AND COUNTY_ID=#{q.countyId}
</if>
</if>
</sql>
</mapper>
\ No newline at end of file
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