Commit adafe97d authored by wangyihao's avatar wangyihao

修改 新增 简介字段

parent bc444cb2
......@@ -67,9 +67,14 @@ public class WebShopController {
*/
@RequestMapping("storeDetails")
@ResponseBody
public ResultInfo<Store> getStores(Store store){
public ResultInfo<Store> getStores(String storeId){
ResultInfo<Store> resultInfo = new ResultInfo<>();
Store res = storeService.getStore(store.getStoreId());
if(storeId == null || "".equals(storeId)) {
resultInfo.setCode("0");
resultInfo.setMsg("店铺参数为空");
return resultInfo;
}
Store res = storeService.getStore(storeId);
if (null != res ) {
resultInfo.setCode("1");
resultInfo.setData(res);
......
......@@ -67,9 +67,14 @@ public class WebWorkerController {
*/
@RequestMapping("workerDetails")
@ResponseBody
public ResultInfo<Worker> workerDetails(Worker worker){
public ResultInfo<Worker> workerDetails(String workerId){
ResultInfo<Worker> resultInfo = new ResultInfo<>();
Worker res = workerService.getWorker(worker.getWorkerId());
if(workerId == null || "".equals(workerId)) {
resultInfo.setCode("0");
resultInfo.setMsg("员工参数为空");
return resultInfo;
}
Worker res = workerService.getWorker(workerId);
if (null != res ) {
resultInfo.setCode("1");
resultInfo.setData(res);
......
......@@ -74,7 +74,25 @@ public class PCAController extends BaseController{
return resultInfo;
}
/**
* 市、区(全部)
* @param codeP
* @return
*/
@RequestMapping("getCitys")
@ResponseBody
public ResultInfo<List<City>> getCitys(){
ResultInfo<List<City>> resultInfo = new ResultInfo<>();
List<City> cityList=cityService.getCityList(new Query());
if(cityList.size()>0 && cityList != null) {
resultInfo.setCode("1");
resultInfo.setData(cityList);
}else {
resultInfo.setCode("0");
resultInfo.setMsg("暂无市、区数据");
}
return resultInfo;
}
/**
* 区、县
* @param codeC
......
......@@ -99,6 +99,8 @@ public class Store extends Entity<String> {
private String provinceId;
//区ID
private String countyId;
//简介
private String brief;
/*Auto generated properties end*/
......@@ -111,6 +113,14 @@ public class Store extends Entity<String> {
/*Auto generated methods start*/
public String getBrief() {
return brief;
}
public void setBrief(String brief) {
this.brief = brief;
}
public String getAdministratorsName() {
return administratorsName;
}
......@@ -486,6 +496,7 @@ public class Store extends Entity<String> {
+ updateTimeStart + ", updateTimeEnd=" + updateTimeEnd + ", operatorId=" + operatorId
+ ", operatorType=" + operatorType + ", serialNumber=" + serialNumber + ", isDeleted=" + isDeleted
+ ", isAvailable=" + isAvailable + ", administratorsName=" + administratorsName + ", cityName="
+ cityName + ", cityId=" + cityId + ", provinceId=" + provinceId + ", countyId=" + countyId + "]";
+ cityName + ", cityId=" + cityId + ", provinceId=" + provinceId + ", countyId=" + countyId + ", brief="
+ brief + "]";
}
}
......@@ -92,6 +92,8 @@ public class Worker extends Entity<String> {
private Integer isDeleted;
//店铺名称
private String storeName;
//简介
private String brief;
/*Auto generated properties end*/
......@@ -108,6 +110,14 @@ public class Worker extends Entity<String> {
return isDeleted;
}
public String getBrief() {
return brief;
}
public void setBrief(String brief) {
this.brief = brief;
}
public String getStoreName() {
return storeName;
}
......@@ -446,6 +456,6 @@ public class Worker extends Entity<String> {
+ createTime + ", createTimeStart=" + createTimeStart + ", createTimeEnd=" + createTimeEnd
+ ", updateTime=" + updateTime + ", updateTimeStart=" + updateTimeStart + ", updateTimeEnd="
+ updateTimeEnd + ", operatorId=" + operatorId + ", operatorType=" + operatorType + ", serialNumber="
+ serialNumber + ", isDeleted=" + isDeleted + ", storeName=" + storeName + "]";
+ serialNumber + ", isDeleted=" + isDeleted + ", storeName=" + storeName + ", brief=" + brief + "]";
}
}
......@@ -101,7 +101,11 @@ public class StoreServiceImpl implements StoreService {
//调用dao,根据主键查询
obj = storeDao.get(id);
if(null != obj) {
if(obj.getClicks()== null || "".equals(obj.getClicks())) {
obj.setClicks(0);
}
Store store = new Store();
store.setStoreId(obj.getStoreId());
store.setClicks(obj.getClicks()+1);
storeDao.update(obj);
......
......@@ -101,6 +101,9 @@ public class WorkerServiceImpl implements WorkerService {
//调用dao,根据主键查询
obj = workerDao.get(id);
if(null != obj) {
if(obj.getClicks()== null || "".equals(obj.getClicks())) {
obj.setClicks(0);
}
Worker worker = new Worker();
worker.setWorkerId(obj.getWorkerId());
worker.setClicks(obj.getClicks()+1);
......
......@@ -38,6 +38,7 @@
<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"/>
<result column="BRIEF" property="brief" javaType="java.lang.String" jdbcType="VARCHAR"/>
</resultMap>
......@@ -48,7 +49,7 @@ ADMINISTRATORS_ID,COUNTY,STORE_POSITION,STORE_BUSINESS_TIME_START,STORE_BUSINESS
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,
CITY_NAME,CITY_ID,PROVINCE_ID,COUNTY_ID
CITY_NAME,CITY_ID,PROVINCE_ID,COUNTY_ID,BRIEF
</sql>
<!-- 常见字段,一般用于列表查询,可能不包含备注之类的字段 -->
......@@ -58,7 +59,7 @@ ADMINISTRATORS_ID,COUNTY,STORE_POSITION,STORE_BUSINESS_TIME_START,STORE_BUSINESS
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,
CITY_NAME,CITY_ID,PROVINCE_ID,COUNTY_ID
CITY_NAME,CITY_ID,PROVINCE_ID,COUNTY_ID,BRIEF
</sql>
<insert id="add" parameterType="Store" useGeneratedKeys="true" keyProperty="storeId">
......@@ -99,7 +100,8 @@ CITY_NAME,CITY_ID,PROVINCE_ID,COUNTY_ID
CITY_NAME,
CITY_ID,
PROVINCE_ID,
COUNTY_ID
COUNTY_ID,
BRIEF
) values (
<if test="storeId!=null">
#{storeId,jdbcType = VARCHAR},
......@@ -137,7 +139,8 @@ CITY_NAME,CITY_ID,PROVINCE_ID,COUNTY_ID
#{cityName,jdbcType = VARCHAR},
#{cityId,jdbcType = VARCHAR},
#{provinceId,jdbcType = VARCHAR},
#{countyId,jdbcType = VARCHAR}
#{countyId,jdbcType = VARCHAR},
#{brief,jdbcType = VARCHAR}
)
</insert>
......@@ -246,6 +249,9 @@ CITY_NAME,CITY_ID,PROVINCE_ID,COUNTY_ID
<if test="countyId!=null and countyId!=''">
COUNTY_ID=#{countyId,jdbcType = VARCHAR},
</if>
<if test="brief!=null and brief!=''">
BRIEF=#{brief,jdbcType = VARCHAR},
</if>
</set>
<where>
AND STORE_ID=#{storeId}
......@@ -429,6 +435,9 @@ CITY_NAME,CITY_ID,PROVINCE_ID,COUNTY_ID
<if test="q.countyId!=null and q.countyId!=''">
AND COUNTY_ID=#{q.countyId}
</if>
<if test="q.brief!=null and q.brief!=''">
AND BRIEF=#{q.brief}
</if>
</if>
</sql>
......@@ -566,6 +575,9 @@ CITY_NAME,CITY_ID,PROVINCE_ID,COUNTY_ID
<if test="q.countyId!=null and q.countyId!=''">
AND COUNTY_ID=#{q.countyId}
</if>
<if test="q.brief!=null and q.brief!=''">
AND BRIEF=#{q.brief}
</if>
</if>
</sql>
</mapper>
\ No newline at end of file
......@@ -34,6 +34,7 @@
<result column="SERIAL_NUMBER" property="serialNumber" javaType="java.lang.Integer" jdbcType="INTEGER"/>
<result column="IS_DELETED" property="isDeleted" javaType="java.lang.Integer" jdbcType="TINYINT"/>
<result column="STORE_NAME" property="storeName" javaType="java.lang.String" jdbcType="VARCHAR"/>
<result column="BRIEF" property="brief" javaType="java.lang.String" jdbcType="VARCHAR"/>
</resultMap>
......@@ -43,7 +44,7 @@ WORKER_ID,WORKER_NAME,WORKER_NUMBER,WORKER_SEX,WORKER_AGE,WORKER_BIRTHDAY,WORKER
WORKER_HEIGHT,WORKER_WEIGHT,WORKER_BUST,WORKER_WAIST,WORKER_HIPLINE,WORKER_HOME_PIC,
WORKER_PIC,WORKER_RESUME,STORE_ID,ADMINISTRATORS_ID,IS_AUDITING,IS_SHOPPING,
UPLOAD_TIME,MATURE_TIME,CLICKS,IS_RECOMMEND,WORKER_PLACE_OF_ADDRESS,CREATE_TIME,
UPDATE_TIME,OPERATOR_ID,OPERATOR_TYPE,SERIAL_NUMBER,IS_DELETED,STORE_NAME
UPDATE_TIME,OPERATOR_ID,OPERATOR_TYPE,SERIAL_NUMBER,IS_DELETED,STORE_NAME,BRIEF
</sql>
<!-- 常见字段,一般用于列表查询,可能不包含备注之类的字段 -->
......@@ -52,7 +53,7 @@ WORKER_ID,WORKER_NAME,WORKER_NUMBER,WORKER_SEX,WORKER_AGE,WORKER_BIRTHDAY,WORKER
WORKER_HEIGHT,WORKER_WEIGHT,WORKER_BUST,WORKER_WAIST,WORKER_HIPLINE,WORKER_HOME_PIC,
WORKER_PIC,WORKER_RESUME,STORE_ID,ADMINISTRATORS_ID,IS_AUDITING,IS_SHOPPING,
UPLOAD_TIME,MATURE_TIME,CLICKS,IS_RECOMMEND,WORKER_PLACE_OF_ADDRESS,CREATE_TIME,
UPDATE_TIME,OPERATOR_ID,OPERATOR_TYPE,SERIAL_NUMBER,IS_DELETED,STORE_NAME
UPDATE_TIME,OPERATOR_ID,OPERATOR_TYPE,SERIAL_NUMBER,IS_DELETED,STORE_NAME,BRIEF
</sql>
<insert id="add" parameterType="Worker" useGeneratedKeys="true" keyProperty="workerId">
......@@ -89,7 +90,8 @@ UPDATE_TIME,OPERATOR_ID,OPERATOR_TYPE,SERIAL_NUMBER,IS_DELETED,STORE_NAME
OPERATOR_TYPE,
SERIAL_NUMBER,
IS_DELETED,
STORE_NAME
STORE_NAME,
BRIEF
) values (
<if test="workerId!=null">
#{workerId,jdbcType = VARCHAR},
......@@ -123,7 +125,8 @@ UPDATE_TIME,OPERATOR_ID,OPERATOR_TYPE,SERIAL_NUMBER,IS_DELETED,STORE_NAME
#{operatorType,jdbcType = TINYINT},
#{serialNumber,jdbcType = INTEGER},
#{isDeleted,jdbcType = TINYINT},
#{storeName,jdbcType = VARCHAR}
#{storeName,jdbcType = VARCHAR},
#{brief,jdbcType = VARCHAR}
)
</insert>
......@@ -220,6 +223,9 @@ UPDATE_TIME,OPERATOR_ID,OPERATOR_TYPE,SERIAL_NUMBER,IS_DELETED,STORE_NAME
<if test="storeName!=null and storeName!=''">
STORE_NAME=#{storeName,jdbcType = VARCHAR},
</if>
<if test="brief!=null and brief!=''">
BRIEF=#{brief,jdbcType = VARCHAR},
</if>
</set>
<where>
AND WORKER_ID=#{workerId}
......@@ -391,6 +397,9 @@ UPDATE_TIME,OPERATOR_ID,OPERATOR_TYPE,SERIAL_NUMBER,IS_DELETED,STORE_NAME
<if test="q.storeName!=null and q.storeName!=''">
AND STORE_NAME=#{q.storeName}
</if>
<if test="q.brief!=null and q.brief!=''">
AND BRIEF=#{q.brief}
</if>
</if>
</sql>
......@@ -516,6 +525,9 @@ UPDATE_TIME,OPERATOR_ID,OPERATOR_TYPE,SERIAL_NUMBER,IS_DELETED,STORE_NAME
<if test="q.storeName!=null and q.storeName!=''">
AND STORE_NAME=#{q.storeName}
</if>
<if test="q.brief!=null and q.brief!=''">
AND BRIEF=#{q.brief}
</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