kouchengxing 5 anos atrás
pai
commit
b6129dfd34

+ 6 - 1
dgtly-member/dgtly-member-admin/src/main/resources/templates/notice/supply/details.html

@@ -64,7 +64,12 @@
             <div class="form-group">
                 <label class="col-sm-3 control-label">商品图片:</label>
                 <div class="col-sm-8">
-                    <textarea name="picture" disabled="" class="form-control" required>[[*{picture}]]</textarea>
+                    <div class="fileinput fileinput-new" data-provides="fileinput">
+                        <div class="fileinput-new thumbnail" style="width: 140px; height: 140px;">
+                            <img id="img-cover" th:src="@{*{picture}}">
+                        </div>
+
+                    </div>
                 </div>
             </div>
             <div class="form-group">    

+ 7 - 4
dgtly-member/dgtly-member-admin/src/main/resources/templates/notice/supply/edit.html

@@ -80,7 +80,7 @@
             </div>
 
                 <div class="form-group">
-                    <input id="fmzFile" name="picture" type="hidden"/>
+                    <input id="fmzFile" name="picture" type="hidden" th:field="*{picture}"/>
                     <label class="col-sm-3 control-label"><span style="color: red; ">*</span>商品图片:</label>
                     <div class="col-sm-8">
                         <div class="fileinput fileinput-new" data-provides="fileinput">
@@ -186,12 +186,15 @@
             if ($.validate.form()) {
                 var sHTML = $('.summernote').summernote('code');
                 $("#supplyDetails").val(sHTML);
-                var file = $('#fmz').find('img').attr('src');
-                if(file == undefined){
+                var pic = $('#fmzFile').val();
+                if(pic == undefined){
                     $.modal.alertWarning("请上传图片");
                     return;
                 }
-                $('#fmzFile').val(file);
+                var file = $('#fmz').find('img').attr('src');
+                if(file != undefined){
+                    $('#fmzFile').val(file);
+                }
                 $.operate.save(prefix + "/edit", $('#form-supply-edit').serialize());
             }
         }

+ 2 - 2
dgtly-member/dgtly-member-common/src/main/resources/mapper/member/MemberInfoMapper.xml

@@ -24,9 +24,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <select id="selectMemberInfoList" parameterType="MemberInfo" resultMap="MemberInfoResult">
         <include refid="selectMemberInfoVo"/>
         <where>  
-            <if test="loginAccount != null  and loginAccount != ''"> and login_account = #{loginAccount}</if>
+            <if test="loginAccount != null  and loginAccount != ''"> and login_account like concat('%', #{loginAccount}, '%')</if>
             <if test="loginPassword != null  and loginPassword != ''"> and login_password = #{loginPassword}</if>
-            <if test="phone != null  and phone != ''"> and phone = #{phone}</if>
+            <if test="phone != null  and phone != ''"> and phone like concat('%', #{phone}, '%')</if>
             <if test="loginTime != null "> and login_time = #{loginTime}</if>
         </where>
     </select>

+ 10 - 4
dgtly-member/dgtly-member-common/src/main/resources/mapper/notice/NoticeSupplyMapper.xml

@@ -66,11 +66,17 @@ FROM
         <where>  
             <if test="typeId != null "> and n.type_id = #{typeId}</if>
             <if test="merchantId != null "> and n.merchant_id = #{merchantId}</if>
-            <if test="supplyTitle != null  and supplyTitle != ''"> and n.supply_title = #{supplyTitle} or n.supply_title_en = #{supplyTitle}</if>
-            <if test="manufacturer != null  and manufacturer != ''"> and n.manufacturer = #{manufacturer} or n.manufacturer_en = #{manufacturer}</if>
-            <if test="contacts != null  and contacts != ''"> and n.contacts = #{contacts} or n.contacts_en = #{contacts}</if>
-            <if test="telephone != null  and telephone != ''"> and n.telephone = #{telephone} or n.telephone_en = #{telephone}</if>
+            <if test="supplyTitle != null  and supplyTitle != ''"> and (n.supply_title like concat('%', #{supplyTitle}, '%') or n.supply_title_en like concat('%', #{supplyTitle}, '%'))</if>
+            <if test="manufacturer != null  and manufacturer != ''"> and (n.manufacturer like concat('%', #{manufacturer}, '%') or n.manufacturer_en like concat('%', #{manufacturer}, '%'))</if>
+            <if test="contacts != null  and contacts != ''"> and (n.contacts like concat('%', #{contacts}, '%') or n.contacts_en like concat('%', #{contacts}, '%'))</if>
+            <if test="telephone != null  and telephone != ''"> and (n.telephone like concat('%', #{telephone}, '%') or n.telephone_en like concat('%', #{telephone}, '%'))</if>
             <if test="status != null  and status != ''"> and n.status = #{status}</if>
+            <if test="params.beginReleaseTime != null and params.beginReleaseTime != ''"><!-- 发布开始时间检索 -->
+                AND date_format(n.release_time,'%y%m%d') &gt;= date_format(#{params.beginReleaseTime},'%y%m%d')
+            </if>
+            <if test="params.endReleaseTime != null and params.endReleaseTime != ''"><!-- 发布结束时间检索 -->
+                AND date_format(n.release_time,'%y%m%d') &lt;= date_format(#{params.endReleaseTime},'%y%m%d')
+            </if>
             ${params.dataScope}
         </where>